kite-mcp
v1.0.0
Published
Zerodha Kite MCP Server — real-time Indian stock market analysis through Claude. 27 tools for market data, technical analysis, fundamental analysis, portfolio tracking, and stock screening via Zerodha Kite Connect API.
Downloads
187
Maintainers
Readme
kite-mcp
Zerodha Kite MCP Server — real-time Indian stock market analysis through Claude using the Zerodha Kite Connect API.
27 tools for market data, technical analysis, fundamental analysis, portfolio tracking, and AI-powered stock screening — all via the official Zerodha Kite Connect API.
Read-only — this server only reads market data and portfolio information. No trading operations are performed.
Tools
Market Data (5)
| Tool | Description |
|------|-------------|
| kite_search_instruments | Search instruments by name, symbol, or ISIN |
| kite_get_quote | Full market quote with bid/ask depth (up to 500 instruments) |
| kite_get_ohlc | OHLC data for instruments (up to 1000) |
| kite_get_ltp | Last traded price (up to 1000 instruments) |
| kite_get_historical | Historical OHLCV candle data (minute to monthly intervals) |
Portfolio (4)
| Tool | Description |
|------|-------------|
| kite_get_profile | Your Zerodha account profile |
| kite_get_holdings | DEMAT holdings with current P&L |
| kite_get_positions | Current day net and intraday positions |
| kite_get_margins | Funds available and margin utilization |
Technical Analysis (7)
| Tool | Description |
|------|-------------|
| kite_calculate_rsi | Relative Strength Index (default period: 14) |
| kite_calculate_macd | MACD with signal line (12/26/9) |
| kite_calculate_bollinger | Bollinger Bands (period: 20, stdDev: 2) |
| kite_calculate_sma | Simple Moving Averages (default: 20, 50, 200) |
| kite_calculate_ema | Exponential Moving Averages (default: 12, 26, 50) |
| kite_get_technical_summary | Comprehensive technical analysis summary |
| kite_detect_patterns | Support and resistance level detection |
Fundamental Analysis (5)
Requires FMP and EODHD API keys — see Configuration.
| Tool | Description |
|------|-------------|
| kite_get_fundamentals | P/E, EPS, Market Cap, ROE, debt ratios |
| kite_get_financials | Annual and quarterly financial statements |
| kite_get_dividends | Dividend history (default: 5 years) |
| kite_get_company_profile | Company overview and business description |
| kite_compare_fundamentals | Side-by-side comparison of multiple stocks |
Screening (2)
| Tool | Description |
|------|-------------|
| kite_get_index_constituents | Get NIFTY 50, BANK NIFTY, or NIFTY IT constituents |
| kite_analyze_stock | Complete analysis with buy/sell/hold recommendation |
Advisor (4)
| Tool | Description |
|------|-------------|
| advisor_get_briefing | Morning market briefing with portfolio review |
| advisor_scan_opportunities | Scan universe for intraday/swing/positional opportunities |
| advisor_analyze_deep | Deep single-stock analysis for a given timeframe |
| advisor_get_portfolio_risk | Portfolio-level risk assessment |
News (3)
| Tool | Description |
|------|-------------|
| advisor_get_news | Recent news with sentiment analysis |
| advisor_get_earnings_calendar | Upcoming earnings announcements |
| advisor_get_market_news | Market-wide news, FII/DII data, global cues |
Setup
Prerequisites
- A Zerodha trading account
- Kite Connect API subscription — ₹500/month from kite.trade/connect
- FMP API key — free tier available at financialmodelingprep.com
- EODHD API key — free tier available at eodhd.com
Step 1 — Create a Kite Connect App
- Go to developers.kite.trade
- Log in with your Zerodha credentials
- Click "Create new app"
- Fill in:
- App name: e.g.
kite-mcp - Redirect URL:
http://127.0.0.1:3000/callback - Postback URL: leave blank
- App name: e.g.
- Submit and note your API Key and API Secret
Step 2 — Install & Configure
# Install globally
npm install -g kite-mcp
# Create config directory and credentials file
mkdir -p ~/.kite-mcp
cat > ~/.kite-mcp/credentials.json << 'EOF'
{
"api_key": "YOUR_KITE_API_KEY",
"api_secret": "YOUR_KITE_API_SECRET"
}
EOFStep 3 — Authenticate
kite-mcp authA browser window opens — log in with your Zerodha credentials and authorize the app. Your session token is saved to ~/.kite-mcp/token.json.
Note: Kite tokens expire daily at 6:00 AM IST. Re-run
kite-mcp autheach morning or usenpm run auto-authfor automated re-authentication.
Step 4 — Add to Claude Code
claude mcp add kite -- npx kite-mcpOr manually in your Claude config (~/.claude/claude_desktop_config.json):
{
"mcpServers": {
"kite": {
"command": "npx",
"args": ["kite-mcp"],
"env": {
"FMP_API_KEY": "your_fmp_key",
"EODHD_API_KEY": "your_eodhd_key"
}
}
}
}Configuration
| Environment Variable | Required | Description |
|---------------------|----------|-------------|
| FMP_API_KEY | Yes (for fundamentals) | Financial Modeling Prep API key |
| EODHD_API_KEY | Yes (for fundamentals) | EODHD financial data API key |
Without FMP and EODHD keys, the 5 fundamental analysis tools (kite_get_fundamentals, kite_get_financials, kite_get_dividends, kite_get_company_profile, kite_compare_fundamentals) will not return data. All other 22 tools work with just the Kite API credentials.
Usage Examples
Get stock quote:
What is the current price and market depth for Reliance Industries?Technical analysis:
Analyze RSI, MACD, and moving averages for HDFC BankCompare stocks:
Compare the fundamentals of TCS, Infosys, and WiproPortfolio review:
Show my current holdings and their P&LStock recommendation:
Give me a complete analysis of ICICI Bank with a buy/sell recommendationInstrument format:
NSE stocks: NSE:RELIANCE, NSE:TCS, NSE:INFY
BSE stocks: BSE:RELIANCE, BSE:500325
F&O: NSE:NIFTY25JANFUT, NSE:BANKNIFTY25JANFUTData & Auth Storage
~/.kite-mcp/
├── credentials.json # Kite API key and secret
└── token.json # Daily access token (expires 6 AM IST)Security: Never commit these files to version control.
API Limits
| Limit | Value | |-------|-------| | Rate limit | 10 GET requests/second (auto-queued) | | Quote API | Max 500 instruments per request | | LTP/OHLC API | Max 1000 instruments per request | | Token expiry | Daily at 6:00 AM IST |
Troubleshooting
"Not authenticated" / token expired:
kite-mcp auth"Instrument not found":
Use the EXCHANGE:SYMBOL format — e.g. NSE:RELIANCE, not just RELIANCE.
Fundamental tools returning no data:
Ensure FMP_API_KEY and EODHD_API_KEY are set in your environment or Claude config.
Rate limit errors: The server auto-queues requests at 10/sec. If errors persist, wait a few seconds and retry.
Requirements
- Node.js 18+
- Zerodha trading account with Kite Connect API subscription
- FMP and EODHD API keys (for fundamental analysis tools)
License
MIT — Hitesh Gupta
