Kite MCP Server

SSE

by rhnvrm

280 270 downloads Not rated yet MIT license

About

Kite MCP Server is a Go-based Model Context Protocol (MCP) server that provides AI assistants with secure access to the Kite Connect trading API. It enables AI agents to retrieve market data, manage portfolios, and execute trades through a standardized interface, targeting…

Details

Transport
SSE
License
MIT license

Explore

- 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 management
- Market Data Access: Real-time quotes, historical data, OHLC data
- Pagination Support: Automatic pagination for large datasets (holdings, orders, trades)
- Comprehensive Coverage: Implements most Kite Connect API endpoints
- Multiple Deployment Modes: stdio, HTTP, SSE, and hybrid mode (production)
- Built-in Documentation: Auto-served documentation at runtime

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Kite MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

- For hosted version (recommended): Nothing! Just use https://mcp.kite.trade/mcp
- For self-hosting: Go 1.21 or later
- For self-hosting: Valid Kite Connect API credentials


- Claude Desktop (Hosted Mode) - Recommended
- Claude Desktop (HTTP Mode) - Recommended
- Claude Desktop (SSE Mode)
- Claude Desktop (stdio Mode)
- Other MCP Clients

- login - Login to Kite API and generate authorization link

This project includes a Nix flake for consistent development environments:

bash

Requirements:

- Go 1.23+ with GOEXPERIMENT=synctest (required for timing-dependent tests)

``bash

| Environment Variable | Default | Description |
| -------------------- | ----------- | ---------------------------------------------------------- |
|
KITE_API_KEY | Required | Your Kite Connect API key |
|
KITE_API_SECRET | Required | Your Kite Connect API secret |
|
APP_MODE | http | Server mode: stdio, http, sse, or hybrid |
|
APP_PORT | 8080 | Server port (HTTP/SSE/hybrid modes) |
|
APP_HOST | localhost | Server host (HTTP/SSE/hybrid modes) |
|
EXCLUDED_TOOLS | _(empty)_ | Comma-separated list of tools to exclude from registration |

Note: In production, we use hybrid mode which supports both /sse and /mcp` endpoints, making both HTTP and SSE protocols available for different client needs.

cancel_order

Cancel an existing order

delete_gtt_order

Delete an existing GTT (Good Till Triggered) order

get_gtts

Get all active GTT orders. Supports pagination for large datasets.

get_historical_data

Get historical price data for an instrument

get_holdings

Get holdings for the current user. Supports pagination for large datasets.

get_ltp

Get latest trading prices for a list of instruments

get_margins

Get margins

get_mf_holdings

Get all mutual fund holdings. Supports pagination for large datasets.

get_ohlc

Get OHLC (Open, High, Low, Close) data for a list of instruments

get_order_history

Get order history for a specific order

get_order_trades

Get trades for a specific order

get_orders

Get all orders. Supports pagination for large datasets.

get_positions

Get current positions. Supports pagination for large datasets.

get_profile

Retrieve the user's profile information, including user ID, name, email, and account details like products orders, and exchanges available to the user. Use this to get basic user details.

get_quotes

Get market data quotes for a list of instruments

get_trades

Get trading history. Supports pagination for large datasets.

login

Login to Kite API. This tool helps you log in to the Kite API. If you are starting off a new conversation call this tool before hand. Call this if you get a session error. Returns a link that the user should click to authorize access, present as markdown if your client supports so that they can click it easily when rendered.

modify_gtt_order

Modify an existing GTT (Good Till Triggered) order

modify_order

Modify an existing order

place_gtt_order

Place a GTT (Good Till Triggered) order

place_order

Place an order

search_instruments

Search instruments. Supports pagination for large result sets.

You can exclude specific tools by setting the EXCLUDED_TOOLS environment variable with a comma-separated list of tool names. This is useful for creating read-only instances.

Example:

EXCLUDED_TOOLS=place_order,modify_order,cancel_order

The hosted version at mcp.kite.trade excludes potentially destructive trading operations for security. For accessing the other operations you can generate your own API keys and run the server locally.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

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

McpServers

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

A Model Context Protocol (MCP) server that provides AI assistants with secure access to the Kite Connect trading API. This server enables AI agents to retrieve market data, manage portfolios, and execute trades through a standardized interface.

TL;DR for Traders

Want to use AI with your Kite trading account? Just add https://mcp.kite.trade/mcp to your AI client configuration. No installation or API keys required - it's hosted and ready to use.

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 management
- Market Data Access: Real-time quotes, historical data, OHLC data
- Pagination Support: Automatic pagination for large datasets (holdings, orders, trades)
- Comprehensive Coverage: Implements most Kite Connect API endpoints
- Multiple Deployment Modes: stdio, HTTP, SSE, and hybrid mode (production)
- Built-in Documentation: Auto-served documentation at runtime

Quick Start

Hosted Version (Recommended)

The easiest way to get started is with our hosted version at mcp.kite.trade. Both /mcp and /sse endpoints are available - no installation or API keys required on your end.

Quick Setup: Add the following to your MCP configuration:

https://mcp.kite.trade/mcp

Recommended: Use the new HTTP mode (/mcp endpoint) for better performance and reliability. You can use mcp-remote to connect to the hosted server.

For self-hosting with your own API keys, follow the installation steps below.

Prerequisites

- For hosted version (recommended): Nothing! Just use https://mcp.kite.trade/mcp
- For self-hosting: Go 1.21 or later
- For self-hosting: Valid Kite Connect API credentials

Getting started

git clone https://github.com/zerodha/kite-mcp-server
cd kite-mcp-server

Configuration

Create a .env file with your Kite Connect credentials:

KITE_API_KEY=your_api_key
KITE_API_SECRET=your_api_secret
APP_MODE=http
APP_PORT=8080
APP_HOST=localhost

You can also use the provided justfile to initialize the config.

just init-env

Running the Server

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.

Videos about Kite MCP Server

Relevant YouTube tutorials, setups, and demos