Skip to main content

PandaStock MCP Server - A股/港股行情数据 MCP 服务

Project description

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 必填

可用工具

52 个工具接口,覆盖:

  • A股列表:个股、概念板块、行业板块列表
  • 实时行情:个股、指数、板块、L2、DDX 实时行情
  • 历史K线:前复权/后复权/等比复权 日/周/月线
  • 分钟数据:实时分钟、历史分钟
  • 分笔数据:实时分笔、历史分笔
  • 财务数据:利润表、现金流、资产负债表、财务指标
  • 资金流:个股资金流、市场资金流
  • 新闻公告:核心新闻、国际新闻、个股新闻、公告、研报
  • 港股:港股列表、日线、周线、月线、财务数据
  • 其他:龙虎榜、融资融券、涨跌停、量化选股

使用示例

{
  "name": "get_ch_one_stock_real",
  "arguments": {
    "code": "600519",
    "phone": "13800138000",
    "nid": "your_nid"
  }
}

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pandastock_mcp-1.3.0.tar.gz (55.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pandastock_mcp-1.3.0-py3-none-any.whl (54.3 kB view details)

Uploaded Python 3

File details

Details for the file pandastock_mcp-1.3.0.tar.gz.

File metadata

  • Download URL: pandastock_mcp-1.3.0.tar.gz
  • Upload date:
  • Size: 55.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for pandastock_mcp-1.3.0.tar.gz
Algorithm Hash digest
SHA256 7b59b2c0f7e274b7ef2a9ca22172f48edb801c3e7e152a5e8f85631751d8e239
MD5 d3533d1aebe3b22736f0e2dfc727efb4
BLAKE2b-256 6aeb5c458fe785d968362d6174ade16c9d12a1e6fe491ad0ed56ec26d5541c6d

See more details on using hashes here.

File details

Details for the file pandastock_mcp-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: pandastock_mcp-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 54.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for pandastock_mcp-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0052915c22a2d37cfb71da968f89d1b879b8ed7f7bfccb009fd90a114abe5cfd
MD5 fb02f4b04a1060a8a2995e9b5d11595b
BLAKE2b-256 e15c25072340ca1299b04e9a754fe84f6bf4e6bfc60632703ce1a3be43144bf0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page