Planned future enhancement for sending order confirmations and alerts related to Zerodha trading activities
Enables programmatic stock trading on Zerodha using the KiteConnect API, allowing buy/sell operations with specified symbols, exchanges, quantities, and prices
📈 KiteMCP – Zerodha Trading via MCP
KiteMCP is a command-based Zerodha trading system built using the KiteConnect API, Bun, and the Model Context Protocol (MCP). It allows real-time stock buy/sell operations through MCP command calls from a local server, currently integrated with Claude or any compatible tool interface.
🚀 Features
- 🔄 Buy and sell stocks programmatically via commands
- 🛠 Modular MCP tool structure (
buy-stock
,sell-stock
) - 🔐 Secure API key handling via
.env
- ✅ Schema validation using Zod
- ⚙️ Fast runtime with Bun and TypeScript
- 🧪 Local test environment with log outputs
🔧 Setup Instructions
1. Clone the Repository
2. Install Dependencies (using Bun)
3. Configure Environment Variables
Create a .env
file in the root:
4. Start the MCP Server
📸 Screenshots
Claude AI making transaction
Zerodha server
📥 Example Command Usage
Send the following JSON to the server via terminal or Claude:
✅ Input Validation
All tool inputs are validated using Zod for:
- Required fields:
symbol
,exchange
,quantity
- Type and range checks
- Custom error messages on invalid input
🧪 Example Output
🛡️ Security Notes
- Do not expose your
.env
file in production - Add rate limiting and request authentication if going public
- Store order logs securely
📌 Future Enhancements
- 🌐 Deploy on cloud with webhook interface
- 📊 Add portfolio view and PnL tracking
- 🔔 Telegram/email alerts for order confirmations
- 🧠 Auto-trading with strategy modules
👨💻 Author
Utkarsh Agarwal
GitHub • LinkedIn
📜 License
MIT License © 2025 Utkarsh Agarwal
This server cannot be installed
A command-based MCP server that enables programmatic stock trading on Zerodha through natural language interfaces like Claude, allowing users to buy and sell stocks via API calls.
Related MCP Servers
- -securityAlicense-qualityIntegrates Zerodha's trading platform with Claude AI using the Multi-Cloud Plugin framework, allowing users to interact with their Zerodha trading account directly through Claude for stock trading and mutual fund operations.Last updated -40PythonMIT License
- -securityAlicense-qualityA Model Context Protocol server that enables AI models to interact with the Zerodha trading platform, allowing users to execute trades, view portfolio holdings, and manage positions through a standardized interface.Last updated -2TypeScriptMIT License
- -securityFlicense-qualityImplements a Model Context Protocol server that connects with Zerodha Kite API, allowing users to buy/sell stocks and retrieve holdings and positions information.Last updated -1TypeScript
- AsecurityFlicenseAqualityA Node.js-based trading bot that integrates with the Zerodha platform to provide automated stock trading operations through MCP tools including session management, buy/sell operations, and portfolio tracking.Last updated -6JavaScript