Zerodha Trading MCP

MIT License
1

Integrations

  • Enables interaction with the Zerodha trading platform, providing tools for executing trades, viewing portfolio holdings, checking open positions, placing buy/sell orders, and accessing user profile information.

Zerodha 交易 MCP

模型上下文协议 (MCP) 服务器,使 AI 模型能够与 Zerodha 交易平台交互。该项目提供了一套工具,用于通过标准化界面在 Zerodha 上执行交易、查看投资组合和管理头寸。

特征

  • 🔐 使用 Zerodha API 进行安全身份验证
  • 📊 查看投资组合持股
  • 📈 查看空缺职位
  • 💹下达买入/卖出订单
  • 👤 访问用户个人资料信息

先决条件

  • Node.js(v14 或更高版本)
  • Zerodha交易账户
  • 来自 Zerodha 的 API 凭证

安装

  1. 克隆存储库:
git clone https://github.com/shubhamprajapati7748/zerodha-trade-mcp.git cd zerodha-trade-mcp
  1. 安装依赖项:
npm install
  1. 使用您的 Zerodha 凭据在根目录中创建一个.env文件:
KITE_API_KEY=your_api_key KITE_SECRET_KEY=your_secret_key REQUEST_TOKEN=your_request_token ACCESS_TOKEN=your_access_token

Claude Desktop MCP 配置

要将此 MCP 服务器与 Claude Desktop 配合使用,您需要配置 mcp 服务器的详细信息。设置方法如下:

  1. 在项目根目录中打开claude_desktop_config.json
  2. 添加以下配置:
{ "mcpServers": { "tradeStocks": { "command": "/opt/homebrew/bin/bun", "args": [ "/path/to/your/index.ts" ], "env": { "KITE_API_KEY": "your_api_key", "KITE_SECRET_KEY": "your_secret_key", "REQUEST_TOKEN": "your_request_token", "ACCESS_TOKEN": "your_access_token" } } } }

请确保:

  • 更新index.ts文件的路径
  • 用您的实际 Zerodha 凭据替换环境变量

用法

MCP 服务器提供以下工具:

获取个人资料

get-profile

从 Zerodha 检索用户的个人资料信息。

购买股票

buy-stock {stock: string, quantity: number}

针对指定股票和数量下达购买订单。

出售股票

sell-stock {stock: string, quantity: number}

针对指定股票和数量下达卖出订单。

显示投资组合

show-portfolio

显示用户的完整投资组合。

显示职位

show-positions

显示用户的未平仓头寸。

发展

该项目采用以下方式构建:

  • TypeScript
  • KiteConnect API
  • 模型上下文协议 (MCP) SDK
  • Zod 用于模式验证

贡献

欢迎贡献代码!欢迎提交 Pull 请求。

执照

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅 LICENSE 文件。

免责声明

本项目仅供教育用途。金融市场交易存在重大风险。请务必自行研究并负责任地进行交易。

-
security - not tested
A
license - permissive license
-
quality - not tested

模型上下文协议服务器使 AI 模型能够与 Zerodha 交易平台进行交互,从而允许用户通过标准化界面执行交易、查看投资组合持有量和管理头寸。

  1. 特征
    1. 先决条件
      1. 安装
        1. Claude Desktop MCP 配置
          1. 用法
            1. 获取个人资料
            2. 购买股票
            3. 出售股票
            4. 显示投资组合
            5. 显示职位
          2. 发展
            1. 贡献
              1. 执照
                1. 免责声明

                  Related MCP Servers

                  • A
                    security
                    A
                    license
                    A
                    quality
                    A Model Context Protocol server implementation that enables AI assistants to interact with the Paradex perpetual futures trading platform, allowing for retrieving market data, managing trading accounts, placing orders, and monitoring positions.
                    Last updated -
                    28
                    4
                    Python
                    MIT License
                    • Linux
                    • Apple
                  • A
                    security
                    F
                    license
                    A
                    quality
                    A Model Context Protocol server that enables AI assistants to interact with the Deriv trading API, providing access to active trading symbols and account balance information.
                    Last updated -
                    2
                    Python
                    • Apple
                  • -
                    security
                    F
                    license
                    -
                    quality
                    A Model Context Protocol server that enables AI assistants to access Flow blockchain data and perform operations such as checking balances, resolving domains, executing scripts, and submitting transactions.
                    Last updated -
                    JavaScript
                    • Linux
                    • Apple
                  • -
                    security
                    A
                    license
                    -
                    quality
                    A production-ready Model Context Protocol server implementation that connects AI assistants to the TON blockchain, allowing them to query wallet balances, transaction details, smart contracts, and other blockchain data.
                    Last updated -
                    TypeScript
                    MIT License

                  View all related MCP servers

                  ID: 256r0s5zde