MCP · STREAMABLE HTTP · OFFLINE DETERMINISTIC

DRAM S01–S08
离线研究引擎

把 8 个 DRAM 存储行业研究技能打包成标准 MCP 服务。调用方自备数据,引擎跑确定性计算,输出结构化研究结果——不碰任何外部数据 API。

https://dram.fincept.top/mcp
9
MCP 工具
8
研究技能
0
数据 API 依赖
–
当前在线工具
01

工具

8 个计算工具 + 1 个规范文档工具

02

研究链路

上游输出喂给下游,全程可追溯

S01
研究对象构建
5–8 家池 + 证券映射 + 覆盖矩阵
→
S02
周期识别
信号分层 → cycle_state
→
S03
产品暴露
exact/combined 口径 + mix
→
S04
经营动量
share/growth/margin/capex
→
S05
驱动拆解
price/vol/mix/cost 方向矩阵
→
S06
证据核验
claim → evidence_ledger
→
S07
弹性排序
业务/证据/置信 三分离
→
S08
事件路由
局部重跑 + 版本计划
03

保守降级红线

调用方必须遵守,引擎强制执行

⚠
Missing ≠ 0 — 数据缺失保留 null,绝不填 0。Fab 记录为零 ≠ 零产能。
⚠
Combined 口径不精确 — 三星/海力士等 DRAM&NAND 合并暴露只做方向,不拆精确值。
⚠
Inference 不升 Fact — S06 二手新闻、proxy 不能升级为"已确认",需 S06 核验通过才算。
⚠
FIN_YOY 未冻结 — S02 置信度锁死 Medium,不上 High。
⚠
不出交易建议 — S07 只出相对弹性排序,不输出 Buy/Sell。
04

入参 Schema

每个 input 是 JSON 字符串

工具必输字段
dram_s01task_id · product_node_count=1 · companies[] · inputs{product_id, market_scope, as_of, ranking_mode, company_ids[], period, start_period, end_period, feature_set[], time_window, signal_min_count}
dram_s02同 S01 + signals[](每条 kind∈growth/price/supply/news/market · source · period · metric · direction∈up/down/flat · evidence)
dram_s03同 S01(inputs 需 company_ids+period)
dram_s04同 S01(inputs 需 company_ids+start_period+end_period+feature_set)
dram_s05task_id · inputs{product_id, company_ids[], start_period, end_period, driver_mode="directional", cycle_state{}, exposure_features[], operating_feature_matrix[], driver_matrix[], claim_list[], evidence_summary[], new_event{}, research_state{}} · 顶层 evidence_catalog[]
dram_s06同 S05(读 claim_list+evidence_catalog)
dram_s07同 S05(读 cycle_state/exposure/operating/driver_matrix/evidence_summary)
dram_s08同 S05 + inputs.new_event + inputs.research_state
dram_skill_docskill = "S01".."S08" → 返回 SKILL.md + Card + Contract + Runtime + fixture 全文

companies[] 字段(S01/S03/S04)

companies[0] 复制
{
  "company_id": "C001",
  "name": "长鑫科技",
  "security_id": "688825.SH",
  "exposure_type": "exact",        // exact | combined
  "ratio": 0.98,                    // exact 口径 DRAM 收入占比
  "combined": null,                 // combined 口径总占比
  "share": 0.0743,                 // 2025 市占率
  "previous_share": 0.0397,        // 2024 市占率
  "yoy": 9.77,                      // 营收 YoY
  "gross_margin": 0.0558,
  "net_margin": -0.37,
  "capex": 95.93,                  // 亿元
  "fab_records": 3,
  "product_mix": {"LPDDR": 0.66, "DDR": 0.32}
}

输出 status 语义

status含义调用方动作
success全部通过直接消费 outputs
partial有 missing 但可出结果看 missing_fields,标注数据缺口后消费
blocked必输字段缺失按 next_actions 补数据重跑
05

各框架接入

选你的 agent 框架

在 MCP 配置 JSON 里加一个 dram 远端 server:

opencode.json 复制
{
  "mcp": {
    "dram": {
      "type": "remote",
      "url": "https://dram.fincept.top/mcp",
      "enabled": true
    }
  }
}

在 claude_desktop_config.json 里加:

claude_desktop_config.json 复制
{
  "mcpServers": {
    "dram": {
      "type": "url",
      "url": "https://dram.fincept.top/mcp",
      "transport": "streamablehttp"
    }
  }
}

不挂框架,Python 标准 MCP 客户端直接调:

call_dram.py 复制
import json, asyncio
from mcp import ClientSession
from mcp.client.streamable_http import streamablehttp_client

async def main():
    async with streamablehttp_client(
            "https://dram.fincept.top/mcp") as (r, w, _):
        async with ClientSession(r, w) as s:
            await s.initialize()

            # 1) 先读规范
            doc = json.loads((await s.call_tool(
                "dram_skill_doc", {"skill": "S05"})).content[0].text)
            print(doc["card"][:300])

            # 2) 喂数据算
            s05 = json.load(open("s05_input.json"))
            out = json.loads((await s.call_tool(
                "dram_s05", {"input": json.dumps(s05)})).content[0].text)
            print(out["status"],
                  out["outputs"]["driver_matrix"][0]["drivers"])

asyncio.run(main())

浏览器 UI,逐个试工具、看入参 schema:

terminal 复制
npx @modelcontextprotocol/inspector \
  --transport streamablehttp \
  --url https://dram.fincept.top/mcp
06

给外部 agent 的接入提示词

整段复制,贴进对方 agent 即可自接入

agent-onboarding.md 复制整段
# DRAM S01-S08 研究 MCP

## 端点
- URL: https://dram.fincept.top/mcp
- 协议: MCP, streamable HTTP transport
- 鉴权: 无
- 9 工具: dram_s01~dram_s08(离线计算) + dram_skill_doc(取规范文档)

## 标准用法(先读规范,再喂数据)
1. dram_skill_doc(skill="S0X")  →  拿该技能的 Card/Contract/Runtime/fixture 全文
2. 按 fixture 的 input schema 组装 JSON(调用方自备数据, MCP 不取数)
3. dram_s0X(input=)  →  拿结构化输出 { status, outputs, missing_fields, next_actions }

## 红线(每个工具都遵守)
- input 里的 null 是"数据缺失", 不要填 0
- 输出 status=blocked 时按 missing_fields + next_actions 补数据重跑
- 不输出 Buy/Sell 交易建议, 只出研究结论

## 输入 schema(各工具必输字段)
- dram_s01: task_id, product_node_count=1, companies[], inputs{product_id="DRAM", market_scope, as_of, ranking_mode, company_ids[], period, start_period, end_period, feature_set[], time_window, signal_min_count}
- dram_s02: 同 S01 + signals[](每条需 kind∈growth/price/supply/news/market, source, period, metric, direction∈up/down/flat, evidence)
- dram_s03: 同 S01(inputs 需 company_ids + period)
- dram_s04: 同 S01(inputs 需 company_ids + start_period + end_period + feature_set)
- dram_s05: task_id, inputs{product_id, company_ids[], start_period, end_period, driver_mode="directional", cycle_state{}, exposure_features[], operating_feature_matrix[], driver_matrix[], claim_list[], evidence_summary[], new_event{}, research_state{}, research_project_id, current_version} + 顶层 evidence_catalog[]
- dram_s06: 同 S05(读 claim_list + evidence_catalog)
- dram_s07: 同 S05(读 cycle_state / exposure / operating / driver_matrix / evidence_summary)
- dram_s08: 同 S05 + inputs.new_event + inputs.research_state

## companies[] 字段(S01/S03/S04)
{ "company_id":"C001","name":"长鑫科技","security_id":"688825.SH","exposure_type":"exact","ratio":0.98,"share":0.0743,"previous_share":0.0397,"yoy":9.77,"gross_margin":0.0558,"net_margin":-0.37,"capex":95.93,"fab_records":3,"product_mix":{"LPDDR":0.66,"DDR":0.32} }
  - exposure_type: exact | combined
  - combined 口径用 combined 字段(如三星 0.39), exact 口径用 ratio

## 各框架接入配置
- OpenCode: { "mcp": { "dram": { "type":"remote", "url":"https://dram.fincept.top/mcp", "enabled":true } } }
- Claude Desktop: { "mcpServers": { "dram": { "type":"url", "url":"https://dram.fincept.top/mcp", "transport":"streamablehttp" } } }
- Python:
    from mcp import ClientSession
    from mcp.client.streamable_http import streamablehttp_client
    async with streamablehttp_client("https://dram.fincept.top/mcp") as (r,w,_):
        async with ClientSession(r,w) as s:
            await s.initialize()
            out = json.loads((await s.call_tool("dram_s01", {"input": json.dumps(s01)})).content[0].text)

## 输出 status 语义
- success: 直接消费 outputs
- partial: 看 missing_fields, 标注数据缺口后消费
- blocked: 按 next_actions 补数据重跑

## 数据
MCP 纯离线, 不调外部 API。调用方自备数据(行情/财务/市占率/capex/fab), 按 schema 喂进去。