fintrack-eastmoney-mcp
东方财富新闻检索的 MCP Server(stdio)。给百炼智能体提供「按股票代码/名称查近期新闻稿」的能力。
约束全部来自本项目对东方财富 search-api-web 接口的实测(TLS 客户端指纹分桶、时间窗口、
字段结构)。具体数据与判定过程存于开发仓库的内部文档,不随本包发布。
工具
| 工具 | 作用 |
|---|---|
eastmoney_search(keyword, within_days=30, return_count=40, max_pages=5) |
查某标的近期新闻稿。keyword 填 6 位代码或名称都行,服务内部自动补齐另一个写法再查一遍 |
whoami() |
回显出口 IP / FC_REGION / httpx 版本。用来验证「百炼把这个 MCP 跑在哪个地域」和「抓取用的是谁」 |
eastmoney_search 返回里必须读的两件事:
status:只有NO_ARTICLE才是「真没新闻」。BLOCKED/CONNECT_FAIL/EMPTY_BODY是被风控或被降级,这时候不能说「该股近期没有公开报道」——blocked_hint里写着该怎么做。content是 51~153 字的摘要,不是全文。要原文请打开url。
为什么依赖里没有 requests
东财 search-api-web 按 TLS 客户端指纹分桶,与出口 IP 无关:
| 客户端 | 同一关键词返回 | 结论 |
|---|---|---|
| requests 2.28.1(urllib3 1.26,FC 内置 Python 3.10 自带那份) | 706 字节,result 只有 passportWeb,hitsTotal=1 |
❌ 被降级 |
| requests 2.32.5(urllib3 2.x) | 10828 字节,cmsArticleWebOld 20 条,hitsTotal=87 |
✅ |
标准库 urllib.request |
同上 10828 / 87 | ✅ |
| httpx 0.28.1(本包用的) | 同上(2026-11-14 本机实测 600196→292、威海广泰→87,与上面两行逐值相同) | ✅ |
换 Referer、换全套浏览器 sec-* 头均无效(三组头在 2.28.1 下都还是 706)。
2026-11-14 又在阿里云北京函数计算出口上做了客户端双向夹逼复测(requests 与标准库交替出现),
其中同一个出口 IP 上只换取字节的库就翻转 ⇒ 已确认为指纹而非 IP。(注意:云上那一轮验的是
requests 2.28.1 与标准库 urllib,不是 httpx,本包的 httpx 尚未经过云上出口。)
为什么依赖锁了 mcp<2
2026-11-14 的干净 venv 预演发现:只写 mcp[cli]>=1.0 会被解析到 mcp 2.x,而 2.x 把
mcp.server.fastmcp 改名成了 mcp.server.mcpserver.MCPServer,本包的 import 第一行就挂。
同时 2.x 拉的是 httpx2 而不是 httpx,上面那整节 TLS 指纹结论会重新变成未知数。
现在 pin 已锁 >=1.0,<2(实测解析到 mcp 1.30.0 / protocol 2025-11-25)。
要升到 2.x 是一次真正的代码迁移,不是改一个版本号。
本地跑
cd docs\mcp_eastmoney
uv sync # 没装 uv 则:python -m pip install -e .
uv run fintrack-eastmoney-mcp # stdio 进程,Ctrl+C 退出
用 MCP 官方 inspector 连上去,或直接按开发仓库「路线 E 免备案部署」文档 3.4 在百炼控制台 「工具」页试跑(推荐后者,那是唯一硬证据)。
百炼侧配置(E1:发 PyPI + 百炼托管 uvx)
{
"mcpServers": {
"fintrack-eastmoney": {
"type": "stdio",
"command": "uvx",
"args": ["fintrack-eastmoney-mcp"]
}
}
}
⚠ 发布后只能改服务名称和描述;要改部署方式/地域/安装方式/服务配置,必须先「停止当前部署」 再重新部署(官方规矩,见路线E 3.3)。
⚠ 包是全世界可读的:里面不得含任何 Key。本包不需要任何凭证(东财检索接口无鉴权)。
已验证 / 未验证
| 项 | 状态 |
|---|---|
| 取数、代码↔名称映射、去重、按 date 倒序、30/60 天窗口放宽 | ✅ 2026-11-14 本机冒烟 4 例通过(家宽出口) |
| JSONP 剥壳三形态(带后缀回调名 / 括号内空格 / 无壳裸 JSON) | ✅ 同上,5 例全过 |
从干净 venv 装 wheel 后 fintrack-eastmoney-mcp 能起来(预演 uvx) |
✅ 2026-11-14 过:官方客户端 SDK 真 stdio JSON-RPC 握手 + 三例调用全绿。⚠ 走的仍是家宽出口 |
| 在 FC 北京出口跑(而不是家宽) | ⚠ httpx 本身未验。探针已证同一出口上 stdlib 通、requests 2.28.1 被降级;本包不单独为 httpx 配云上层,由下一行的百炼「工具」页真跑顺带补齐(uvx 会装 httpx,出口同为阿里云北京) |
| 在百炼「工具」页真跑通 | ⚠ 未验(要等 3.2 发布 + 3.3 创建服务) |
| 间歇风控下的退避重试实际效果 | ⚠ 未验。本机一次通过不代表云上通过 |
上表最后三行全部卡在同一个动作上:发包 + 百炼建服务。在那之前,“北京出口通”只是 对 stdlib 与探针而言成立,不能当成“httpx 在百炼通”。
Metadata
Release files for fintrack-eastmoney-mcp 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fintrack_eastmoney_mcp-0.0.1.tar.gz | 14.3 kB | Without provenance | Details for fintrack_eastmoney_mcp-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fintrack_eastmoney_mcp-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for fintrack_eastmoney_mcp-0.0.1-py3-none-any.whl |
Total release size: 28.1 kB
Release files / fintrack_eastmoney_mcp-0.0.1.tar.gz
| Download URL | fintrack_eastmoney_mcp-0.0.1.tar.gz |
|---|---|
| Size | 14.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1f98550fe107c1827eafb60684334d5ca5a9bf12ed96b23ac9569651bc06112d
|
|
BLAKE2b-256 checksum How to use checksums |
f186a6641b281dda6f8c1f5c66c3668649eaa0c68cccdc8c35876e39832582da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.0
|
Release files / fintrack_eastmoney_mcp-0.0.1-py3-none-any.whl
| Download URL | fintrack_eastmoney_mcp-0.0.1-py3-none-any.whl |
|---|---|
| Size | 13.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
85a839b561ba92a79ad5857eb10e1a208d5d7a45d2ee8454695e09ae38999c33
|
|
BLAKE2b-256 checksum How to use checksums |
8c4d88ae691eab950a7abacfba6a8966c234657b30d2e85fab304ccf7f3f1d13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.0
|
Security for fintrack-eastmoney-mcp 0.0.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.