Nuvama-MCP ๐Ÿ› ๏ธ

by alokamgnaneswarasai

2 389 downloads Not rated yet
GitHub

About

Nuvama-MCP ๐Ÿ› ๏ธ integrates Nuvama's trading platform with Claude AI using the Model Context Protocol (MCP) framework. It allows users to interact with the Nuvama trading platform directly through Claude AI to place orders and view holdings.

Explore

- ๐Ÿ“ˆ Place buy and sell orders for stocks.
- ๐Ÿ“Š Fetch and display holdings from the API.
- โšก FastMCP server integration for easy tool access.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Nuvama-MCP ๐Ÿ› ๏ธ
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

- ๐Ÿ 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.

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

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! ๐Ÿš€

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.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "nuvama-mcp \ud83d\udee0\ufe0f": {
            "nuvama-mcp": {
                "command": "uv",
                "args": [
                    "run",
                    "trade_mcp_server.py"
                ]
            }
        }
    }
}

McpServers

{
    "nuvama-mcp": {
        "command": "uv",
        "args": [
            "run",
            "trade_mcp_server.py"
        ]
    }
}

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! ๐Ÿš€

No reviews yet โ€” be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.