Zerodha MCP server

Provides a bridge to the Zerodha trading platform API, enabling real-time market data access, portfolio monitoring, and trading information retrieval through over 20 specialized tools for stock holdings, positions, order margins, and mutual fund details.
Back to servers
Provider
Sukeesh
Release date
Apr 20, 2025
Language
Go
Stats
7 stars

The Zerodha MCP Server enables Claude AI to directly access and analyze your Zerodha trading account data by implementing the Model Context Protocol (MCP) interface. This integration allows Claude to retrieve your portfolio information, market data, and account details in a secure manner.

Prerequisites

Installation

Using Go Install

go install github.com/sukeesh/zerodha-mcp@latest

Building from Source

git clone https://github.com/sukeesh/zerodha-mcp.git
cd zerodha-mcp
go install

The binary will be installed to your GOBIN directory, which should be in your PATH.

Configuration

Set Up API Credentials

  1. Get your ZERODHA_API_KEY and ZERODHA_API_SECRET from the Kite Connect developer portal

  2. Set up a redirect URL in the Kite developer portal:

    http://127.0.0.1:5888/auth
    

Configure Claude Desktop

  1. Open Claude Desktop → Settings → Developer → Edit Config
  2. Add the following to your claude_desktop_config.json:
{
  "mcpServers": {
    "zerodha": {
      "command": "<path-to-zerodha-mcp-binary>",
      "env": {
       "ZERODHA_API_KEY": "<api_key>",
       "ZERODHA_API_SECRET": "<api_secret>"
      }
    }
  }
}
  1. Restart Claude Desktop
  2. When prompted, authenticate with your Zerodha Kite credentials

Usage Examples

After setup, you can interact with your Zerodha account data directly through Claude by asking questions such as:

  • "Show me my current portfolio holdings"
  • "What's my current margin availability?"
  • "Give me the latest price for RELIANCE"
  • "Show me my open positions with P&L"

Available Features

The server currently provides read-only (FETCH) endpoints for:

  • Portfolio holdings
  • Positions (day and net)
  • Order margins
  • Real-time quotes and LTP (Last Traded Price)
  • OHLC data
  • Instruments list
  • Mutual fund information
  • User profile and margins

Limitations and Troubleshooting

  • Only read operations are supported; trading functionality is not yet available
  • Authentication token expires daily and requires re-login
  • Logs for MCP Server are available at ~/Library/Logs/Claude for debugging

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later