JUHE API Marketplace
utkarshagar2121 avatar
MCP Server

KiteMCP

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.

0
GitHub Stars
11/22/2025
Last Updated
No Configuration
Please check the documentation below.
  1. Home
  2. MCP Servers
  3. KiteMCP

README Documentation

๐Ÿ“ˆ 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

git clone https://github.com/your-username/zerodha-trade
cd zerodha-trade

2. Install Dependencies (using Bun)

bun install

3. Configure Environment Variables

Create a .env file in the root:

KITE_API_KEY=your_api_key
KITE_API_SECRET=your_api_secret
ACCESS_TOKEN=your_access_token

4. Start the MCP Server

bun index.ts

๐Ÿ“ธ Screenshots

Claude AI making transaction

MCP Command Demo

Zerodha server

MCP Command Demo

๐Ÿ“ฅ Example Command Usage

Send the following JSON to the server via terminal or Claude:

{
  "id": "1",
  "action": "call_tool",
  "tool": "buy-stock",
  "arguments": {
    "symbol": "RELIANCE",
    "exchange": "NSE",
    "quantity": 10,
    "price": 2800
  }
}

โœ… 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

{
  "status": "success",
  "message": "Buy order placed for RELIANCE at โ‚น2800"
}

๐Ÿ›ก๏ธ 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

Quick Actions

View on GitHubView All Servers

Key Features

Model Context Protocol
Secure Communication
Real-time Updates
Open Source

Boost your projects with Wisdom Gate LLM API

Supporting GPT-5, Claude-4, DeepSeek v3, Gemini and more.

Enjoy a free trial and save 20%+ compared to official pricing.

Learn More
JUHE API Marketplace

Accelerate development, innovate faster, and transform your business with our comprehensive API ecosystem.

JUHE API VS

  • vs. RapidAPI
  • vs. API Layer
  • API Platforms 2025
  • API Marketplaces 2025
  • Best Alternatives to RapidAPI

For Developers

  • Console
  • Collections
  • Documentation
  • MCP Servers
  • Free APIs
  • Temp Mail Demo

Product

  • Browse APIs
  • Suggest an API
  • Wisdom Gate LLM
  • Global SMS Messaging
  • Temp Mail API

Company

  • What's New
  • Welcome
  • About Us
  • Contact Support
  • Terms of Service
  • Privacy Policy
Featured on Startup FameFeatured on Twelve ToolsFazier badgeJuheAPI Marketplace - Connect smarter, beyond APIs | Product Huntai tools code.marketDang.ai
Copyright ยฉ 2025 - All rights reserved