Kite Connect MCP
v0.2.0Zerodha Kite Connect v3 for AI agents: orders (dry-run by default), GTT, alerts, portfolio, quotes
Values you need
| Variable | What it is | |
|---|---|---|
KITE_API_KEY | required secret | API key of your Kite Connect app (developers.kite.trade) |
KITE_API_SECRET | optional secret | API secret of your Kite Connect app, needed for the daily login (or use KITE_API_SECRET_FILE) |
KITE_MCP_AUTH_MODE | optional | managed (this server owns the daily login) or external (read a token file another program writes) Default: managed |
KITE_TOKEN_FILE | optional | Path of the access-token file (default: ~/.local/state/kite-connect-mcp/access_token.json) |
KITE_MCP_TRADING_MODE | optional | dry_run (default: writes are only previewed) or live (writes need a confirmation token) Default: dry_run |
KITE_MCP_READ_ONLY | optional | true hides every tool that can change the account Default: false |
PyPI (uvx) discovery passed
Requires uv (https://docs.astral.sh/uv/)
Run in a terminal
claude mcp add kite-connect-mcp -e 'KITE_API_KEY=<KITE_API_KEY>' -- uvx kite-connect-mcp==0.2.0 serveAdd to
claude_desktop_config.json{
"mcpServers": {
"kite-connect-mcp": {
"args": [
"kite-connect-mcp==0.2.0",
"serve"
],
"command": "uvx",
"env": {
"KITE_API_KEY": "<KITE_API_KEY>"
}
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"kite-connect-mcp": {
"args": [
"kite-connect-mcp==0.2.0",
"serve"
],
"command": "uvx",
"env": {
"KITE_API_KEY": "<KITE_API_KEY>"
}
}
}
}Add to
.vscode/mcp.json{
"inputs": [
{
"description": "KITE_API_KEY",
"id": "kite-api-key",
"password": true,
"type": "promptString"
}
],
"servers": {
"kite-connect-mcp": {
"args": [
"kite-connect-mcp==0.2.0",
"serve"
],
"command": "uvx",
"env": {
"KITE_API_KEY": "${input:kite-api-key}"
},
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.kite-connect-mcp]
command = "uvx"
args = ["kite-connect-mcp==0.2.0", "serve"]
env = { "KITE_API_KEY" = "<KITE_API_KEY>" }For AI agents
- Ask the user for: KITE_API_KEY. Never invent or guess these values; secrets go into the client config, not into chat logs.
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: session_status, login, complete_login, logout, get_profile, get_margins, get_orders, get_order_history, ….
- If it fails, check that the required runtime is installed (uv (https://docs.astral.sh/uv/)) and that the values above are set.
Machine-readable: install.md · manifest.json