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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pandastock_mcp-1.1.2.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.1.2.tar.gz
Algorithm Hash digest
SHA256 8223ab8644353e5240741187be80dd4c3ca3b9dfbc500db2702f3bdd52c8e3c1
MD5 3fe0ad4853d71ff70961dda89d4d6566
BLAKE2b-256 05a9df2081be270d9b65f62a82749645ed8758c78518e83b7ac9e66e31e494f7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pandastock_mcp-1.1.2-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.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 65c62c2418979e3b3ffc00dfb4898b16a209789a22b6f6830dfa1a91732d3798
MD5 3181303612100b3a8fb5d784d8d9872e
BLAKE2b-256 a87a0e4fa08810d6d6a4b18c5d1c1788890b53b4d14d8a23395da6b66483f405

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