Kite-MCP – AI 대화를 통해 Zerodha에서 인도 주식을 거래하세요(MCP 서버)

hackernews | | 📦 오픈소스
#ai거래 #claude #kite #mcp #review #zerodha #인도주식
원문 출처: hackernews · Genesis Park에서 요약 및 분석

요약

Zerodha Kite와 AI 비서를 연동하여 파이썬 코딩 없이 자연어 대화만으로 인도 주식 매매를 가능하게 하는 'kite-mcp' MCP 서버가 공개되었습니다. 이 도구는 총 14가지 거래 도구를 포함하며, TOTP 기반의 자동 로그인과 주문 수정, 손절가 설정 등의 기능을 제공합니다. Claude Desktop이나 Cursor 등 MCP를 지원하는 클라이언트에서 설정을 통해 사용할 수 있어, 투자자가 코드를 작성하지 않고도 포트폴리오를 관리하고 즉시 주문을 실행할 수 있습니다.

본문

MCP server for Zerodha Kite -- trade Indian stocks through natural conversation with any MCP-compatible AI assistant. Traditional Kite wrappers require you to write Python code to trade. With kite-mcp, you just talk: You: "Buy 50 Reliance at market price" Assistant: checks quote, verifies funds, asks for confirmation, places order You: "How's my portfolio doing?" Assistant: fetches holdings, calculates P&L, summarizes gainers and losers You: "Set a stop-loss on my HAL position at 3400" Assistant: places a GTT trigger for you No code. No scripts. No terminal. Just conversation. kite-mcp connects any MCP-compatible AI assistant directly to your Zerodha account with 14 trading tools, automated TOTP login, and auto-retry on expired tokens. You (natural language) --> AI Assistant --> kite-mcp (MCP server) --> Zerodha Kite API Your AI assistant interprets your intent, maps stock names to symbols (e.g., "Infosys" to NSE:INFY), checks your funds, and executes trades -- all through the MCP protocol. The server handles authentication automatically, including daily token refresh via TOTP. 14 tools for complete trading control: | Tool | Description | |---|---| kite_login | Auto-authenticate with TOTP | get_holdings | Portfolio holdings with P&L | get_positions | Today's intraday/delivery positions | get_orders | Today's order history | get_margins | Available funds and margins | get_quote | Live market quotes | get_ohlc | Open, high, low, close data | get_historical_data | Historical candle data (minute to daily) | get_instruments | Search tradeable instruments across NSE, BSE, NFO, MCX | place_order | Place buy/sell orders (market, limit, stop-loss) | modify_order | Modify pending orders | cancel_order | Cancel pending orders | get_gtt_triggers | View Good Till Triggered orders | place_gtt | Place GTT single or OCO (stoploss + target) triggers | Key capabilities: - Fully automated login -- TOTP generated on the fly, no manual intervention - Auto-retry on stale tokens -- re-authenticates transparently if a token expires mid-session - Supports delivery (CNC), intraday (MIS), and F&O (NRML) orders - After-market orders (AMO) supported Works with any MCP-compatible client, including: | Client | Platform | |---|---| | Claude Desktop | macOS, Windows | | Claude Code | Terminal (macOS, Linux, Windows) | | Cursor | macOS, Windows, Linux | | Windsurf | macOS, Windows, Linux | | Continue | VS Code, JetBrains | | Any MCP-compatible client | See MCP clients list | pip install kite-mcp You need a Kite Connect API app. From your app dashboard, note your API Key and API Secret. You also need: - User ID -- your Zerodha client ID (e.g., AB1234) - Password -- your Zerodha login password - TOTP Secret (recommended) -- the base32 seed from setting up an external authenticator app for Zerodha 2FA. This enables fully automated login with no manual steps. How to get your TOTP secret - Log in to console.zerodha.com - Go to My Profile > Security > 2FA Settings - Switch to an external authenticator app (Google Authenticator, Authy, etc.) - When the QR code appears, look for a "Can't scan? Copy this key" link - That key is your TOTP secret -- save it before completing setup - Enter the 6-digit code from your authenticator to finish Add this to your MCP client configuration. The config location depends on your client -- refer to your client's documentation for the exact path. { "mcpServers": { "kite": { "command": "kite-mcp", "env": { "KITE_API_KEY": "your-api-key", "KITE_API_SECRET": "your-api-secret", "KITE_USER_ID": "your-user-id", "KITE_PASSWORD": "your-password", "KITE_TOTP_SECRET": "your-totp-secret" } } } } Restart your MCP client. You're ready to trade. Open a new chat and try: - "Show my portfolio holdings" - "What's Tata Motors trading at?" - "Buy 10 Infosys at market price" - "How much cash do I have available?" - "Cancel my last pending order" - "Show my top gainers and losers" The AI assistant understands stock names in plain English -- no need to use trading symbols. | Variable | Required | Description | |---|---|---| KITE_API_KEY | Yes | Kite Connect API key | KITE_API_SECRET | Yes | Kite Connect API secret | KITE_USER_ID | Yes | Zerodha client ID | KITE_PASSWORD | Yes | Zerodha login password | KITE_TOTP_SECRET | No | TOTP base32 seed for auto-login. Without this, you must run kite-mcp-login manually each day. | If you don't have a TOTP secret, you can log in manually each day: export KITE_API_KEY=your-api-key export KITE_API_SECRET=your-api-secret export KITE_USER_ID=your-user-id export KITE_PASSWORD=your-password kite-mcp-login This caches the access token for the rest of the day. The MCP server will use the cached token until it expires. - Daily portfolio monitoring -- "Give me a summary of my portfolio with top gainers and losers" - Quick trades -- "Buy 50 Reliance" / "Sell all my Yes Bank" - Research + action -- "What's the 52-week high of HDFC Bank? Should I add more at current levels?" - Risk management -- "Set a stop-loss

Genesis Park 편집팀이 AI를 활용하여 작성한 분석입니다. 원문은 출처 링크를 통해 확인할 수 있습니다.

공유

관련 저널 읽기

전체 보기 →