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
Related MCP server: Zerodha Trading MCP
π§ 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,quantityType and range checks
Custom error messages on invalid input
π§ͺ Example Output
π‘οΈ Security Notes
Do not expose your
.envfile in productionAdd 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