Skip to main content

diyan-research-mcp · 企业研究证据链

面向企业投研与产业研究团队的只读研究 MCP,提供研究框架、冻结快照与历史因子摘要,每条结论附来源、数据截至日与证伪条件,不输出交易建议。

这个仓库里没有数据

本仓库只包含转发壳,职责是三件事:校验入参、携带租户凭据调用研究数据服务、在返回前剥掉交易类字段。研究框架、冻结快照、假设台账和因子摘要都存放在服务端,不随代码分发。

AI 客户端  ──MCP──▶  diyan-research-mcp(本仓库)  ──HTTPS──▶  研究数据服务
                     入参校验 / 凭据转发 / 输出过滤        数据、租户、档位、配额、审计

这样分层有三个后果,都是有意为之:

  • 壳可以公开审阅,因为它不含任何专有数据,也不含任何密钥。
  • 租户身份、档位和配额一律由服务端裁定,壳不做信任判断,也就无法被绕过。
  • 输出过滤留在壳内而不是只放在服务端,即便服务端出错或被篡改,交易类表述也无法离开进程。

工具

工具 说明
framework_excerpt 读取研究框架片段,可选 enterprise / business / finance / people / brand
stock_snapshot_latest 读取最新冻结的股票研究快照
hypothesis_get 读取通过交付证据门槛的冻结假设
cognition_radar_read 读取历史主题研究雷达摘要
ic_backtest_summary 读取冻结的因子历史 IC 摘要
research_analyze_safe 调用受控研究接口做单标的研判

工具是否可用取决于凭据对应的档位。免费档开放研究框架与部分冻结快照,其余返回 error_type: backend 并说明需要付费租户凭据。

配置

唯一必填项是 DIYAN_API_KEY,在 MCP 详情页填写即可。其余变量见 .env.example,只在自建部署或联调时需要。

凭据缺失时进程仍会正常启动,但每次工具调用都会返回明确的配置错误。这是刻意的:托管环境可能在使用者填写凭据之前就拉起进程,启动即崩溃会让详情页上的服务看起来是坏的。

本地运行

python -m pip install -r requirements.txt
export PYTHONPATH=src
export DIYAN_API_KEY=<你的租户凭据>
export DIYAN_TRANSPORT=stdio
python -m diyan_research_mcp.server

测试不需要网络和凭据:

python -m unittest discover -s tests -v

边界

  • 只读。没有任何写入、下单、部署或数据导出能力。
  • 不返回实时行情。快照与摘要都是冻结产物,每条结果都带 as_of。
  • 不生成买卖、仓位、股数、跟单或收益承诺。含此类表述的提问在发出请求前就会被拒绝。
  • 不读取使用者的本地文件、本地数据库或非必要环境变量。

服务端契约

如需自建后端,接口定义见 docs/BACKEND_CONTRACT.md。

许可与归属

由深圳瞳桦文化传媒有限公司开发与维护。MIT 许可,见 LICENSE。

Metadata

Release files for diyan-research-mcp 0.1.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 diyan-research-mcp 0.1.1
File Size Uploaded Provenance Actions
diyan_research_mcp-0.1.1.tar.gz 12.2 kB Without provenance Details for diyan_research_mcp-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for diyan-research-mcp 0.1.1
File Interpreter ABI Platform Actions
diyan_research_mcp-0.1.1-py3-none-any.whl Python 3 none any Details for diyan_research_mcp-0.1.1-py3-none-any.whl

Total release size: 23.7 kB

Release files / diyan_research_mcp-0.1.1.tar.gz

Download URL diyan_research_mcp-0.1.1.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f156632fcafa637f7c5ce35d0729d49776d17f5153adfb2344f8d5c7004dbada
BLAKE2b-256 checksum
How to use checksums
5cd134c257fcb9a007d0ebcd46d95ff6b50c3d4d35cba27572de10fedc073888
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / diyan_research_mcp-0.1.1-py3-none-any.whl

Download URL diyan_research_mcp-0.1.1-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
afd64a5344aa1f284919bb33148c9e58cc0e8d0fd9357d5a72ddeeb6bd478c80
BLAKE2b-256 checksum
How to use checksums
0e87da0da6ad3b4ea44ee5ddb8f1e7254792865ede48fe768cfdfbd44f228d94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Security for diyan-research-mcp 0.1.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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

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