Skip to main content

cn-stock-mcp

中国证券市场行情 MCP 服务。核心交付物是 通用 MCP server;OpenClaw skill 只是仓库内附带的平台适配层。

本工具不提供任何投资参考、投资建议或风险建议,不连接券商,不保存交易账户,也不执行买卖或自动交易。第三方市场数据可能延迟、缺失或错误,用户必须独立核验。

如果你是人类用户: 不要先通读整个仓库,先看 docs/START_HERE.md。

Windows + AI 自部署: 先看 docs/AI_DEPLOY_WINDOWS.md;它是固定版本、token 脱敏和首次问答验收的执行合同。

如果你要把这个 MCP 教给 AI / 集成到 agent: 先看 docs/AI_ONBOARDING.md。

如果你在找“给各个 agent 用的 skill 在哪里”: 先看 docs/AGENT_AND_SKILL_MAP.md。

如果你是 AI agent: 不要默认通读本 README。先读 docs/AGENT_MINIMAL.md,需要最小示例时再读 docs/EXAMPLES_MINIMAL.md。

最短开始路径

人类用户 / 接收方

  • docs/PRODUCT_OVERVIEW.md:对外产品介绍与功能亮点
  • docs/CUSTOMER_DEPLOYMENT.md:客户安装、智兔 token、Host 接入与排障
  • docs/AI_DEPLOY_PROMPT.md:客户复制给本地 AI Agent 的固定版本部署提示词
  • docs/COMMERCIAL_DELIVERY_TEMPLATE.md:一次性销售范围、验收、支持和开源边界模板
  • docs/START_HERE.md:最友好的仓库入口
  • docs/HANDOFF_MINIMAL.md:一页安装与接入
  • docs/HOST_CONFIG_TEMPLATES.md:不同 host 的模板入口
  • docs/AI_ONBOARDING.md:给 AI 集成人员 / agent 作者的使用说明
  • docs/AGENT_AND_SKILL_MAP.md:各 agent / host 用什么、有没有 skill、skill 在哪里
  • docs/FAQ.md:常见错误与排查

最终用户 / 本地 AI agent

  • docs/CUSTOMER_DEPLOYMENT.md:客户部署与排障
  • docs/AI_DEPLOY_PROMPT.md:复制给本地 AI Agent 的部署提示词
  • docs/HANDOFF_MINIMAL.md:一页安装与接入
  • docs/HOST_CONFIG_TEMPLATES.md:不同 host 的模板入口
  • docs/OPENCLAW_HOST_TEMPLATE.md:OpenClaw 单独最终配置块
  • docs/CLAUDE_DESKTOP_TEMPLATE.md:Claude Desktop 单独模板
  • docs/CLAUDE_CODE_TEMPLATE.md:Claude Code 单独模板
  • docs/CONTINUE_TEMPLATE.md:Continue 单独模板
  • docs/VSCODE_TEMPLATE.md:VS Code 单独模板
  • docs/CURSOR_TEMPLATE.md:Cursor 单独模板
  • docs/CLINE_TEMPLATE.md:Cline 单独模板
  • docs/WINDSURF_TEMPLATE.md:Windsurf 单独模板
  • docs/HERMES_TEMPLATE.md:Hermes 单独模板
  • docs/CODEX_TEMPLATE.md:Codex 单独模板
  • docs/FAQ.md:常见错误与排查

AI agent / AI 集成人员

  • docs/AI_ONBOARDING.md:人类可读的 AI 集成说明
  • docs/AGENT_MINIMAL.md:最小规则与路由入口
  • docs/EXAMPLES_MINIMAL.md:最小可工作示例
  • docs/INTERFACE_SCHEMA.md:需要详细契约时再看

集成 / 联调 / 维护

  • docs/INTEGRATION.md:完整挂载、自检与联调清单
  • docs/COMPATIBILITY.md:MCP-only / rules-based / skill-based host 兼容说明
  • docs/HOST_CONFIG_TEMPLATES.md:已核实宿主模板总入口
  • docs/IMPLEMENTATION_STATUS.md:当前实现状态与限制
  • docs/OPENCLAW_INTEGRATION.md:OpenClaw 专属适配说明

快速开始

安装

python -m pip install cn-stock-mcp==0.2.1

本地自检

cn-stock-mcp --version
cn-stock-mcp --doctor
cn-stock-mcp --doctor-network

最小 MCP 配置

{
  "mcpServers": {
    "cn-stock-mcp": {
      "command": "cn-stock-mcp",
      "args": ["--stdio"]
    }
  }
}

更多模板见:

  • .mcp.sample.json
  • docs/HOST_CONFIG_TEMPLATES.md
  • docs/OPENCLAW_HOST_TEMPLATE.md
  • docs/CLAUDE_DESKTOP_TEMPLATE.md
  • docs/CLAUDE_CODE_TEMPLATE.md
  • docs/CONTINUE_TEMPLATE.md
  • docs/VSCODE_TEMPLATE.md
  • docs/CURSOR_TEMPLATE.md
  • docs/CLINE_TEMPLATE.md
  • docs/WINDSURF_TEMPLATE.md
  • docs/HERMES_TEMPLATE.md
  • docs/CODEX_TEMPLATE.md

当前状态

当前已具备:

  • MCP Python SDK stdio transport
  • AKShare / 智兔双源与 fallback
  • 核心市场数据 / 复盘 / 板块 / 技术指标 / 股池能力
  • 打包构建、非 live 回归、provider_health 自检

详细能力与限制见:docs/IMPLEMENTATION_STATUS.md

文档导航

  • docs/PRODUCT_OVERVIEW.md:对外产品介绍与功能亮点
  • docs/CUSTOMER_DEPLOYMENT.md:客户部署、智兔 token 获取、Host 接入与免责声明
  • docs/START_HERE.md:给人类用户的最友好入口
  • docs/AI_ONBOARDING.md:给 AI 集成人员 / agent 作者的说明
  • docs/AGENT_AND_SKILL_MAP.md:各 agent / host 的使用方式与 skill 对照
  • docs/README_DOCS.md:文档总览与阅读顺序
  • docs/HANDOFF_MINIMAL.md:给最终用户 / 本地 AI agent 的一页接入说明
  • docs/HOST_CONFIG_TEMPLATES.md:不同 host 的模板入口
  • docs/OPENCLAW_HOST_TEMPLATE.md:OpenClaw 单独最终配置块
  • docs/CLAUDE_DESKTOP_TEMPLATE.md:Claude Desktop 单独模板
  • docs/CLAUDE_CODE_TEMPLATE.md:Claude Code 单独模板
  • docs/CONTINUE_TEMPLATE.md:Continue 单独模板
  • docs/VSCODE_TEMPLATE.md:VS Code 单独模板
  • docs/CURSOR_TEMPLATE.md:Cursor 单独模板
  • docs/CLINE_TEMPLATE.md:Cline 单独模板
  • docs/WINDSURF_TEMPLATE.md:Windsurf 单独模板
  • docs/HERMES_TEMPLATE.md:Hermes 单独模板
  • docs/CODEX_TEMPLATE.md:Codex 单独模板
  • docs/FAQ.md:常见错误与排查
  • SECURITY.md、SUPPORT.md:漏洞报告与支持边界
  • docs/AI_DEPLOY_WINDOWS.md:交给 Windows AI agent 的自部署与验收流程
  • docs/AI_DEPLOY_PROMPT.md:客户可直接复制的部署提示词
  • docs/COMMERCIAL_DELIVERY_TEMPLATE.md:一次性销售与交付条款模板(非法律意见)
  • docs/WINDOWS_ACCEPTANCE_v0.2.0.md:首发 wheel 的 Windows 验收记录与干净 runner 门禁
  • docs/WINDOWS_ACCEPTANCE_POST_RELEASE_2026-08-20.md:公开 PyPI 安装与真实 MCP stdio 验收补充记录
  • docs/SECURITY.md、docs/PRIVACY.md、docs/DATA_SOURCES.md:安全、隐私和数据来源边界
  • docs/COMPATIBILITY.md:MCP-only / rules-based / skill-based host 兼容说明
  • docs/AGENT_MINIMAL.md:给 AI agent 的最小入口
  • docs/EXAMPLES_MINIMAL.md:最小可工作的调用示例
  • docs/EXAMPLES_FULL.md:完整调用样例(按需展开)
  • docs/IMPLEMENTATION_STATUS.md:当前实现状态与限制(事实源)
  • docs/INTERFACE_SCHEMA.md:对外输入/输出契约与路由约束
  • docs/ERROR_MODEL.md:统一错误码与 retry/fallback 语义
  • docs/INTEGRATION.md:通用 MCP 挂载、自检与联调清单
  • docs/OPENCLAW_INTEGRATION.md:OpenClaw 专属适配说明

OpenClaw adapter

仓库内附带 OpenClaw skill adapter:

  • skills/newsbot-stock-routing/

OpenClaw 专属加载与验证说明见:

  • docs/OPENCLAW_INTEGRATION.md
  • skills/MIGRATION_NEWSBOT_SKILL.md

Metadata

Release files for cn-stock-mcp 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cn-stock-mcp 0.2.1
File Size Uploaded Provenance Actions
cn_stock_mcp-0.2.1.tar.gz 292.5 kB With provenance Details for cn_stock_mcp-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cn-stock-mcp 0.2.1
File Interpreter ABI Platform Actions
cn_stock_mcp-0.2.1-py3-none-any.whl Python 3 none any Details for cn_stock_mcp-0.2.1-py3-none-any.whl

Total release size: 701.1 kB

Release files / cn_stock_mcp-0.2.1.tar.gz

Download URL cn_stock_mcp-0.2.1.tar.gz
Size 292.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ecf5391b115b56e09faab08ea051b07ca36f5b90e5bd969abdca8217b4735466
BLAKE2b-256 checksum
How to use checksums
c0dc6de10ddd4db84ee0205dc01200a676335a5c28ef4f0c7cc481cd55750acf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.

Transparency log

Release files / cn_stock_mcp-0.2.1-py3-none-any.whl

Download URL cn_stock_mcp-0.2.1-py3-none-any.whl
Size 408.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
850f5e1e4d4deb61042a70918424a551a68369b50314a7902e1aca415aedda1f
BLAKE2b-256 checksum
How to use checksums
232940c938a7dde9ec32127655b9c332399705f96f177d506e4bcfdebc8474f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.

Transparency log

Security for cn-stock-mcp 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cn_stock_mcp-0.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page