Home / MCP / Zerodha MCP Server

Zerodha MCP Server

Implements Claude MCP to access Zerodha Kite data for read-only queries.

go
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "zerodha": {
            "command": "<path-to-zerodha-mcp-binary>",
            "args": [],
            "env": {
                "ZERODHA_API_KEY": "<api_key>",
                "ZERODHA_API_SECRET": "<api_secret>"
            }
        }
    }
}

You can connect Claude’s Model Completion Protocol (MCP) to your Zerodha trading data by running a dedicated MCP server written in Go. This enables Claude to access your Zerodha Kite account information securely, allowing you to ask questions about your holdings, margins, prices, and more without leaving your environment.

How to use

Run the Zerodha MCP Server as a local process and point your MCP client to it. The server exposes MPC endpoints that Claude can query to retrieve data from your Zerodha Kite account. You can use natural language prompts like “Show me my current portfolio holdings,” “What is my available margin?” or “Give me the latest price for RELIANCE.” The MCP client will interact with the server to fetch read-only data such as user profile, margins, holdings, positions, quotes, and instrument data.

How to install

Prerequisites you need before installing the Zerodha MCP Server:

- Go 1.21 or later

- A Zerodha Kite trading account

- Claude Desktop App

- API credentials from the Kite Connect developer portal

Configuration and setup

Obtain your API credentials from the Kite Connect developer portal and prepare a redirect URL for authentication.

{
  "mcpServers": {
    "zerodha": {
      "command": "<path-to-zerodha-mcp-binary>",
      "env": {
        "ZERODHA_API_KEY": "<api_key>",
        "ZERODHA_API_SECRET": "<api_secret>"
      }
    }
  }
}

Configure Claude Desktop

Open Claude Desktop → Settings → Developer → Edit Config. Add the MCP server entry 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>"
      }
    }
  }
}

Start Claude Desktop and authenticate

Restart Claude Desktop. When prompted, authenticate with your Zerodha Kite credentials to authorize access to your Zerodha data.

Debugging

MCP Server logs are available at the path used by your operating system for Claude logs, typically in your user logs directory.

Known issues

If Claude Desktop is closed, the underlying MCP Server may continue running. If you need to terminate it manually, use a system process kill command targeting the MCP port you use (5888 by default in examples).

Available tools and endpoints

The Zerodha MCP Server exposes a wide range of read-only functions to retrieve data from your Zerodha Kite account, including account information, margins, holdings, positions, market data, instruments, and mutual fund data.

Available tools

get_user_profile

Get basic user profile information

get_user_margins

Get all user margins

get_user_segment_margins

Get segment-wise user margins

get_kite_holdings

Get current holdings in Zerodha Kite account

get_positions

Get current day and net positions

get_order_margins

Get margin requirements for specific orders

get_ltp

Get Last Traded Price for specific instruments

get_quote

Get detailed quotes for specific instruments

get_ohlc

Get Open, High, Low, Close quotes

get_instruments

Get list of all available instruments on Zerodha

get_instruments_by_exchange

Get instruments filtered by exchange

get_auction_instruments

Get instruments available for auction sessions

get_mf_instruments

Get list of all available mutual fund instruments

get_mf_holdings

Get list of mutual fund holdings

get_mf_holdings_info

Get detailed information about mutual fund holdings

get_mf_orders

Get list of all mutual fund orders

get_mf_order_info

Get detailed information about specific mutual fund orders

get_mf_sip_info

Get information about mutual fund SIPs

get_mf_allotted_isins

Get allotted mutual fund ISINs