AZ

aptro/zerodha-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

46 stars 15 forks 质量 56 趋势 0MIT

aptro/zerodha-mcp 是从 https://github.com/aptro/zerodha-mcp. 导入的 MCP 服务器候选

概览

aptro/zerodha-mcp 是从 https://github.com/aptro/zerodha-mcp. 导入的 MCP 服务器候选

概述(AI 翻译)

该项目通过多云插件(MCP)框架将Zerodha的交易平台与Claude AI集成,使您可以通过Claude直接与Zerodha交易账户交互。

设置说明

通过Smithery安装

要通过Smithery自动安装Claude桌面的zerodha-mcp:

1.创建Zerodha开发者账户

  1. 前往 Kite Connect 注册开发者账户
  2. 登录你的账户 developers.kite.trade

2.创建新应用

  1. 进入你的 Kite 开发者仪表盘中的“应用”部分
  2. 点击“创建新应用”
  3. 填写所需信息:
  • 应用名称:选择描述性名称(例如,“Claude Zerodha 集成”)
  • 应用类别:选择“个人”或相应类别
  • 重定向URL:设置为http://127.0.0.1:5000/zerodha/auth/redirect
  • 描述:简要描述您的申请目的
  1. 提交创建应用的表单

3.获取API凭证

创建应用后,您将获得:

  • API 密钥(也称为消费者密钥)
  • API 秘密(也称为消费者秘密)

这些凭证会显示在您的应用详情页面上。

4.配置环境变量

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Zerodha MCP Integration

This project integrates Zerodha’s trading platform with Claude AI using the Multi-Cloud Plugin (MCP) framework, allowing you to interact with your Zerodha trading account directly through Claude.

Setup Instructions

Installing via Smithery

To install zerodha-mcp for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @aptro/zerodha-mcp --client claude

1. Create a Zerodha Developer Account

  1. Go to Kite Connect and sign up for a developer account
  2. Log in to your account at developers.kite.trade

2. Create a New App

  1. Navigate to the “Apps” section in your Kite Developer dashboard
  2. Click on “Create a new app”
  3. Fill in the required details:
    • App Name: Choose a descriptive name (e.g., “Claude Zerodha Integration”)
    • App Category: Select “Personal” or appropriate category
    • Redirect URL: Set to http://127.0.0.1:5000/zerodha/auth/redirect
    • Description: Briefly describe your application’s purpose
  4. Submit the form to create your app

3. Get API Credentials

After creating your app, you’ll receive:

  • API Key (also called Consumer Key)
  • API Secret (also called Consumer Secret)

These credentials will be displayed on your app’s details page.

4. Configure Environment Variables

  1. Create a .env file in the root directory of this project
  2. Add your API credentials to the file:
KITE_API_KEY=your_api_key_here
KITE_API_SECRET=your_api_secret_here

Replace your_api_key_here and your_api_secret_here with the actual credentials from step 3.

5. Install Dependencies

Make sure you have all required dependencies installed:

uv pip install kiteconnect fastapi uvicorn python-dotenv httpx

6. Install MCP config on your Claude desktop app

Install the MCP config on your Claude desktop app:

mcp install main.py

This command registers the Zerodha plugin with Claude, making all trading functionality available to the AI.

Usage

After setup, you can interact with your Zerodha account via Claude using the following features:

Authentication

Can you please check if I'm logged into my Zerodha account and authenticate if needed?

Stocks and General Trading

  • Check account margins: What are my current margins on Zerodha?
  • View portfolio holdings: Show me my current holdings on Zerodha
  • Check current positions: What positions do I currently have open on Zerodha?
  • Get quotes for symbols: What's the current price of RELIANCE and INFY on NSE?
  • Place an order: Place a buy order for 10 shares of INFY at market price on NSE
  • Get historical data: Can you show me the historical price data for SBIN for the last 30 days?

Mutual Funds

在 GitHub 查看完整 README

安装

npx -y @smithery/cli install @aptro/zerodha-mcp --client claude
新手?先看 mcpskill.org 教程 →