Zerodha MCP Server
Zerodha MCP-Server
Fragen Sie Ihr Zerodha-Handelskonto über MCP (Model Context Protocol) ab. Funktioniert mit Claude Code, Claude Desktop, Cursor und anderen MCP-kompatiblen KI-Tools.
Verfügbare Tools
Tool | Beschreibung |
| Verfügbares Guthaben und Margen |
| Langfristige Demat-Bestände |
| Intraday/F&O-Positionen mit GuV |
| Auftragshistorie von heute |
| Zusammenfassung der kombinierten GuV |
| Letzter gehandelter Preis eines Instruments |
| OHLC-Daten eines Instruments |
| Historische GuV-Zusammenfassung für einen Datumsbereich (max. 3 Monate) |
| Tägliche GuV-Aufschlüsselung für einen Datumsbereich (max. 3 Monate) |
Related MCP server: Trade-MCP
Installation
git clone https://github.com/anish5256/zerodha-mcp.git
cd zerodha-mcp
pip install -e .Konfiguration
Umgebungsvariablen
Der Server benötigt diese Umgebungsvariablen für die Authentifizierung:
Variable | Beschreibung |
| Ihre Zerodha-Client-ID (z. B. |
| Ihr Zerodha-Anmeldepasswort |
| Ihr TOTP-Geheimschlüssel (32-stellige Base32-Zeichenfolge) |
Abrufen Ihres TOTP-Schlüssels
Ihr TOTP-Geheimschlüssel ist der 32-stellige Code, den Sie bei der Einrichtung der 2FA in Google Authenticator/Authy verwendet haben. Er sieht so aus: ABCD1234EFGH5678IJKL9012MNOP3456
Wenn Sie ihn nicht gespeichert haben, setzen Sie die 2FA in der Zerodha Console zurück, um einen neuen zu erhalten.
Einrichtung nach Plattform
Claude Code (CLI)
Fügen Sie dies zu ~/.mcp.json hinzu:
{
"mcpServers": {
"zerodha": {
"command": "python",
"args": ["/path/to/zerodha-mcp/server.py"],
"env": {
"ZERODHA_USER_ID": "YOUR_USER_ID",
"ZERODHA_PASSWORD": "YOUR_PASSWORD",
"ZERODHA_TOTP_KEY": "YOUR_TOTP_SECRET"
}
}
}
}Starten Sie anschließend Claude Code neu.
Claude Desktop (macOS)
Bearbeiten Sie ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"zerodha": {
"command": "python",
"args": ["/path/to/zerodha-mcp/server.py"],
"env": {
"ZERODHA_USER_ID": "YOUR_USER_ID",
"ZERODHA_PASSWORD": "YOUR_PASSWORD",
"ZERODHA_TOTP_KEY": "YOUR_TOTP_SECRET"
}
}
}
}Starten Sie anschließend Claude Desktop neu.
Claude Desktop (Windows)
Bearbeiten Sie %APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"zerodha": {
"command": "python",
"args": ["C:\\path\\to\\zerodha-mcp\\server.py"],
"env": {
"ZERODHA_USER_ID": "YOUR_USER_ID",
"ZERODHA_PASSWORD": "YOUR_PASSWORD",
"ZERODHA_TOTP_KEY": "YOUR_TOTP_SECRET"
}
}
}
}Starten Sie anschließend Claude Desktop neu.
Cursor
Fügen Sie dies zu den MCP-Einstellungen von Cursor hinzu (Settings > MCP):
{
"zerodha": {
"command": "python",
"args": ["/path/to/zerodha-mcp/server.py"],
"env": {
"ZERODHA_USER_ID": "YOUR_USER_ID",
"ZERODHA_PASSWORD": "YOUR_PASSWORD",
"ZERODHA_TOTP_KEY": "YOUR_TOTP_SECRET"
}
}
}Andere MCP-Clients
Für jeden MCP-kompatiblen Client konfigurieren Sie:
Befehl:
pythonArgumente:
["/path/to/zerodha-mcp/server.py"]Umgebungsvariablen:
ZERODHA_USER_ID= Ihre Client-IDZERODHA_PASSWORD= Ihr PasswortZERODHA_TOTP_KEY= Ihr TOTP-Geheimschlüssel
Anwendungsbeispiele
Sobald die Konfiguration abgeschlossen ist, fragen Sie Ihren KI-Assistenten:
"Wie hoch ist mein aktueller Portfoliowert?"
"Zeige mir meine offenen Positionen"
"Wie hoch ist meine GuV für heute?"
"Wie viel Guthaben habe ich zur Verfügung?"
"Was ist der LTP von RELIANCE?"
"Hole OHLC für NIFTY 50"
"Wie hoch war mein F&O-Gewinn im Jahr 2024?"
"Zeige mir meine tägliche GuV für den letzten Monat"
Sicherheitshinweise
Ihre Anmeldedaten werden lokal in Ihrer MCP-Konfigurationsdatei gespeichert
Anmeldedaten werden niemals an das KI-Modell gesendet, sondern nur serverseitig verwendet
Token werden lokal in
zerodha_enctoken.txtundzerodha_console_token.txtzwischengespeichert (gitignored)Jeder Benutzer muss seine eigenen Anmeldedaten auf seinem eigenen Computer konfigurieren
Lizenz
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Indian broker accounts for AI agents: positions, holdings, orders, P&L, option chains, 10+ brokers.
OpenFinance gives any AI agent easy trading across every major market through one hosted MCP server. Trade crypto spot and perpetuals on Hyperliquid with market, limit and TWAP orders, leverage and margin control. Trade stocks, indices, commodities, forex and pre-IPO names as Hyperliquid HIP-3 perps. Trade Polymarket prediction markets with odds, order books, positions, PnL and trader leaderboards. Swap and bridge across 40+ EVM chains and Solana with Relay and Jupiter, find memecoins across 200+ chains, launch tokens on Robinhood Chain and Solana, and buy crypto with card, bank or UPI. Write actions are designed to ask for your confirmation first. Connect with OAuth (sign in to OpenFinance and approve) or an API key. Works with Claude, ChatGPT, Cursor, VS Code, Codex and any MCP client. No install. Home: https://openfinance.tech/agents · Docs: https://docs.openfinance.tech · GitHub: https://github.com/openfinance-tech/mcp
Connect brokerage accounts to AI assistants: holdings, orders, asset lookup, and approved trading.
Open-source MCP server for Zerodha Kite Connect. Portfolio, market data, backtesting, alerts.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with the Zerodha trading platform for placing stock orders, viewing portfolio holdings, and managing mutual fund investments. Provides secure OAuth authentication and real-time trading capabilities through Zerodha's official API.1-
- FlicenseNot gradedqualityDmaintenanceEnables trading automation through Zerodha Kite Connect API, allowing users to place buy/sell orders and fetch holdings via MCP tools accessible to Claude Desktop and other MCP-compatible clients.-
- AlicenseNot gradedqualityDmaintenanceEnables natural language management of Zerodha trading accounts, including placing orders, checking portfolio, and viewing positions through MCP integration.32Apache 2.0
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with the Zerodha trading platform for placing stock orders, viewing holdings, and managing mutual fund investments through the MCP protocol.4-