MCP Catalogs
Homezerodha-mcp screenshot

zerodha-mcp

by mtwn105·30·Score 35

A Python-based MCP server for Zerodha trading with interactive chat interface and multi-agent support.

financeai-llmproductivity
11
Forks
2
Open issues
13 mo ago
Last commit
2d ago
Indexed

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:

you:Building AI-powered trading assistants for Zerodha users
you:Automating trading operations through natural language commands
you:Creating web-based trading interfaces with AI capabilities
you:What APIs are required to use this MCP server?
you:How do I connect different clients to the MCP server?

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 README
  • get_login_url

    Get the login URL for user authentication

  • get_access_token

    Generate access token using request token

  • get_user_profile

    Get user's Zerodha profile information

  • get_margins

    Get available margins and fund details

  • get_holdings

    Get portfolio holdings

  • get_positions

    Get current positions

  • get_orders

    Get all orders for the day

  • get_order_history

    Get history of a specific order

  • get_order_trades

    Get trades generated by an order

  • place_order

    Place a new order

  • modify_order

    Modify an existing order

  • cancel_order

    Cancel an order

Comparable tools

mcp-server-alpacatradingview-mcpibkr-mcppython-brokerage-apiclaude-trading-plugin

Installation

Installation

  1. Clone the repository:
git clone https://github.com/mtwn105/zerodha-mcp-server-client.git
cd zerodha-mcp-server-client
  1. Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Set up environment variables:
cp .env.example .env
# Edit .env with your credentials

Claude 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

GitHub →

Last updated · Auto-generated from public README + GitHub signals.