Zerodha Trading

v1.0.0Finance & Fintechstable

Zerodha MCP Server & Client - AI Agent (w/Agno & w/Google ADK)

agentagentic-aiagnoaiartificial-intelligence
Share:
30
Stars
0
Downloads
0
Weekly
0/5

What is Zerodha Trading?

Zerodha Trading is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to zerodha mcp server & client - ai agent (w/agno & w/google adk)

Zerodha MCP Server & Client - AI Agent (w/Agno & w/Google ADK)

This server falls under the Finance & Fintech category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Zerodha MCP Server & Client - AI Agent (w/Agno & w/Google AD

Use Cases

Trade stocks and derivatives
Access Kite API
Portfolio management
mtwn105

Maintainer

LicenseApache-2.0
Languagepython
Versionv1.0.0
UpdatedApr 8, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y zerodha

Manual Installation

npx -y zerodha

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Zerodha Trading

The Zerodha MCP Server connects AI agents to the Zerodha Kite trading platform via the official KiteConnect API, enabling programmatic access to equity and derivatives trading from within AI workflows. It exposes tools for placing, modifying, and cancelling orders, retrieving portfolio holdings and positions, querying margins, and accessing trade history — all drivable through natural language via agents built with Agno or Google ADK. Traders and developers building AI-powered financial automation on Zerodha's brokerage platform will find this a complete bridge between KiteConnect and MCP-compatible clients.

Prerequisites

  • Python 3.9+ with pip and virtualenv or venv
  • A Zerodha trading account with API access enabled at kite.trade
  • ZERODHA_API_KEY and ZERODHA_API_SECRET from the Kite Connect developer portal
  • An MCP-compatible AI client or agent framework (Agno or Google ADK for the included clients)
  • Optional: OPENAI_API_KEY for Agno agent or GOOGLE_API_KEY for Google ADK agent
1

Clone the repository and set up a virtual environment

Clone the Zerodha MCP repository and create an isolated Python environment for the dependencies.

git clone https://github.com/mtwn105/zerodha-mcp.git
cd zerodha-mcp
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
2

Install dependencies

Install all required Python packages from the requirements file.

pip install -r requirements.txt
3

Configure environment variables

Copy the example .env file and fill in your Zerodha API credentials. Set SERVER_MODE to 'stdio' for MCP client use or 'sse' for agent frameworks.

cp .env.example .env
# Edit .env:
# ZERODHA_API_KEY=your_kite_api_key
# ZERODHA_API_SECRET=your_kite_api_secret
# PORT=8001
# SERVER_MODE=sse
4

Start the MCP server

Launch the Zerodha MCP server. It will start listening for MCP connections on the configured port.

python server.py
5

Connect an agent or MCP client

Run the Agno client to interact with the server through natural language trading commands, or connect any MCP-compatible client.

python client/agno_client.py --host localhost --port 8001

Zerodha Trading Examples

Client configuration

MCP client configuration for the Zerodha server running in SSE mode.

{
  "mcpServers": {
    "zerodha": {
      "url": "http://localhost:8001/mcp",
      "env": {
        "ZERODHA_API_KEY": "your_kite_api_key",
        "ZERODHA_API_SECRET": "your_kite_api_secret"
      }
    }
  }
}

Prompts to try

Natural language trading and portfolio queries you can send via the Agno or ADK agent client.

- "Show me my current portfolio holdings and their current P&L"
- "What are my open positions today?"
- "Place a market order to buy 10 shares of RELIANCE"
- "Cancel order ID 230103000012345"
- "What are my available margins across segments?"
- "Show me my trade history for the last 5 trading sessions"

Troubleshooting Zerodha Trading

Authentication errors from KiteConnect API

Ensure your ZERODHA_API_KEY and ZERODHA_API_SECRET are correct and that your Kite Connect app is active. KiteConnect requires a daily login flow to generate an access token — check the repository's authentication flow documentation for the token refresh process.

Server starts but orders fail with permission errors

Your Kite Connect app subscription must include trading permissions. Verify your app's enabled scopes in the Kite Connect developer portal (kite.trade) and ensure your account is not in a restricted state.

Agno client cannot reach the server

Confirm the server is running (python server.py) and SERVER_MODE=sse is set. Check that MCP_HOST and MCP_PORT in the client match the server's PORT setting. Try curl http://localhost:8001/health to verify the server is listening.

Frequently Asked Questions about Zerodha Trading

What is Zerodha Trading?

Zerodha Trading is a Model Context Protocol (MCP) server that zerodha mcp server & client - ai agent (w/agno & w/google adk) It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Zerodha Trading?

Install via npm with the command: npx -y zerodha. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).

Which AI clients work with Zerodha Trading?

Zerodha Trading works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Zerodha Trading free to use?

Yes, Zerodha Trading is open source and available under the Apache-2.0 license. You can use it freely in both personal and commercial projects.

Browse More Finance & Fintech MCP Servers

Explore all finance & fintech servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "zerodha": { "command": "npx", "args": ["-y", "zerodha"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Zerodha Trading?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides