Skip to main content

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

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)

Source distribution for pandastock-mcp 1.5.4
File Size Uploaded
pandastock_mcp-1.5.4.tar.gz 64.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pandastock-mcp 1.5.4
File Interpreter ABI Platform
pandastock_mcp-1.5.4-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

1.5.4 This release

2 release files

1.5.3

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page