Zerodha MCP Server
Zerodha MCP 서버
MCP(Model Context Protocol)를 통해 Zerodha 거래 계좌를 조회하세요. Claude Code, Claude Desktop, Cursor 및 기타 MCP 호환 AI 도구와 함께 작동합니다.
사용 가능한 도구
도구 | 설명 |
| 사용 가능한 잔액 및 증거금 |
| 장기 보유 주식(Demat) |
| 손익(P&L)을 포함한 당일/선물옵션(F&O) 포지션 |
| 오늘의 주문 내역 |
| 통합 손익(P&L) 요약 |
| 모든 종목의 최종 거래 가격(LTP) |
| 모든 종목의 OHLC 데이터 |
| 기간별(최대 3개월) 과거 손익(P&L) 요약 |
| 기간별(최대 3개월) 일일 손익(P&L) 분석 |
Related MCP server: Trade-MCP
설치
git clone https://github.com/anish5256/zerodha-mcp.git
cd zerodha-mcp
pip install -e .구성
환경 변수
서버는 인증을 위해 다음 환경 변수가 필요합니다:
변수 | 설명 |
| Zerodha 클라이언트 ID (예: |
| Zerodha 로그인 비밀번호 |
| TOTP 비밀 키 (32자 base32 문자열) |
TOTP 키 가져오기
TOTP 비밀 키는 Google Authenticator/Authy에서 2단계 인증(2FA)을 설정할 때 사용한 32자 코드입니다. 예: ABCD1234EFGH5678IJKL9012MNOP3456
저장해 둔 키가 없다면 Zerodha Console에서 2FA를 재설정하여 새 키를 받으세요.
플랫폼별 설정
Claude Code (CLI)
~/.mcp.json에 추가하세요:
{
"mcpServers": {
"zerodha": {
"command": "python",
"args": ["/path/to/zerodha-mcp/server.py"],
"env": {
"ZERODHA_USER_ID": "YOUR_USER_ID",
"ZERODHA_PASSWORD": "YOUR_PASSWORD",
"ZERODHA_TOTP_KEY": "YOUR_TOTP_SECRET"
}
}
}
}그런 다음 Claude Code를 재시작하세요.
Claude Desktop (macOS)
~/Library/Application Support/Claude/claude_desktop_config.json을 편집하세요:
{
"mcpServers": {
"zerodha": {
"command": "python",
"args": ["/path/to/zerodha-mcp/server.py"],
"env": {
"ZERODHA_USER_ID": "YOUR_USER_ID",
"ZERODHA_PASSWORD": "YOUR_PASSWORD",
"ZERODHA_TOTP_KEY": "YOUR_TOTP_SECRET"
}
}
}
}그런 다음 Claude Desktop을 재시작하세요.
Claude Desktop (Windows)
%APPDATA%\Claude\claude_desktop_config.json을 편집하세요:
{
"mcpServers": {
"zerodha": {
"command": "python",
"args": ["C:\\path\\to\\zerodha-mcp\\server.py"],
"env": {
"ZERODHA_USER_ID": "YOUR_USER_ID",
"ZERODHA_PASSWORD": "YOUR_PASSWORD",
"ZERODHA_TOTP_KEY": "YOUR_TOTP_SECRET"
}
}
}
}그런 다음 Claude Desktop을 재시작하세요.
Cursor
Cursor의 MCP 설정(Settings > MCP)에 추가하세요:
{
"zerodha": {
"command": "python",
"args": ["/path/to/zerodha-mcp/server.py"],
"env": {
"ZERODHA_USER_ID": "YOUR_USER_ID",
"ZERODHA_PASSWORD": "YOUR_PASSWORD",
"ZERODHA_TOTP_KEY": "YOUR_TOTP_SECRET"
}
}
}기타 MCP 클라이언트
MCP 호환 클라이언트의 경우 다음을 구성하세요:
명령어:
python인자:
["/path/to/zerodha-mcp/server.py"]환경 변수:
ZERODHA_USER_ID= 클라이언트 IDZERODHA_PASSWORD= 비밀번호ZERODHA_TOTP_KEY= TOTP 비밀 키
사용 예시
설정이 완료되면 AI 어시스턴트에게 다음과 같이 물어보세요:
"현재 내 포트폴리오 가치는 얼마야?"
"내 오픈 포지션을 보여줘"
"오늘 내 손익(P&L)은 얼마야?"
"사용 가능한 자금이 얼마 있지?"
"RELIANCE의 LTP는 얼마야?"
"NIFTY 50의 OHLC 데이터를 가져와"
"2024년 내 선물옵션(F&O) 수익은 얼마였어?"
"지난달 일일 손익(P&L)을 보여줘"
보안 참고 사항
자격 증명은 MCP 설정 파일에 로컬로 저장됩니다.
자격 증명은 AI 모델로 전송되지 않으며 서버 측에서만 사용됩니다.
토큰은
zerodha_enctoken.txt및zerodha_console_token.txt(gitignored)에 로컬로 캐시됩니다.각 사용자는 자신의 컴퓨터에서 직접 자격 증명을 구성해야 합니다.
라이선스
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Indian broker accounts for AI agents: positions, holdings, orders, P&L, option chains, 10+ brokers.
OpenFinance gives any AI agent easy trading across every major market through one hosted MCP server. Trade crypto spot and perpetuals on Hyperliquid with market, limit and TWAP orders, leverage and margin control. Trade stocks, indices, commodities, forex and pre-IPO names as Hyperliquid HIP-3 perps. Trade Polymarket prediction markets with odds, order books, positions, PnL and trader leaderboards. Swap and bridge across 40+ EVM chains and Solana with Relay and Jupiter, find memecoins across 200+ chains, launch tokens on Robinhood Chain and Solana, and buy crypto with card, bank or UPI. Write actions are designed to ask for your confirmation first. Connect with OAuth (sign in to OpenFinance and approve) or an API key. Works with Claude, ChatGPT, Cursor, VS Code, Codex and any MCP client. No install. Home: https://openfinance.tech/agents · Docs: https://docs.openfinance.tech · GitHub: https://github.com/openfinance-tech/mcp
Connect brokerage accounts to AI assistants: holdings, orders, asset lookup, and approved trading.
Open-source MCP server for Zerodha Kite Connect. Portfolio, market data, backtesting, alerts.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with the Zerodha trading platform for placing stock orders, viewing portfolio holdings, and managing mutual fund investments. Provides secure OAuth authentication and real-time trading capabilities through Zerodha's official API.1-
- FlicenseNot gradedqualityDmaintenanceEnables trading automation through Zerodha Kite Connect API, allowing users to place buy/sell orders and fetch holdings via MCP tools accessible to Claude Desktop and other MCP-compatible clients.-
- AlicenseNot gradedqualityDmaintenanceEnables natural language management of Zerodha trading accounts, including placing orders, checking portfolio, and viewing positions through MCP integration.32Apache 2.0
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with the Zerodha trading platform for placing stock orders, viewing holdings, and managing mutual fund investments through the MCP protocol.4-