Labsco
AStheTECH logo

MewCP Kite MCP

from AStheTECH

Hosted, Stateless & Multitenant Kite MCP server enables AI assistants to access market data, manage portfolios, and execute trading operations through Zerodha Kite.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedFreeQuick setup

Trade smarter with Zerodha Kite β€” orders, positions, holdings, and live market data via MCP.

A Model Context Protocol (MCP) server that exposes Zerodha Kite Connect's API for trading, portfolio management, and market data retrieval.

Overview

The Kite Connect MCP Server provides full access to Zerodha's trading platform:

  • Place, modify, and cancel equity and derivatives orders
  • Fetch real-time quotes, historical candlestick data, and instrument lists
  • Monitor positions, holdings, margins, and user profile

Perfect for:

  • Automating trading workflows through an AI assistant
  • Building portfolio monitoring and analysis pipelines
  • Querying live and historical market data programmatically

Tools

<details> <summary><code>kite_place_order</code> β€” Place an order on Zerodha Kite</summary>

Place a market, limit, SL, or SL-M order for any NSE/BSE/NFO/MCX instrument.

Inputs:

- `tradingsymbol` (string, required) β€” Trading symbol (e.g., 'INFY', 'RELIANCE')
- `exchange` (string, required) β€” Exchange: NSE, BSE, NFO, MCX
- `transaction_type` (string, required) β€” BUY or SELL
- `quantity` (integer, required) β€” Number of shares/units (min 1)
- `order_type` (string, optional) β€” MARKET, LIMIT, SL, SL-M (default: MARKET)
- `product` (string, optional) β€” MIS (intraday), CNC (delivery), NRML (overnight) (default: MIS)
- `price` (float, optional) β€” Price for LIMIT orders
- `validity` (string, optional) β€” DAY or IOC (default: DAY)
- `disclosed_quantity` (integer, optional) β€” Disclosed quantity
- `trigger_price` (float, optional) β€” Trigger price for SL/SL-M orders
- `tag` (string, optional) β€” Tag for order tracking

Output:

{
  "success": true,
  "order_id": "230914000012345",
  "status": "placed",
  "message": "Order placed successfully. Order ID: 230914000012345"
}
</details> <details> <summary><code>kite_get_orders</code> β€” Get all orders for the user</summary>

Returns all orders for the session including status, quantity, price, and timestamps.

Inputs:

(none)

Output:

{
  "success": true,
  "count": 2,
  "orders": [
    {
      "order_id": "230914000012345",
      "tradingsymbol": "INFY",
      "status": "COMPLETE",
      "transaction_type": "BUY",
      "quantity": 10,
      "filled_quantity": 10,
      "average_price": 1452.5,
      "order_timestamp": "2023-09-14 10:32:00"
    }
  ]
}
</details> <details> <summary><code>kite_cancel_order</code> β€” Cancel an existing order</summary>

Cancel a pending order by its order ID.

Inputs:

- `order_id` (string, required) β€” Order ID to cancel
- `variety` (string, optional) β€” Order variety: regular, co, amo, iceberg (default: regular)

Output:

{
  "success": true,
  "order_id": "230914000012345",
  "status": "cancelled",
  "message": "Order 230914000012345 cancelled successfully"
}
</details> <details> <summary><code>kite_get_positions</code> β€” Get all open positions</summary>

Returns day and net positions with P&L, buy/sell prices, and M2M values.

Inputs:

(none)

Output:

{
  "success": true,
  "day_positions": [
    { "tradingsymbol": "INFY", "quantity": 10, "pnl": 250.0, "buy_price": 1450.0, "sell_price": 0.0 }
  ],
  "net_positions": [
    { "tradingsymbol": "INFY", "quantity": 10, "pnl": 250.0, "unrealised": 250.0, "m2m": 250.0 }
  ]
}
</details> <details> <summary><code>kite_get_holdings</code> β€” Get delivery portfolio holdings</summary>

Returns all long-term holdings with average price, last price, and P&L.

Inputs:

(none)

Output:

{
  "success": true,
  "count": 3,
  "holdings": [
    {
      "tradingsymbol": "RELIANCE",
      "quantity": 5,
      "average_price": 2400.0,
      "last_price": 2520.0,
      "pnl": 600.0,
      "day_change_percentage": 0.85
    }
  ]
}
</details> <details> <summary><code>kite_get_quote</code> β€” Get real-time market quotes</summary>

Fetch live quotes for one or more instruments including last price, volume, and circuit limits.

Inputs:

- `instruments` (string, required) β€” Comma-separated instrument symbols (e.g., 'NSE:INFY,NSE:RELIANCE')

Output:

{
  "success": true,
  "count": 1,
  "quotes": {
    "NSE:INFY": {
      "last_price": 1452.5,
      "volume": 1234567,
      "change": 12.5,
      "upper_circuit": 1597.75,
      "lower_circuit": 1307.25,
      "timestamp": "2023-09-14 15:29:59"
    }
  }
}
</details> <details> <summary><code>kite_get_historical_data</code> β€” Get historical candlestick data</summary>

Fetch OHLCV candlestick data for any instrument over a date range and interval. Returns up to 100 candles.

Inputs:

- `instrument_token` (string, required) β€” Instrument token (use kite_get_instruments to find tokens)
- `from_date` (string, required) β€” Start date (YYYY-MM-DD)
- `to_date` (string, required) β€” End date (YYYY-MM-DD)
- `interval` (string, optional) β€” minute, day, 5minute, 15minute, 30minute, 60minute (default: day)

Output:

{
  "success": true,
  "count": 5,
  "interval": "day",
  "data": [
    { "date": "2023-09-14", "open": 1440.0, "high": 1460.0, "low": 1435.0, "close": 1452.5, "volume": 1234567 }
  ]
}
</details> <details> <summary><code>kite_get_instruments</code> β€” Get tradable instrument list</summary>

Returns instruments available for trading, optionally filtered by exchange. Returns up to 1000 results.

Inputs:

- `exchange` (string, optional) β€” Filter by exchange: NSE, BSE, NFO, MCX, CDS
- `limit` (integer, optional) β€” Maximum results to return, 1–1000 (default: 100)

Output:

{
  "success": true,
  "count": 100,
  "exchange": "NSE",
  "instruments": [
    { "tradingsymbol": "INFY", "instrument_token": "408065", "exchange": "NSE", "segment": "NSE", "name": "INFOSYS" }
  ]
}
</details> <details> <summary><code>kite_get_profile</code> β€” Get user profile</summary>

Returns the authenticated user's profile including name, email, phone, and enabled exchanges and products.

Inputs:

(none)

Output:

{
  "success": true,
  "user_id": "AB1234",
  "user_name": "John Doe",
  "user_type": "individual",
  "email": "john@example.com",
  "phone": "9876543210",
  "exchanges": ["NSE", "BSE", "NFO"],
  "products": ["CNC", "MIS", "NRML"],
  "order_types": ["MARKET", "LIMIT", "SL", "SL-M"]
}
</details> <details> <summary><code>kite_get_margins</code> β€” Get account margins</summary>

Returns available, utilized, and total margins for equity and commodity segments.

Inputs:

(none)

Output:

{
  "success": true,
  "equity": { "available": { "cash": 50000.0 }, "utilised": { "debits": 12000.0 } },
  "commodity": { "available": { "cash": 10000.0 }, "utilised": { "debits": 0.0 } }
}
</details> <details> <summary><code>kite_health_check</code> β€” Check server readiness</summary>

Returns server status and supported capability list. Does not require credentials.

Inputs:

(none)

Output:

{
  "status": "ok",
  "server": "CL Kite Connect MCP Server",
  "type": "third-party-integration",
  "auth_required": true,
  "supports": ["orders", "positions", "holdings", "quotes", "historical_data"]
}
</details>

API Parameters Reference

<details> <summary><strong>Order Types</strong></summary>
  • MARKET β€” Execute immediately at the best available price
  • LIMIT β€” Execute at a specified price or better; requires price
  • SL β€” Stop-loss limit order; requires both trigger_price and price
  • SL-M β€” Stop-loss market order; requires trigger_price only
</details> <details> <summary><strong>Product Codes</strong></summary>
  • MIS β€” Margin Intraday Square-off; must be closed before market end
  • CNC β€” Cash and Carry; for delivery/long-term holding
  • NRML β€” Normal; for overnight F&O positions
</details> <details> <summary><strong>Instrument Token</strong></summary>

Finding a token:

Use kite_get_instruments with the exchange filter, then read the instrument_token field.
Example: { "tradingsymbol": "INFY", "instrument_token": "408065", "exchange": "NSE" }

Quote symbol format:

{EXCHANGE}:{TRADINGSYMBOL}
Example: NSE:INFY
</details>

Getting Your Kite Connect Credentials

<details> <summary><strong>Steps</strong></summary>
  1. Go to Kite Connect Developer Console
  2. Create an app to get your API Key and API Secret
  3. Complete the login flow to obtain an Access Token (valid for one trading day)
  4. Both api_key and access_token are required β€” provide them as static credential fields
</details>