关于 Angel One Mcp
Angel One MCP 是连接 Angel One SmartAPI 的 MCP 服务,供 AI 助手查询行情、管理投资组合并执行交易。它还提供历史数据、GTT 规则及期权分析工具。
主要功能
- 01下单、修改与取消订单
- 02查询持仓与投资组合
- 03获取实时及历史行情
- 04管理 GTT 规则
- 05期权与市场分析
适用场景
- 01查看投资组合持仓
- 02查询股票实时价格
- 03提交或管理交易订单
- 04分析期权数据与市场走势
MCP 相关
该 MCP 服务将 Angel One SmartAPI 的会话、订单、投资组合、行情及分析能力作为工具开放给 MCP 客户端。
配置
本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。
暂未收录安装方式
我们还没有获取到这个服务的安装包或远程地址,请按项目 README 中的说明安装。
工具
还没有获取到工具列表
本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。
详细介绍
Angel One MCP
适用于 Angel One SmartAPI 的 MCP 服务——通过 Claude、Cursor 等 AI 助手进行股票交易、管理投资组合、访问市场数据和运行分析。
工具(30+)
| 类别 | 工具 |
|---|---|
| 会话 | angelone_ping、angelone_login、angelone_auto_login、angelone_logout、angelone_get_profile、angelone_get_rms_limit |
| 订单 | angelone_place_order、angelone_modify_order、angelone_cancel_order、angelone_get_order_book、angelone_get_trade_book、angelone_get_order_details |
| 投资组合 | angelone_get_holdings、angelone_get_all_holdings、angelone_get_positions、angelone_convert_position |
| 市场数据 | angelone_get_ltp、angelone_get_market_data、angelone_search_scrip |
| 历史数据 | angelone_get_candle_data |
| GTT | angelone_create_gtt_rule、angelone_modify_gtt_rule、angelone_cancel_gtt_rule、angelone_get_gtt_rule、angelone_list_gtt_rules |
| 分析 | angelone_get_option_greeks、angelone_get_gainers_losers、angelone_get_put_call_ratio、angelone_get_oi_buildup、angelone_estimate_charges、angelone_get_margin_api |
快速开始
1. 获取 API 密钥
- 前往 smartapi.angelone.in
- 使用你的 Angel One 账户注册/登录
- 创建应用以获取 API 密钥
- 记下你的 客户代码(Angel One ID)和 PIN
- 设置 TOTP 并记下 TOTP 密钥(来自二维码)
2. 安装
pip install angel-one-mcp
3. 配置 Claude Desktop
将以下内容添加到你的 claude_desktop_config.json:
{
"mcpServers": {
"angel-one": {
"command": "angel-one-mcp",
"env": {
"ANGELONE_API_KEY": "your_api_key",
"ANGELONE_CLIENT_CODE": "your_client_code",
"ANGELONE_PASSWORD": "your_pin",
"ANGELONE_TOTP_SECRET": "your_totp_secret"
}
}
}
}
4. 在 Claude 中使用
"Login to my Angel One account"
"Show my portfolio holdings"
"What's the current price of RELIANCE?"
"Place a buy order for 10 shares of INFY at market price"
"Show me NIFTY historical data for the last month"
"What are the option greeks for NIFTY 23000 CE?"
"Show top gainers in the market"
其他设置方式
直接使用 Python 模块
{
"mcpServers": {
"angel-one": {
"command": "python",
"args": ["-m", "angel_one_mcp.server"],
"env": {
"ANGELONE_API_KEY": "your_api_key",
"ANGELONE_CLIENT_CODE": "your_client_code",
"ANGELONE_PASSWORD": "your_pin",
"ANGELONE_TOTP_SECRET": "your_totp_secret"
}
}
}
}
使用 Docker
docker build -t angel-one-mcp .
docker run -p 8000:8000 \
-e ANGELONE_API_KEY=your_key \
-e ANGELONE_CLIENT_CODE=your_code \
-e ANGELONE_PASSWORD=your_pin \
-e ANGELONE_TOTP_SECRET=your_secret \
angel-one-mcp
使用 MCP Inspector(用于测试)
npx @modelcontextprotocol/inspector
# Command: python
# Args: -m angel_one_mcp.server
环境变量
| 变量 | 必需 | 描述 |
|---|---|---|
ANGELONE_API_KEY | 是 | 开发者门户中的 SmartAPI 密钥 |
ANGELONE_CLIENT_CODE | 是 | 你的 Angel One 客户 ID |
ANGELONE_PASSWORD | 是 | 你的 Angel One PIN |
ANGELONE_TOTP_SECRET | 是 | 用于自动生成 OTP 的 TOTP 密钥 |
ANGELONE_MCP_TRANSPORT | 否 | stdio(默认)或 streamable_http |
ANGELONE_MCP_PORT | 否 | HTTP 模式的端口(默认:8000) |
Angel One SmartAPI——免费
Angel One SmartAPI 完全免费:
- 无月费
- 免费使用交易、投资组合和市场数据 API
- 包含历史 K 线数据
- 包含期权链和分析功能
只需拥有一个有效的 Angel One 交易账户。
许可证
MIT
评论
支持 Markdown
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。