
HanjialeGit
io.github.hanjialeGitPublished by GitHub account hanjialeGitv0.1.3Updated Oct 24, 2026
天启至数 ApocData - MCP Server for A-share market data (46 free, no-auth endpoints)
Overview
Wraps 46 free, no-auth ApocData endpoints for China A-share market data into MCP tools an assistant can call from any stdio client.
- What you can do
- Fetch quotes, daily bars, stock lists, rankings, indexes and hot ranks
- Read financials, dividends, shareholder and block-trade data
- Inspect money flow, northbound holdings, margin, dragon-tiger and hot-money data
- Check limit-up/limit-down lists, sector flows, concepts and board constituents
- Look up announcements, surveys, convertible bonds, factors, macro indicators and calendars
- Pull a combined stock profile and factor categories, plus three markdown guide resources
- When to use it
- Useful when you want an assistant to answer questions about Chinese A-share prices, fundamentals, capital flows, sectors or macro data without building your own API integration.
- Requirements
- Runs locally over stdio via npx or a global npm install; needs Node.js and outbound network access to the ApocData API. No account or API key is required for the free tier; optional environment variables APOCDATA_BASE_URL, APOCDATA_DEBUG, APOCDATA_TIMEOUT_MS and APOCDATA_MAX_RETRIES tune the endpoint, logging, timeout and retries.
Installation
In SourceWeft
- Open HanjialeGit in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
@apocdata-info/mcp-server
天启至数 ApocData 的 MCP(Model Context Protocol)Server。把 46 个 A 股数据接口包装成 MCP tools,可在 Claude Desktop / Cursor / Cline / Continue 等任意 MCP client 中直接调用。
- 数据源:
https://www.apocdata.com/api/blade-dataplatform/open/data/* - 免费体验额度:无需注册即可调用;注册解锁更高额度与更多数据能力
- 自动透传
X-Tdc-*元信息头(限流剩余/截断标志/错误码/缓存策略) - 46 工具覆盖:行情、估值、财务、股东、资金流、涨跌停、板块、公告、宏观、因子、综合画像
安装
方式 A:npx(推荐,零安装)
直接在 client 配置里写 npx -y @apocdata-info/mcp-server,无需手动 install。
方式 B:全局安装
Client 配置示例
Claude Desktop
编辑 ~/Library/Application Support/Claude/claude_desktop_config.json(macOS)或 %APPDATA%\Claude\claude_desktop_config.json(Windows):
Cursor
~/.cursor/mcp.json:
Cline / Continue / 其它 stdio MCP client
同上,传 command=npx, args=["-y","@apocdata-info/mcp-server"] 即可。
CLI flags
信号
SIGTERM/SIGINT:优雅退出。等正在进行的请求完成(最多 5 秒),再关闭 transport 退出。
调试模式
环境变量 APOCDATA_DEBUG=1 会把每次 HTTP 调用的 path/status/meta 打到 stderr:
自定义 BASE URL
环境变量 APOCDATA_BASE_URL 可指向内网/私有部署:
超时与重试
4xx 不重试(业务错误重试无意义)。重试用尽后返回最后一次的 5xx 响应,或抛 NetworkError(网络异常)。
工具清单(46 个)
每个 tool 的入参/出参/默认值在 MCP 协议层用 JSON Schema 暴露,client 会自动展示。
MCP Resources
除工具外还暴露 3 个 markdown 文档,Agent 通过 resources/list 和 resources/read 拉取:
用法示例(在 Claude 里直接问)
性能与限流
- 单 IP 限流:60 req/min(响应头
X-Tdc-RateLimit-Remaining透传剩余配额) - 缓存策略:盘中实时数据 5s、盘后日更 5min、元数据 1h(
Cache-Control头自动给) limit参数上限 50,超出会静默截断(看响应头X-Tdc-Truncated)- 大批量数据建议用
format=compact列式输出,节省 60-70% token - 字段较多的接口(如 financial、announcements)支持
fields=...裁剪
详细行为参考主 SKILL 文档:https://github.com/ApocData/ApocData-skill
开发
源码结构:
要加一个新接口:在 tools.ts 对应分组里加一条 ToolDef,重新 build 即可,无需改其它代码。
测试
六个脚本对应六种验证:
私有部署:APOCDATA_BASE_URL=http://your.host/path npm test
生产契约基线
当前 www.apocdata.com 已提供并由测试套件持续验证:
ranking/macro/macro/latest/macro/definition/sector-flow/hot-rank/margin的非法 enum 校验X-Tdc-Error-Code响应头X-Tdc-RateLimit-Remaining响应头(限流剩余配额)X-Tdc-Truncated响应头(limit 超上限通知)format=compact列式输出/profile/full和/factor-categories两个端点本身
License
Apache-2.0
Source: README.md at commit 00157f3
Tools
0Version history
1- v0.1.3LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts