MCP ExplorerExplorer

Nuvama Mcp

@alokamgnaneswarasaion 10 months ago
2 MIT
FreeCommunity
AI Systems
MCP server to connect to nuvama-trade apis

Overview

What is Nuvama Mcp

Nuvama-MCP is a server designed to connect to Nuvama’s trading APIs, allowing users to interact with the trading platform through Claude AI using the MCP framework.

Use cases

Use cases include automated trading strategies, portfolio management, and real-time stock analysis through interaction with Claude AI.

How to use

To use Nuvama-MCP, clone the repository, install the required Python packages, configure your API credentials in ‘index.py’, and run the FastMCP server to access trading functionalities.

Key features

Key features include the ability to place buy and sell orders for stocks, fetch and display holdings from the API, and fast integration with the MCP framework for easy tool access.

Where to use

Nuvama-MCP can be used in financial services, trading applications, and any environment where automated trading and AI integration are beneficial.

Content

Nuvama-MCP 🛠️

This project integrates Nuvama’s trading platform with Claude AI using the MCP framework, allows you to interact with nuvama trading platform directly through claude AI.

Features ✨

  • 📈 Place buy and sell orders for stocks.
  • 📊 Fetch and display holdings from the API.
  • ⚡ FastMCP server integration for easy tool access.

Project Structure 📂

  • index.py: Contains the core logic for interacting with the trading API.
  • trade_mcp_server.py: Implements a FastMCP server to expose trading functionalities as tools.
  • .gitignore: Specifies files and directories to be ignored by Git.

Prerequisites ✅

  • 🐍 Python 3.x installed on your system.
  • 📦 Required Python packages installed (e.g., FastMCP, APIConnect).
  • 🔑 API credentials (API key, secret, and request ID).
  • 📄 A CSV file containing stock symbols and exchange details.

Setup Instructions 🛠️

  1. Clone the repository to your local machine.

  2. Install the required Python packages:

    pip install -r requirements.txt
    
  3. Update the following placeholders in index.py:

    • api_key: Your API key.
    • api_secret: Your API secret.
    • request_id: Your request ID.
    • settings_file: Path to your settings file.
    • csv_file_path: Path to your instruments CSV file.
  4. Run the FastMCP server:

    uv run trade_mcp_server.py
    

Using the MCP Tools 🛠️

The FastMCP server exposes the following tools:

  • 🛒 buyorder: Place a buy order.
  • 🛍️ sellorder: Place a sell order.

You can call these tools directly from the MCP interface.

Configuring Claude for MCP Integration 🤖

To enable Claude to recognize the MCP tools, create a configuration file (e.g., claude_config.json) in the appropriate directory and add the following content:

{
  "mcpServers": {
    "trade": {
      "command": "<path_to_uv_executable>",
      "args": [
        "--directory",
        "<path_to_trade_directory>",
        "run",
        "trade_server.py"
      ]
    }
  }
}

Replace <path_to_uv_executable> with the path to your uv.exe file and <path_to_trade_directory> with the path to your project directory. Place this configuration file in the relevant location for Claude to detect it.

This configuration allows Claude to interact with the MCP tools, enabling you to place orders directly from Claude using Natural Language.

Happy Trading! 🚀

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers