kite-mcp-server

Last updated: January 03, 2026

An MCP server that gives AI assistants secure access to Zerodha's Kite Connect trading API. It lets AI agents retrieve market data, manage portfolios, and execute trades through a standardized protocol. Built at Zerodha and hosted at mcp.kite.trade for anyone with a Kite account to use.

What is MCP?

Model Context Protocol is a standard for connecting AI assistants to external tools and data sources. Instead of each AI app building custom integrations, MCP provides a common interface. Think of it like USB for AI tools: one protocol, many capabilities.

For trading, this means you can connect Claude, Cursor, or any MCP-compatible client to your Kite account and interact with markets through natural language.

Features

  • Portfolio management: View holdings, positions, margins, and mutual fund investments
  • Order management: Place, modify, and cancel orders with full order history
  • GTT orders: Good Till Triggered order creation and management
  • Market data: Real-time quotes, LTP, OHLC, and historical price data
  • Instrument search: Look up trading instruments across exchanges
  • Pagination: Automatic pagination for large datasets
  • Multiple deployment modes: stdio, HTTP, SSE, and hybrid (production)
  • Tool exclusion: Disable specific tools (e.g., create a read-only instance by excluding order placement)

Available Tools

The server exposes 20+ tools organized by domain:

CategoryTools
Authlogin
Market Dataget_quotes, get_ltp, get_ohlc, get_historical_data, search_instruments
Portfolioget_profile, get_margins, get_holdings, get_positions, get_mf_holdings
Ordersplace_order, modify_order, cancel_order, get_orders, get_trades, get_order_history, get_order_trades
GTTget_gtts, place_gtt_order, modify_gtt_order, delete_gtt_order

Quick Start

The fastest way to get started is with the hosted version. No installation needed:

{
  "mcpServers": {
    "kite": {
      "command": "npx",
      "args": ["mcp-remote", "https://mcp.kite.trade/mcp"]
    }
  }
}

Add that to your Claude Desktop config and you're set. Authentication happens through Kite's OAuth flow when you first connect.

For self-hosting, clone the repo and configure your Kite Connect API credentials:

git clone https://github.com/zerodha/kite-mcp-server
cd kite-mcp-server
cp .env.example .env  # add your KITE_API_KEY and KITE_API_SECRET
go build -o kite-mcp-server && ./kite-mcp-server

Tech Stack

  • Go with the Kite Connect Go client
  • MCP protocol implementation supporting stdio, HTTP, and SSE transports
  • Nix flake + direnv for reproducible dev environments
  • Just for build commands
  • synctest for deterministic timing tests (no flaky CI)

Configuration

VariableDefaultDescription
KITE_API_KEYrequiredKite Connect API key
KITE_API_SECRETrequiredKite Connect API secret
APP_MODEhttpstdio, http, sse, or hybrid
APP_PORT8080Server port
EXCLUDED_TOOLS(empty)Comma-separated tools to disable

Production runs in hybrid mode, serving both /mcp and /sse endpoints so clients can pick whichever transport they prefer.