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.0.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.0-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pandastock_mcp-1.2.0.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.0.tar.gz
Algorithm Hash digest
SHA256 3376914d32beb3277d746334ead1a3b25ccb0322d5140d35d5cb9b527bec6232
MD5 ccb8b2af02adf132a3ba85332118f684
BLAKE2b-256 87e29aebebe4fc2a4773de18643df3ae8ced929ea0491b0fc346dd3c19f640fc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pandastock_mcp-1.2.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7ee388c1c3c916bcf304cd4051a433a480935c8afd996c46955046c01357ca0b
MD5 8514931f4ae996ba650f4ba4c5978697
BLAKE2b-256 7976d880850bb99bd2c3ed0fede046ea880054f63c625e3cf76c84c07e65e32e

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