cninfo-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@cninfo-mcp帮我查一下 600519 2024 年的年报"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
DSH/QCC maintained cninfo-mcp
本仓库是由 DSH/QCC 团队维护的安全加固社区分支,源自
youhaozhao/cninfo-mcp。它不是深圳证券
信息有限公司或巨潮资讯官方产品,也不暗示其背书。
通过 MCP 协议查询和下载巨潮资讯网上市公司定期报告及招股书 PDF 的工具,适用于 Claude Desktop / Claude Code。
并发限制
巨潮资讯网后端禁止大量并发,推荐将并发数设置为 4 以防止后端返回大量 403 导致 IP 短暂被封
Related MCP server: Chinese Stock MCP
使用方法
在 Claude Desktop / Claude Code 配置文件中添加:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"cninfo": {
"command": "npx",
"args": ["-y", "@duhu2000/cninfo-mcp@1.4.3"]
}
}
}1.4.3 起服务为纯 Node 实现;npx 安装完成后即可启动,不需要 Python、
虚拟环境、pip install 或额外的初始化命令。
可用工具
query_annual_reports_tool— 查询报告列表,参数:股票代码(必填)、年份(可选)、报告类型(可选,默认annual) 本安全分支只注册只读查询工具,不提供本地文件下载工具。
支持的 report_type:
annual— 年度报告 / 年报semiannual— 半年度报告 / 半年报 / 中报q1— 第一季度报告 / 一季报q3— 第三季度报告 / 三季报prospectus— 招股书 / 招股说明书 / 招股意向书(招股书无固定年份,省略年份参数即可)
示例对话:
查询 000888 的 2024 年报
查询 000001 的 2024 半年报
查询 600519 的 2024 一季报
查询 920185 的年报 # 北交所,新旧代码(如 835185)均可
查询 688777 的招股书系统要求
Node.js 20+
安全边界
公告检索、页面来源和附件下载均只使用
https://www.cninfo.com.cn或https://static.cninfo.com.cn。默认仅暴露只读查询工具,并声明 MCP
readOnlyHint、destructiveHint、idempotentHint与openWorldHint。不注册文件下载工具,不创建用户目录,也不会启动 Python 或执行
pip install。本项目是独立社区项目,并非深圳证券信息有限公司或巨潮资讯官方产品;使用时 仍应遵守巨潮资讯网站规则与数据使用边界。
数据来源
巨潮资讯网 — 支持沪深两市(主板、创业板、科创板)及北京证券交易所(北交所)
Credits
爬虫逻辑基于 gaodechen/cninfo_process。
结果与错误
股票代码必须为六位数字,可带首尾空白(如 " 000001 ");无效输入在请求或创建目录前被拒绝。
查询和下载结果包含 status:complete 表示完整完成(包括成功查询到零条),partial 表示部分完成,error 表示失败。只有 complete 的 success 为 true。
查询中断时保留已取得的报告,并返回 error / errors;Python 的 query_reports 调用方可从 QueryError.reports 取得部分结果。
下载返回 downloaded、files、failed、failures,另有 query_status 和查询失败时的 query_errors。单个附件失败后继续处理其余附件。
文件名包含附件 URL 的稳定 SHA-256 标识;下载经 PDF 签名与响应类型检查后,使用临时文件原子替换。
附件链接统一解析为 https://static.cninfo.com.cn 地址;下载最多跟随五次重定向,每一跳都校验协议、主机和端口。无效链接在查询结果中显示为空并附带 attachmentError,下载时作为单个附件失败返回。
开发测试
安装 Node 依赖后执行回归测试:
npm ci
npm testAvailable Tools
1 toolquery_annual_reports_tool查询巨潮资讯上市公司报告ARead-onlyIdempotent
查询巨潮资讯网中的上市公司年度、半年度、季度报告或招股书。只返回公告元数据及巨潮 HTTPS 附件链接,不下载或修改文件。
| Name | Required | Description | Default |
|---|---|---|---|
| year | No | 可选会计年度;查询招股书时为公告年份 | |
| stock_code | Yes | 六位股票代码,例如 000001 | |
| report_type | No | annual |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly/idempotent/non-destructive/open-world, so the bar is lower. The description still adds real value by clarifying the tool only returns metadata and HTTPS attachment links and does not download or modify files, which prevents an agent from assuming it fetches report contents.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two tight sentences with the purpose front-loaded and the output constraint second. Nothing is redundant.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description usefully states what is returned (metadata + attachment links) and what is not (no file download/modification). Combined with mostly-documented parameters, an agent has enough to invoke it correctly, though pagination/response shape is unaddressed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 67%: stock_code and year are documented in the schema, while report_type has only an enum with no description. The description partially compensates by enumerating report kinds (年度/半年度/季度/招股书), which maps onto the enum values, but adds no code format or year semantics beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a precise verb (查询) plus the exact resource (巨潮资讯网上市公司年度/半年度/季度报告或招股书). An agent knows immediately that this retrieves regulatory filings from the cninfo network, with no sibling tools to confuse it with.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the use case (fetching listed-company disclosure reports) but never states when to choose this tool or any conditions/exclusions. With no siblings there is no routing alternative to name, so this is adequate but thin guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v1.4.3- First observed
query_annual_reports_tool
TDQS
Scored across 1 tool
With only a single tool, there is no possibility of confusing it with another tool in the set. Its purpose—querying cninfo for listed-company reports—is unambiguous.
The name query_annual_reports_tool follows a clear verb_noun snake_case pattern, which is readable and predictable. The trailing '_tool' suffix is slightly redundant but harmless; consistency across a set cannot really be assessed with one tool.
A single tool for an entire data source (China's official disclosure portal) feels thin—there is no separate search, filtering, or retrieval operation. It is borderline rather than a severe mismatch given the focused read-only scope.
The tool nominally covers annual, semi-annual, quarterly reports, and prospectuses, but as a lone query endpoint it lacks obvious companion operations such as keyword search, date/company filtering, or fetching report content. Notable gaps remain for a full filing-retrieval surface.
Maintenance
Related MCP Connectors
Full-text financial reports (US, China, Japan, Korea, Taiwan) as clean Markdown for RAG agents.
Financial data MCP server for Claude, ChatGPT, Cursor and Codex. Real-time stock quotes, financial statements, options flow, SEC filings, insider trades, 13F holdings, macro data and market news from gloom.sh, the open-source Bloomberg Terminal alternative.
China A-share market data for research, backtesting and AI agents via MCP.
SEC & financial-data MCP: filings, financials, ownership, factors, fund letters, prompts.
Related MCP Servers
- AlicenseCqualityDmaintenanceThe MCP provides comprehensive financial data and analytical tool support for AI large language models, specifically including the following five core data capabilities: Stock Analysis/ETF Analysis/Public Funds/News & Information/General Tools More Info: https://github.com/shenqingtech/deepq-finan4428 npm7ISC
- FlicenseNot gradedqualityDmaintenanceProvides real-time quotes, fund flows, and corporate announcements for Chinese A-share stocks. It enables users to search for stocks, analyze financial indicators, and summarize quarterly reports through natural language.-
- AlicenseNot gradedqualityDmaintenanceEnables access to the CSMAR financial database via MCP, providing tools for querying financial data, stock data, company info, and more through natural language in compatible clients like Codex and Claude Code.10 npm3MIT
- AlicenseNot gradedqualityDmaintenanceProvides 11 MCP tools for querying A-share market data, financial reports, stock screening, hot topics, self-selected stocks, and LOF arbitrage using natural language, powered by East Money / Miaoxiang APIs.MIT