A Model Context Protocol (MCP) server that provides tools for interacting with the Zerodha trading platform. This server enables AI assistants to place stock orders, view holdings, and manage mutual fund investments through Zerodha's API.
🎯 Features
Trading Tools
💹 This is code for Zerodha MCP — you can use it to trade live on the Indian Stock Market 🇮🇳📈💰
Place Stock Orders - Execute buy/sell orders on NSE and BSE
View Holdings - Get current stock portfolio holdings
Mutual Fund SIPs - View active Systematic Investment Plans
Mutual Fund Holdings - Check mutual fund portfolio (experimental)
Authentication
Zerodha Login - Secure OAuth-based authentication
Token Management - Automatic token storage and refresh
Session Handling - Persistent login sessions
Technical Features
TypeScript - Full type safety across the codebase
MCP Protocol - Standardized AI assistant integration
⏱️ Rate Limits - Respect Zerodha's API rate limits
🕐 Market Hours - Some functions only work during trading hours
🏦 Account Type - Requires a Zerodha trading account
🔧 Troubleshooting
🚨 Common Issues
🔐 Authentication Errors
# Check if tokens are valid
cat config/tokens.json
# Re-authenticate if needed
# Use login-to-zerodha tool
⚠️ API Errors
🔑 Verify API credentials in .env
🏦 Check Zerodha account status
⏰ Ensure market hours for trading functions
🌐 Network Issues
📡 Check internet connection
🏢 Verify Zerodha API status
📝 Review error logs for details
🤖 Claude MCP Connection Issues
🔍 Server Not Found: Ensure the working directory path is correct
🛠️ Command Not Found: Make sure bun is installed and in PATH
🔐 Authentication Failed: Check environment variables are set correctly
⏰ Token Expired: Re-authenticate using the login flow
🚫 Permission Denied: Ensure the project folder has proper read/write permissions
🤝 Contributing
🍴 Fork the repository
🌿 Create a feature branch (git checkout -b feature/new-tool)
⚙️ Implement your changes
🛡️ Add proper error handling
📚 Update documentation
📤 Submit a pull request
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
⚠️ Disclaimer
This software is for educational and personal use only. Trading involves substantial risk of loss and is not suitable for all investors. The developers are not responsible for any financial losses incurred through the use of this software. 🛡️
🆘 Support
🐛 Issues - Report bugs via GitHub Issues
📚 Documentation - Check this README and code comments
🏢 Zerodha Support - Contact Zerodha for API-related issues
🙏 Acknowledgments
🏢 Zerodha - Trading platform and API
🤖 MCP SDK - Model Context Protocol implementation
🔒 TypeScript - Type safety and development experience
Made by Manik Lakhanpal 🔥
Z
Zerodha
ManikLakhanpal·4 Sterne·
💹 This is code for Zerodha MCP — you can use it to trade live on the Indian Stock Market 🇮🇳📈💰
Noch keine Tool-Liste. Remote-Server erhalten eine nach dem ersten Health-Check.
FAQ
Fragen
Wie installiere ich Zerodha?
Kopieren Sie auf dieser Seite die stdio-Konfiguration für Cursor, Claude Desktop, Claude Code oder VS Code. Sie nutzt die Installation des Herausgebers, keinen PlugMCP-Proxy.
Benötigt Zerodha einen API-Schlüssel?
In diesem Eintrag ist keine erforderliche Umgebungsvariable aufgeführt.
Welchen Transport verwendet Zerodha?
Zerodha läuft lokal über stdio.
Wann wurde Zerodha zuletzt geprüft?
Zuletzt geprüft: 2026-10-28. 💹 This is code for Zerodha MCP — you can use it to trade live on the Indian Stock Market 🇮🇳📈💰