zerodha-mcp
by mtwn105·★ 30·Score 35
A Python-based MCP server for Zerodha trading with interactive chat interface and multi-agent support.
Overview
This is a comprehensive MCP server for Zerodha, an Indian stock brokerage platform. It provides a set of tools to manage trading accounts, place orders, retrieve positions, and interact with the trading platform. The server supports multiple client implementations including Agno framework, Google ADK, and a Gradio web interface. The implementation follows the Model Context Protocol (MCP) for standardized communication and can be used to build AI trading assistants.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose this MCP server if you need AI-powered interaction with a Zerodha trading account and want multiple client options including web interfaces.
When NOT to choose this
Don't choose this if you're using a different brokerage platform, as it's specifically designed for Zerodha and won't work with other trading services.
Tools this server exposes
12 tools extracted from the READMEget_login_urlGet the login URL for user authentication
get_access_tokenGenerate access token using request token
get_user_profileGet user's Zerodha profile information
get_marginsGet available margins and fund details
get_holdingsGet portfolio holdings
get_positionsGet current positions
get_ordersGet all orders for the day
get_order_historyGet history of a specific order
get_order_tradesGet trades generated by an order
place_orderPlace a new order
modify_orderModify an existing order
cancel_orderCancel an order
Comparable tools
Installation
Installation
- Clone the repository:
git clone https://github.com/mtwn105/zerodha-mcp-server-client.git
cd zerodha-mcp-server-client- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
cp .env.example .env
# Edit .env with your credentialsClaude Desktop Configuration
Add to your Claude Desktop config.json:
{
"mcpServers": {
"zerodha": {
"command": "python",
"args": ["/path/to/zerodha-mcp-server-client/server.py"],
"env": {
"ZERODHA_API_KEY": "your_api_key",
"ZERODHA_API_SECRET": "your_api_secret",
"PORT": "8001"
}
}
}
}FAQ
- What APIs are required to use this MCP server?
- You need a Zerodha trading account with Personal API access, plus either an OpenAI API key (for Agno Agent) or a Gemini API key/Application Default Credentials (for Google ADK Agent).
- How do I connect different clients to the MCP server?
- The server supports multiple connection methods - you can use environment variables, command-line arguments, or configure through the provided .env file. Each client (Agno, Google ADK, Gradio) has specific connection steps detailed in the README.
Compare zerodha-mcp with
Last updated · Auto-generated from public README + GitHub signals.