PandaStock MCP Server
A股/港股行情数据 MCP (Model Context Protocol) 服务,通过 NATS 协议获取实时行情、历史K线、财务数据等。
安装
pip install pandastock-mcp
快速开始
方式1:Claude Desktop / Cursor(STDIO 模式,推荐)
在 claude_desktop_config.json 或 Cursor MCP 设置中添加:
{
"mcpServers": {
"panda-stock": {
"command": "pandastock-mcp",
"env": {
"PANDA_PHONE": "your_phone_here",
"PANDA_NID": "your_nid_here"
}
}
}
}
STDIO 模式下,MCP Client 启动服务并通过标准输入输出通信,无需网络和端口。
方式2:本地运行
# 设置环境变量
export PANDA_PHONE=your_phone
export PANDA_NID=your_nid
# 启动服务
pandastock-mcp
方式3:Python 直接运行
python -m pandastock_mcp.mcp_server
环境变量
| 变量 | 说明 | 默认值 |
|---|---|---|
PANDA_PHONE |
PandaStock 账号手机号 | 必填 |
PANDA_NID |
PandaStock NID | 必填 |
可用工具
166 个工具接口,覆盖:
- A股列表:个股、概念板块、行业板块列表
- 实时行情:个股、指数、板块、L2、DDX 实时行情
- 历史K线:前复权/后复权/等比复权 日/周/月线
- 分钟数据:实时分钟、历史分钟
- 分笔数据:实时分笔、历史分笔
- 财务数据:利润表、现金流、资产负债表、财务指标
- 资金流:个股资金流、市场资金流
- 新闻公告:核心新闻、国际新闻、个股新闻、公告、研报
- 港股:港股列表、日线、周线、月线、财务数据
- 其他:龙虎榜、融资融券、涨跌停、量化选股
使用示例
{
"name": "get_ch_one_stock_real",
"arguments": {
"code": "600519",
"phone": "13800138000",
"nid": "your_nid"
}
}
License
MIT
Metadata
Release files for pandastock-mcp 1.5.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pandastock_mcp-1.5.4.tar.gz | 64.5 kB | Without provenance | Details for pandastock_mcp-1.5.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pandastock_mcp-1.5.4-py3-none-any.whl | Python 3 | none | any | Details for pandastock_mcp-1.5.4-py3-none-any.whl |
Total release size: 128.3 kB
Release files / pandastock_mcp-1.5.4.tar.gz
| Download URL | pandastock_mcp-1.5.4.tar.gz |
|---|---|
| Size | 64.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5c2ba366001dd3038aa8e6aa45dd2da594b8cf7a4b5b1ad751332a47a0173fc5
|
|
BLAKE2b-256 checksum How to use checksums |
a0bad881fb255652202418232112061e76501a422c6d2d9e39fe453480e8a873
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.9
|
Release files / pandastock_mcp-1.5.4-py3-none-any.whl
| Download URL | pandastock_mcp-1.5.4-py3-none-any.whl |
|---|---|
| Size | 63.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
719e245de26610aef63ef08a690fd679249cde2eae723abf1412b4b8b2c80689
|
|
BLAKE2b-256 checksum How to use checksums |
cd7976f4e2cb7ebcb949c9714249ea8896d2141ce52761eadbbcb78477c6cd80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.9
|
Security for pandastock-mcp 1.5.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.