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.0.7.tar.gz (15.2 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.0.7-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pandastock_mcp-1.0.7.tar.gz
  • Upload date:
  • Size: 15.2 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.0.7.tar.gz
Algorithm Hash digest
SHA256 d07c85c2a0c1373c7cd6cca6c7966ce838fafba5041014803b06e7f532f78454
MD5 1d1f52548b5ee63a1f5ce67b2910a3eb
BLAKE2b-256 4141ab8a01d98bc127e1cae88448514f83a12ed6114a3b6c5dd59c4890260166

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pandastock_mcp-1.0.7-py3-none-any.whl
  • Upload date:
  • Size: 14.6 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.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 10784f68669621b687d38d3e24d24310f603cdd2dadc67ea0cc92e40384223f0
MD5 3c0f243af5520a55e6d90db27e94e757
BLAKE2b-256 26495b47679c852805d9f2c7a381c51ba0cbe693000ed3f3192a715ff89874cd

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