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.2.1.tar.gz (19.9 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.2.1-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pandastock_mcp-1.2.1.tar.gz
  • Upload date:
  • Size: 19.9 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.2.1.tar.gz
Algorithm Hash digest
SHA256 f247bf617dd127a78b0403605e267392c7d3a5708cfd227a516e252cfeb68fe7
MD5 05ab67151a49550c5bc2542d542de0ba
BLAKE2b-256 c768824069f113236fd52f18005b89d9bd2861e50e010c725b2c54dcb2a81e0e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pandastock_mcp-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 18.9 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.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c84d08561c7ce788f1ba1142a796f40d3099d689d0e4b133cb8855f1dde435cb
MD5 83941e09d46f30255f56f7ef7c13c2bc
BLAKE2b-256 8ec8d5009c0f64001610fe2b3b94d9206285dd8bbd50f6d65d535c4b33951ff1

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