zerodha-mcp
by mtwn105·★ 30·综合分 35
基于Python的Zerodha交易MCP服务器,提供交互式聊天界面和多种代理支持。
概述
这是一个全面的Zerodha MCP服务器,Zerodha是印度一家股票经纪平台。它提供了一套工具来管理交易账户、下单、检索持仓并与交易平台交互。该服务器支持多种客户端实现,包括Agno框架、Google ADK和Gradio Web界面。实现遵循模型上下文协议(MCP),用于标准化通信,可用于构建AI交易助手。
试试问 AI
装完之后,这里有 5 个你可以让 AI 做的事:
什么时候选它
如果您需要AI驱动的方式管理Zerodha交易账户,并希望有包括网页界面在内的多种客户端选择,这个MCP服务器是理想选择。
什么时候不要选它
如果您使用的是其他经纪平台,不要选择这个MCP服务器,因为它专门为Zerodha设计,不适用于其他交易服务。
此 server 暴露的工具
从 README 抽取出 12 个工具get_login_urlGet the login URL for user authentication
get_access_tokenGenerate access token using request token
get_user_profileGet user's Zerodha profile information
get_marginsGet available margins and fund details
get_holdingsGet portfolio holdings
get_positionsGet current positions
get_ordersGet all orders for the day
get_order_historyGet history of a specific order
get_order_tradesGet trades generated by an order
place_orderPlace a new order
modify_orderModify an existing order
cancel_orderCancel an order
可对比工具
安装
安装
- 克隆仓库:
git clone https://github.com/mtwn105/zerodha-mcp-server-client.git
cd zerodha-mcp-server-client- 创建并激活虚拟环境:
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate- 安装依赖:
pip install -r requirements.txt- 设置环境变量:
cp .env.example .env
# 编辑.env文件添加您的凭据Claude Desktop配置
添加到您的Claude Desktop配置文件config.json:
{
"mcpServers": {
"zerodha": {
"command": "python",
"args": ["/path/to/zerodha-mcp-server-client/server.py"],
"env": {
"ZERODHA_API_KEY": "your_api_key",
"ZERODHA_API_SECRET": "your_api_secret",
"PORT": "8001"
}
}
}
}FAQ
- 使用此MCP服务器需要哪些API?
- 您需要一个具有个人API访问权限的Zerodha交易账户,以及OpenAI API密钥(用于Agno代理)或Gemini API密钥/应用默认凭据(用于Google ADK代理)。
- 如何将不同客户端连接到MCP服务器?
- 服务器支持多种连接方法 - 您可以使用环境变量、命令行参数或通过提供的.env文件配置。每个客户端(Agno、Google ADK、Gradio)在README中都有特定的连接步骤。
zerodha-mcp 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。