
MCP Server for Zerodha Kite Connect API
io.github.Sundeepg98由 GitHub 帳號 Sundeepg98 發布v1.2.0更新於 Oct 24, 2026
Open-source MCP server for Zerodha Kite Connect. Portfolio, market data, backtesting, alerts.
發布方自己的服務:Kite
概覽
讓助理連接 Zerodha Kite 交易帳戶,查看持倉與行情、分析選擇權、回測策略、設定警示,並在自行架設時下單。
- 可以做什麼
- 透過 Kite Connect API 提供 110 多個工具:持倉、部位、保證金與損益;報價、歷史K線與技術指標;含 Black-Scholes 希臘值的選擇權鏈;四種回測策略;以及價格、漲跌幅與成交量警示並可經 Telegram 推送。另提供虛擬組合的模擬交易、下單前的 11 項 RiskGuard 檢查、逐次呼叫稽核紀錄,以及自行架設環境中的下單、改單與刪單。
- 適用情境
- 當助理需要處理印度零售交易帳戶時使用:檢視持倉與損益、取得報價與指標、執行策略回測或設定警示。只做分析可選託管唯讀端點;若需要模擬交易與下單,則以自備 Kite 開發者應用程式自行架設。若只需唯讀且零設定,官方 Zerodha MCP 更簡單。
- 執行需求
- 遠端使用只需把 MCP 用戶端指向託管端點,並自備 Kite Connect 開發者應用程式(每月 500 盧比)完成 OAuth。自行架設需要 Docker 或 Go 1.25+,HTTP 部署唯一必填變數是 OAUTH_JWT_SECRET;選用變數包括 KITE_API_KEY、KITE_API_SECRET、KITE_ACCESS_TOKEN、ENABLE_TRADING、TELEGRAM_BOT_TOKEN 與 STRIPE_*。使用 mcp-remote 橋接的用戶端需要 npx(Node.js 18+)。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 MCP Server for Zerodha Kite Connect API,將其新增到工作區。
- 連接 所需的 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
- 為需要使用其工具的對話啟用該服務。
Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。
交給代理程式安裝
把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。
閱讀 https://sourceweft.com/mcp/io.github.Sundeepg98%2Fkite-mcp-server/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。其他 MCP 客戶端
把它新增到你客戶端的 mcpServers 設定中。 客戶端會在首次連接時完成 OAuth 登入。
{
"mcpServers": {
"for-zerodha-kite-connect-api": {
"type": "http",
"url": "https://kite-mcp-server.fly.dev/mcp"
}
}
}README
Kite MCP Server
Give Claude or ChatGPT direct access to your Zerodha Kite trading account — with order placement, paper trading, options Greeks, backtesting, Telegram alerts, and 11 pre-trade safety checks. 110+ tools. Open source, MIT.
Try the hosted demo (read-only) · Self-host in 60 seconds (full trading) · Compare vs official Zerodha MCP
Then say: "Log me in to Kite. Show my portfolio. Backtest SMA crossover on INFY. Set an alert for RELIANCE 2% drop."
Works inside Claude Desktop, Claude Code, claude.ai, ChatGPT Connectors, Cursor, VS Code Copilot, Windsurf — anything MCP-compliant. Complementary to Zerodha's official read-only MCP (22 tools, GTT only); this server adds order placement, alerts, paper trading, options Greeks, and analytics.
[Go 1.25] [Tests] [codecov] [Security Audit] [License] [CI]
Why trust this
- ~9,000 tests across 493 test files (44 in deploy repo + 449 in 32 externalized
algo2go/kite-mcp-*modules) — rungo test ./... -count=1in each module - Security audit: 27-pass manual analysis, 181 findings catalogued — 6 HIGH all FIXED; MEDIUM/LOW/INFO triage in progress (74 FIXED / 107 OPEN as of 2026-05-16). See SECURITY_AUDIT_FINDINGS.md for the line-item status table, SECURITY_AUDIT_REPORT.md for the original audit narrative, and SECURITY_PENTEST_RESULTS.md for pentest evidence.
- AES-256-GCM encryption at rest for every sensitive value — Kite tokens, API secrets, OAuth client secrets — key derived via HKDF from
OAUTH_JWT_SECRET - RiskGuard (11 pre-trade checks) — per-order value cap (Rs 50,000 default), quantity limit, daily order count (20/day), rate limit (10/min), per-second rate limit, duplicate detection (30s window), daily cumulative value cap (Rs 2,00,000), idempotency dedup, confirmation required, anomaly μ+3σ, off-hours block — plus kill switch + circuit breaker + global freeze layers + OTR-band + margin-sufficiency boundary checks. Last verified 2026-05-16 against
algo2go/kite-mcp-riskguard/guard.go(16 RejectionReason constants total; 11 fire on every trade). - Per-tool-call audit trail with 90-day retention — every MCP call logged to SQLite, CSV/JSON export via dashboard
- CI on every push —
go build,go vet,go test -race(see.github/workflows/ci.yml) - MIT license, open source — inspect anything. Upstream attribution to Zerodha Tech preserved in LICENSE
- Threat model: THREAT_MODEL.md. Security policy: SECURITY.md
Quick start
Option A — hosted demo (read-only)
Point your MCP client at:
Order-placement tools are gated off on the hosted instance pursuant to NSE/INVG/69255 Annexure I Para 2.8. Read-only tools (portfolio, market data, backtesting, analytics) work. You still bring your own Kite developer app (per-user OAuth).
Option B — run locally (personal use, full functionality)
Point your client at http://localhost:8080/mcp (use --allow-http if your client requires it). Running locally against your own Kite account is the personal-use safe-harbor path — you remain the Zerodha Client; the software just helps you place orders.
Go users can skip Docker: go build -o kite-mcp-server && ./kite-mcp-server.
Option C — connect from your MCP client
Add this to your client config (~/.claude.json, claude_desktop_config.json, .vscode/mcp.json, etc.):
Then say: "Log me in to Kite" — complete the OAuth flow in your browser — then ask anything: "Show my portfolio", "Backtest SMA crossover on INFY", "Enable paper trading mode".
New to this? Start with paper trading: "Enable paper trading mode" — virtual Rs 1 crore portfolio, no real money at risk.
Windows + Claude Code footnote: On Windows,
cmd /csilently swallows JSON args containing escaped quotes (\"). If you need to pass static OAuth client info tomcp-remote, write the JSON to a file and reference it via--static-oauth-client-info @path/to/client-info.jsoninstead of inline. Example client-info file lives at~/.claude/mcp-servers/kite-fly-client.jsonin the canonical Windows setup.
OAuth discovery follows the standards: RFC 8414 (OAuth 2.0 Authorization Server Metadata at /.well-known/oauth-authorization-server) and RFC 9728 (OAuth 2.0 Protected Resource Metadata at /.well-known/oauth-protected-resource). mcp-remote auto-discovers via these endpoints — no manual auth configuration required on the client side.
Features
- Portfolio analysis — holdings, positions, margins, P&L, sector exposure (150+ stocks mapped), tax-loss harvest, concentration, dividends
- Market data — quotes, LTP, OHLC, historical candles, instrument search, 10+ technical indicators (SMA, EMA, RSI, MACD, Bollinger Bands)
- Options — Black-Scholes Greeks (delta, gamma, theta, vega, IV), option chain, 8 multi-leg strategy templates
- Backtesting — 4 built-in strategies (SMA crossover, RSI reversal, breakout, mean reversion) with Sharpe ratio and max drawdown
- Alerts — price above/below, percentage drop/rise, composite conditions, volume spike, Telegram delivery + native Kite GTT alerts
- Paper trading — virtual Rs 1 crore portfolio, simulated orders, background LIMIT fill monitor, toggle on/off
- RiskGuard — 11 pre-trade checks run before every order hits the exchange (kill switch, order value cap, quantity limit, daily count, rate limit, per-second rate limit, duplicate detection, daily notional cap, idempotency dedup, anomaly μ+3σ, off-hours block) — plus circuit breaker + global freeze layers
- MCP Apps widgets — inline portfolio / orders / alerts / activity UI on claude.ai, Claude Desktop, and ChatGPT
- Telegram bot —
/buy,/sell,/quick,/setalertwith inline keyboard confirmation; morning briefing (9 AM IST) and daily P&L (3:35 PM IST) - Order placement — place, modify, cancel, GTT, convert positions, close-all (local build only; hosted deployment is read-only)
Full tool taxonomy with counts per category in ARCHITECTURE.md.
Architecture
Clean / hexagonal architecture:
Go 1.25 + mcp-go v0.46.0. SQLite for persistence (credentials, alerts, sessions, audit trail — all AES-256-GCM encrypted), with Litestream continuous replication to Cloudflare R2. OAuth 2.1 + PKCE, each user brings their own Kite developer app. Middleware chain: Timeout -> Audit -> Hooks -> RiskGuard -> Rate Limiter -> Billing -> Paper Trading -> Dashboard URL. Deployed on Fly.io (Mumbai region) with static egress IP for SEBI-mandated whitelisting. See ARCHITECTURE.md.
Legal / compliance status
Not a SEBI-registered intermediary. This is infrastructure software, not an advisory or brokerage service.
- Per-user BYO Kite developer app — you remain the Zerodha Client of record. The server holds no pooled user funds and executes no trades on its own behalf.
- The hosted deployment at
kite-mcp-server.fly.devis read-only; order-placement tools are gated off pursuant to NSE/INVG/69255 Annexure I Para 2.8. Order placement requires running the server locally against your own account.- Running the server locally against your personal Kite account is the personal-use safe-harbor path — analogous to running your own algo script. See OpenAlgo's framing of the compliance landscape for Indian algo vendors.
- Static egress IP (
209.71.68.157, Mumbai) is published so users can whitelist it in their Kite developer console per the SEBI April 2026 mandate.- TERMS.md and PRIVACY.md are DRAFT and under independent legal review. Do not rely on them as final legal agreements.
- Trading involves risk. This software is not financial advice. Not affiliated with Zerodha.
Environment variables
OAUTH_JWT_SECRET is the only required variable for multi-user HTTP deployments. Everything else is optional and activates specific features when set. Full table:
Client setup
Any MCP-compliant client works with the same mcp-remote bridge above. Client-specific file locations:
- Claude Code —
~/.claude.json(mcpServerskey) - Claude Desktop —
%APPDATA%\Claude\claude_desktop_config.json(Windows) or~/.config/Claude/claude_desktop_config.json(macOS/Linux) - ChatGPT Desktop — Settings -> Tools & Integrations -> MCP Servers -> add URL
- VS Code / Cursor / Windsurf —
.vscode/mcp.jsonor equivalent
Documentation
For users
- Quick start — run locally or connect to hosted
- Terms of Service & Privacy Policy (currently DRAFT — under legal review)
- BYO Anthropic API key — bypass Claude.ai Pro tool-call limits
- Uninstall + DPDP data deletion — disconnect or fully purge your stored data
For developers
- Architecture / how it works — 2,500-word OAuth deep-dive (also published as blog)
- Contributing
- Adding a new tool
- Environment variables
Operations
- Release checklist
- Operator playbook
- Incident response runbook — 4 crisis scenarios + contact directory
- Evidence package skeleton — pre-built for regulator/incident response
Compliance / legal
- NSE algo framework status — Path 1-4 comparison
- Kite v4 migration hedge — dependency risk mitigation
- SBOM generation — software bill of materials for supply chain transparency
- SECURITY.md
Funding / ecosystem
- FLOSS/fund proposal — Zerodha open-source grant application
- funding.json — machine-readable funding manifest
Claude Skills wrapper
- 8 Skills — /kite:morning, /kite:trade, /kite:eod, etc.
Research / strategic
Dashboard
Once logged in via MCP OAuth, the dashboard cookie is set automatically (no second login).
Comparison
The official server is the right choice for read-only, zero-setup use. This server is for traders who want order placement, safety rails, and analytics.
Prerequisites
- A Kite Connect developer app (Rs 500/month from Zerodha)
npx(Node.js 18+) formcp-remote— or Go 1.25+ to self-host from source
Registry
Submission to the official MCP Registry is pending — the io.github.Sundeepg98/kite-mcp-server namespace is reserved via server.json and will be published once final pre-launch verification completes. Auto-indexing by Smithery and Glama follows registry publication.
Contributing / funding
-
Issues / PRs — github.com/Sundeepg98/kite-mcp-server/issues. See CONTRIBUTING.md.
-
Built on — zerodha/kite-mcp-server (MIT). Huge thanks to Kailash Nadh and the Zerodha team for open-sourcing the foundation.
-
Development —
License
MIT. Copyright notice preserved for original Zerodha Tech contribution.
Disclaimer
Trademark: kite-mcp-server is not affiliated with, endorsed by, or sponsored by Zerodha Broking Ltd. "Kite" and "Kite Connect" are trademarks of Zerodha Broking Ltd. This project is an independent open-source implementation of the Model Context Protocol server for the Kite Connect developer API.
Not investment advice: This software is a developer tool. Nothing in this repository, its documentation, or any output generated by the server constitutes investment, financial, legal, or tax advice. Trading decisions are the sole responsibility of the user operating their own Kite Connect developer application.
Personal-use scope: This server is designed for personal self-use by retail investors operating their own Kite Connect developer applications, consistent with SEBI's February 4, 2025 retail algorithmic trading framework §I(c) "family" carve-out (self, spouse, dependent children, dependent parents) and the <10 orders-per-second threshold. Multi-user hosting requires broker empanelment per SEBI §III(a) and NSE/INVG/67858 and is NOT supported by this repository.
Compliance
Applicable regulatory regimes (India):
- SEBI (Stock Brokers) Regulations 2026 — retail algorithmic trading framework (effective April 1, 2026)
- Digital Personal Data Protection Act, 2023 (DPDP Act) — enforcement ramping 2026; rules partially notified
- CERT-In Directions (April 2022) — cybersecurity incident reporting
What this server enforces out of the box:
SEBI framework posture:
- Self + family scope under SEBI §I(c) retail algo framework (Feb 4, 2025 circular): permitted for retail investor coding their own algo, on their own account, below 10 OPS threshold, for self/spouse/dependent-children/dependent-parents
- Multi-user hosting = empanelment required under §III(a) + broker-hosting mandate under NSE/INVG/67858 §I(h). Not supported by this repository.
- Algo-ID tagging (mandatory from April 1, 2026): injected server-side by Zerodha OMS for <10 OPS retail users — no client-side action required
DPDP posture:
- Data fiduciary: operator of the deployment
- Encryption at rest: AES-256-GCM via HKDF-derived keys
- Encryption in transit: TLS
- Audit log retention: 90 days (configurable via
AUDIT_RETENTION_DAYS) - Deletion on request: email
<grievance officer email>or use dashboard tool - Breach notification: CERT-In within 6 hours, users within 72 hours
- Personal/household exemption under DPDP s.17(2)(a): applies to self-only self-hosted use; voided by any external user
If you are self-hosting: you are the data fiduciary for your deployment. This section describes the code's capabilities; legal responsibilities belong to the operator.
Where this code cannot help:
- SEBI Investment Adviser / Research Analyst registration (different regime; out of scope)
- Tax compliance / GST (44ADA for sole prop, see your CA)
- Kite Connect Rs 500/month subscription (payable to Zerodha directly)
Reference documents in this repo:
docs/PRIVACY.md— DPDP-aligned privacy notice (to be customized before hosting)docs/TERMS.md— SEBI-safe terms of servicedocs/incident-response.md— breach playbookdocs/algo2go-tm-search.md— trademark search procedure (if renaming)
來源:README.md,提交 9b09492
工具
0版本歷史
1- v1.2.0最新Sep 16, 2026
評分
已滿足適用檢查項的 85%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通必需25 分
- 已宣告認證方式必需10 分
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
其他 Kite 整合
Kite
new.kite官方發布者
面向代理程式的設計工具:在團隊可編輯和留言的檔案中繪製、編輯並檢查設計。AI 翻譯

Kite Connect MCP
由 GitHub 帳號 techfreakworm 發布
自架的 Zerodha Kite Connect v3 伺服器,讓助理讀取印度券商帳戶、行情與訂單,並可預覽或下單交易。

Box Kite
由 GitHub 帳號 box-kite 發布
本機 MCP 伺服器,為助理提供 Box Kite React 樣式知識,並用真實引擎驗證某個樣式值是否真的會產生 CSS。

SerpKite
由 GitHub 帳號 SerpKite 發布
遠端 MCP 伺服器,透過 SerpKite 讓助理取得 Google 搜尋、新聞、地圖、網頁擷取、附引用回答、深度研究與 AI 助理答案。

CMSKite
由 GitHub 帳號 devicorn 發布
本機 MCP 伺服器,讓助理管理 CMSKite 部落格內容:專案、文章、分類、標籤、API 金鑰與網站整合。