1. Conduid
  2. Finance
  3. Zerodha Kite MCP
MCP server · Finance

Zerodha Kite MCP

MCP server for Zerodha Kite Connect API - India's leading stock broker trading platform. Execute ...

Unclaimed finance
34Low

Scored 6 months ago · breakdown

About Zerodha Kite MCP

Zerodha Kite MCP is an MCP server in the Finance category: mCP server for Zerodha Kite Connect API - India's leading stock broker trading platform. Execute ...

Install

Docker
docker run -i --rm mcp/zerodha-kite

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Zerodha Kite MCP

Powered by Claude · Grounded in docs

I know everything about Zerodha Kite MCP. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.

5 checks have not been run yet.

README

Zerodha Kite Connect MCP Server

Version License MCP

An MCP (Model Context Protocol) server for integrating Zerodha's Kite Connect API with AI assistants like Claude. This server enables AI assistants to execute trades, manage portfolios, and access real-time market data from Indian stock exchanges.

Features

  • Trading Operations: Place, modify, and cancel orders
  • Portfolio Management: View positions, holdings, and margins
  • Market Data: Get real-time quotes and historical data
  • Order Management: Track orders and trades
  • User Information: Access profile and account details

Prerequisites

  1. Zerodha Trading Account: You need an active Zerodha trading account
  2. Kite Connect Developer Account: Register at Kite Connect
  3. API Credentials: Create an app on Kite Connect to obtain:
    • API Key
    • API Secret
  4. 2FA Setup: Enable TOTP-based two-factor authentication on your Zerodha account

Installation

Using Docker (Recommended)

docker pull mcp/zerodha-kite:0.1.0
# or use latest
docker pull mcp/zerodha-kite:latest

From Source

git clone https://github.com/anshuljain90/zerodha-kite-mcp.git
cd zerodha-kite-mcp
npm install
npm run build

Configuration

Environment Variables

Create a .env file with your credentials:

KITE_API_KEY=your_api_key_here
KITE_API_SECRET=your_api_secret_here
KITE_ACCESS_TOKEN=your_access_token_here  # Optional, can be generated at runtime
KITE_REDIRECT_URL=http://localhost:3000/redirect

Docker Desktop Integration

  1. Open Docker Desktop with MCP Toolkit enabled
  2. Import the Zerodha Kite MCP server
  3. Configure your API credentials in the settings
  4. Enable the server and connect it to your AI assistant

Authentication Flow

The Kite Connect API uses OAuth 2.0:

  1. Generate Login URL: Use your API key to create a login URL
  2. User Authorization: User logs in and authorizes the app
  3. Receive Request Token: Get the request token from the redirect
  4. Exchange for Access Token: Use API secret to get access token
  5. API Access: Use access token for all API calls

Available Tools

Trading

  • place_order - Place buy/sell orders
  • modify_order - Modify pending orders
  • cancel_order - Cancel pending orders

Portfolio

  • get_positions - View open positions
  • get_holdings - View demat holdings
  • get_margins - Check available margins

Market Data

  • get_quote - Get real-time quotes
  • get_historical_data - Get historical OHLC data
  • get_instruments - List tradeable instruments
  • get_ltp - Get last traded prices

Order Management

  • get_orders - View all orders
  • get_trades - View executed trades
  • get_order_history - Get order modification history

Account

  • get_profile - Get user profile
  • get_market_status - Check if markets are open

Usage Examples

Place a Market Order

{
  "tool": "place_order",
  "arguments": {
    "exchange": "NSE",
    "tradingsymbol": "RELIANCE",
    "transaction_type": "BUY",
    "quantity": 10,
    "order_type": "MARKET",
    "product": "CNC"
  }
}

Get Current Holdings

{
  "tool": "get_holdings",
  "arguments": {}
}

Get Real-time Quote

{
  "tool": "get_quote",
  "arguments": {
    "exchange": "NSE",
    "tradingsymbol": "INFY"
  }
}

Development

Running Locally

npm run dev

Building

npm run build

Testing

npm test

Linting

npm run lint

Important Notes

  1. Market Hours: Indian markets operate 9:15 AM - 3:30 PM IST on weekdays
  2. Product Types:
    • CNC: Cash and Carry (delivery)
    • MIS: Margin Intraday Square-off
    • NRML: Normal (for F&O)
  3. Order Types:
    • MARKET: Market order
    • LIMIT: Limit order
    • SL: Stop-loss limit
    • SL-M: Stop-loss market
  4. Rate Limits: Be mindful of API rate limits
  5. Security: Never expose API secrets in logs or responses

Docker Build

To build the Docker image locally:

docker build -t zerodha-kite-mcp .

Release Information

  • Current Version: 0.1.0
  • Release Date: 2025-01-24
  • Changelog: See CHANGELOG.md for detailed release notes

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

License

MIT License - see LICENSE file for details

Support

Compliance

This MCP server is for legitimate trading purposes only. Users must comply with SEBI regulations and Zerodha's terms of service. Automated trading may require additional approvals from the exchange.

Disclaimer

This is an unofficial integration. Use at your own risk. The authors are not responsible for any financial losses incurred through the use of this software.

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About Zerodha Kite MCP

How do I install Zerodha Kite MCP?

Run docker run -i --rm mcp/zerodha-kite, then add the server to your MCP client's configuration.

Is Zerodha Kite MCP safe to use with an AI agent?

Its trust score is 34 out of 100 (low). It passes 1 of the 1 static security checks run so far. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Zerodha Kite MCP still maintained?

Conduid hasn't recorded a commit date for this repository yet. Check the repository directly for recent activity.