zerodha-mcp-go

sukeesh/zerodha-mcp-go

3.4

If you are the rightful owner of zerodha-mcp-go and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

Zerodha MCP Server is a protocol server that allows Claude AI to access Zerodha trading account information using the Claude MCP interface.

Tools
19
Resources
0
Prompts
0

Zerodha MCP Server

Protocol to communicate with your Zerodha data written in Golang

Go

Overview

Zerodha MCP Server provides an implementation of the Claude MCP (Model Completion Protocol) interface for Zerodha trading data. This allows Claude AI to access your Zerodha trading account information directly.

Prerequisites

Installation

Option 1: Using Go Install

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

Option 2: Build 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.

Usage with an MCP Client

GPT 4o mini

https://github.com/user-attachments/assets/849c4aca-0ca2-4aed-a9be-3df135f8a5c5

Claude Sonnet 3.7

Configuration

  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
    
  3. Configure Claude Desktop:

    • Open Claude Desktop โ†’ Settings โ†’ Developer โ†’ Edit Config
    • 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. When prompted, authenticate with your Zerodha Kite credentials.

Debugging

The logs for MCP Server are available at ~/Library/Logs/Claude

Known Bugs

When the Claude desktop is shutdown, the underlying MCP Server is not getting killed.

kill -9 $(lsof -t -i:5888)

Available Tools

CategoryToolStatusDescription
Account Informationget_user_profileโœ…Get basic user profile information
get_user_marginsโœ…Get all user margins
get_user_segment_marginsโœ…Get segment-wise user margins
Portfolio & Positionsget_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
Market Dataget_ltpโœ…Get Last Traded Price for specific instruments
get_quoteโœ…Get detailed quotes for specific instruments
get_ohlcโœ…Get Open, High, Low, Close quotes
Instrumentsget_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
Mutual Fundsget_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

Usage

After setup, you can interact with your Zerodha account data directly through Claude. For example:

  • "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"

Limitations

  • Only read operations are supported; trading is not yet available
  • Authentication token expires daily and requires re-login