datasheet-mcp
Reads structured component parameter descriptions from the EasyEDA Professional library via ds_part_info.
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., "@datasheet-mcp pull the pinout for TPS5430 and cite the page it came from"
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.
datasheet-mcp
给 AI 用的器件手册检索与取证 MCP 服务。解决一个具体问题:AI 画原理图时"看起来读过手册",其实参数是编的。
本服务把"读手册"变成可验证的动作——每个参数都能回到 哪份 PDF、第几页、原文哪一句。
1. 它做什么
能力 | 说明 |
找料 | 按型号/关键词查元件库,拿立创 C 编号、封装、库存、单价 |
取文 | 自动下载 datasheet,优先厂商官网原链,其次 LCSC 托管,最后立创 atta |
验型 | 下载后校验正文是否出现该 MPN,防止下到同系列别的型号 |
读引脚 | 抽取引脚表(脚号/名称/类型/描述/页码);跨页表自动合并;多封装器件可指定 package;无表格的手册退化为渲染图 |
读参数 | 按品类抽重点参数(Vin/Vout/压差/耐压/Rds(on)/结电容/热阻等),带 min/typ/max、条件与行级页码;跨页表自动合并 |
读章节 |
|
读应用 | 取 Typical Application 章节文本 + 页面渲染图,供多模态复核 |
反查 |
|
免查规划 | 同型号多颗只查一次;通用阻容感默认不查,除非要求 ESR/漏电流等 |
库信息 |
|
Related MCP server: Electronics Docs MCP Server
2. 实测性能(本机,2026-12)
环节 | 耗时 |
元件库检索(17 条结果) | 0.6 s |
下载 TI 官网 PDF(2.2 MB) | 0.4 s |
下载 LCSC 托管 PDF(1.2 MB) | 3.5 s |
解析 40 页 + 抽引脚/参数表 | 2.6 s |
单器件端到端(首次) | 约 5~8 s |
单器件端到端(缓存命中) | 约 1~3 s |
三个案例全部跑通:TPS5430(40 页中文手册,8 引脚全对)、TLV70233(SOT-23-5,5 引脚)、AO3400(6 页国产手册,无 TOC,走渲染兜底)。
3. 架构
MCP 工具层 (server.mjs)
├─ ds_search / ds_plan 选型与覆盖规划
├─ ds_fetch / ds_outline 取文与目录
├─ ds_pinout / ds_keyparams 引脚与参数
├─ ds_app 典型应用
└─ ds_quote 引文反查
业务层 (core.mjs)
├─ 定位 C 编号 → 多源取 PDF → 型号一致性校验 → 缓存(+SHA256)
取文层 (sources.mjs)
├─ JLCPCB 元件库 API 型号/库存/价格
├─ JLCPCB partdetail 页 厂商官网直链
├─ LCSC product-detail 页 datasheet.lcsc.com 托管 PDF
└─ 立创 atta 兜底
解析层 (pdf_engine.py, PyMuPDF)
├─ PDF 内置目录 → 章节页码 + 标题纵坐标
├─ 按纵坐标切分同页多章节(TI 把 5.1/5.2/5.3 放同一页)
├─ find_tables 抽表 + 表头两行合并 + MIN/TYP/MAX 合并单元格拆分
├─ 跨页续表合并(表头指纹 + 列数校验 + 行级页码)
├─ 多封装引脚表按 package 选列(LQFP48 / LQFP64 / BGA…)
└─ 中英文表头/标题双支持4. 安装
npm install
python -c "import fitz; print(fitz.__doc__)" # 需要 PyMuPDF环境变量:
变量 | 默认 | 说明 |
|
| Python 解释器路径 |
5. 接入 MCP 客户端
复制 mcp.json.example,把 args 改成你机器上的绝对路径:
{
"mcpServers": {
"datasheet-mcp": {
"command": "node",
"args": ["C:/path/to/datasheet-mcp/src/server.mjs"],
"env": { "DS_PYTHON": "python" }
}
}
}6. 工具返回示例
ds_pinout(TPS5430,中文手册第 3 页):
{
"lcsc": "C9864",
"pins": [
{"pin": "1", "name": "BOOT", "type": "O", "desc": "高侧 FET 栅极驱动器的升压电容器…", "page": 3},
{"pin": "2,3", "name": "NC", "type": "—", "desc": "内部未连接。", "page": 3},
{"pin": "4", "name": "VSENSE", "type": "I", "desc": "反馈电压…", "page": 3},
{"pin": "8", "name": "PH", "type": "I", "desc": "高侧功率 MOSFET 源极…", "page": 3},
{"pin": "", "name": "DAP", "type": "—", "desc": "GND 脚必须连到外露焊盘…", "page": 3}
]
}ds_keyparams(AO3400):
参数 | min | typ | max | 单位 | 条件 | 页 |
RDS(ON) | 18 | 28 | mohm | VGS=10V, ID=5.8A | 1 | |
VGS(th) | 0.65 | 1.05 | 1.45 | V | VDS=VGS, ID=250uA | 1 |
Qg | 6 | 7 | nC | VDS=15V, VGS=4.5V | 1 |
7. 关键设计决策
Q:为什么不整本 PDF 喂给模型? 40 页约 3 万 token,且表格错位后模型更容易读错。先给目录,再只取 1~3 页关键表,速度差 10 倍,准确率更高。
Q:怎么证明"真的读过"?
不能证明模型读过,只能证明引用的原文确实存在于该 PDF 该页。ds_quote 做的就是这件事:命中=有出处,未命中=不许写。这是可被第三方复现的。
Q:为什么要校验 MPN? 实测踩到:C26833(TLV70233)的 LCSC 页面挂的是 TLV733P 的手册。不校验就会"用别的手册算自己的参数",比不读更危险。
Q:为什么保留多源回退? 厂商站不稳定——实测 ST 超时、Microchip/Nexperia 直接 403。只依赖官网会大面积失败。
8. 已知局限
扫描件:无文字层时
is_scanned=true。装了tesseract会自动对章节做 OCR(只能取文字,表格结构丢失);没装则退化为渲染图,交多模态模型看图。表格合并的边界:靠"表头指纹 + 列数 + 页邻接"判断续表,若手册续页改了表头措辞,会退回为两张表。
同名多后缀:按 MPN 精确缓存,但手册可能只覆盖系列(如 TPS5430/TPS5431 共用一份),参数需按型号行取。
多封装表:默认取第一列,需显式传
package;封装名拼写差异靠模糊匹配,极端情况会选错列(返回package_used可核对)。免查判定是启发式:品类识别依赖
describe字段;BOM 不带品类时会保守地判定为"需要查"。LCSC 反爬:页面结构变动会导致取文失败,需按
sources.mjs的 tier 顺序补源。
9. 验收
逐条可复现的检查表见 ACCEPTANCE.md,含环境自检、功能验收、边界场景(跨页表、多封装、无目录小手册、中文手册、手册错配)与数据一致性。
版本变更见 CHANGELOG.md,开发与贡献方式见 CONTRIBUTING.md。
10. 目录
datasheet-mcp/
├── src/
│ ├── server.mjs MCP 工具定义
│ ├── core.mjs 取文主流程 + 重点参数筛选
│ ├── sources.mjs 检索/下载/多源回退
│ ├── policy.mjs 查不查的判定 + BOM 覆盖计划
│ ├── cache.mjs 缓存/哈希/路径
│ ├── bridge.mjs 调用 Python 引擎
│ └── pdf/py/pdf_engine.py PDF 解析引擎
├── test/
│ ├── smoke.mjs 单器件全链路冒烟
│ ├── cases.mjs 三个器件案例 + BOM 计划
│ └── mcp-smoke.mjs MCP 协议握手测试
└── cache/ 运行时生成(PDF/元数据/渲染图/报告)Available Tools
10 toolsds_appA
取 Typical Application 章节文本与页面渲染图(图片路径可直接给多模态模型看)。仅作参考,元件值必须重算。
Inputs: ident (required).
ds_fetchC
下载指定器件的数据手册并记录来源、SHA256、页码;同一型号只下一次。ident 可为 C 编号或型号。
Inputs: ident (required), force.
ds_keyparamsB
抽取重点参数(按品类自动筛选:输入范围/输出能力/压差/耐压/结电容/热阻等),带 min/typ/max、条件与页码。
Inputs: ident (required), category.
ds_outlineA
返回手册章节树与页码。先看目录再决定读哪节,避免整本塞进上下文。
Inputs: ident (required).
ds_part_infoB
从 EasyEDA 专业版器件库读取结构化信息(参数描述/厂商/封装/符号)。需要 EDA 与 daemon 运行;失败返回 available=false。
Inputs: ident (required).
ds_pinoutB
抽取引脚定义表(脚号/名称/类型/描述/页码),跨页表自动合并,多封装器件可用 package 指定列。
Inputs: ident (required), limit, package.
ds_planB
规划 BOM 的手册核查覆盖:同型号多颗只查一次;通用阻容感默认免查;其余必须取证。
Inputs: items (required).
ds_quoteB
校验一段原文是否真的出现在手册指定页。返回 found/page/context,用于证明参数有出处。
Inputs: text (required), ident (required), page.
ds_searchB
按型号/关键词检索元件库,返回立创 C 编号、封装、库存、单价。用于选型初筛。
Inputs: query (required), limit.
ds_sectionB
读取任意章节全文(按 key 或标题片段,如 key=layout / title=Package)。用于引脚、参数、典型应用之外的补充内容。
Inputs: ident (required), key, title, max_chars.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
The set is organized as a clear pipeline: search → library lookup → fetch → outline → targeted extraction (pinout/keyparams/app/section) → quote verification → BOM planning, and ds_section explicitly scopes itself to content outside pins/params/application. Minor overlap remains between ds_search and ds_part_info (both return package/identity data) and between ds_section and the specialized extractors, but descriptions make the intended routing clear.
All ten tools share a uniform `ds_` prefix and lowercase snake_case suffixes with no camelCase or style mixing. The only deviation is that some suffixes are verbs (search, fetch, quote, plan) while others are nouns (part_info, outline, pinout, section), though each name is short and predictable.
Ten tools map cleanly onto the distinct stages of a datasheet-evidence workflow, with no obvious padding. Each tool earns its place: retrieval, structural navigation, specialized extraction, verification, and planning are all separate concerns.
Coverage spans discovery through citation verification and BOM audit planning, which is strong lifecycle coverage for the stated purpose. Gaps are minor: there is no full-text search within a fetched datasheet (ds_quote only verifies a supplied string) and no batch/compare tool for evaluating multiple candidate parts side by side.
Maintenance
Related MCP Connectors
Turn datasheets into source-backed JSON contracts, pinout matrices, and KiCad CAD for AI agents.
Electronic component datasheets for AI agents: pinouts, specs, package info and design checks.
IC datasheet search: parametric part finding, spec lookup, price comparison — grounded in real PDFs.
Page-cited retrieval for embedded docs, datasheets, MISRA, CMSIS, and RTOS references.
Related MCP Servers
- AlicenseAqualityBmaintenanceProvides AI agents with instant, structured access to electronic component datasheets, pinouts, and electrical specifications without requiring PDF uploads. It enables seamless part searching, design validation, and side-by-side component comparisons across major hardware providers.14102 npm14MIT
- AlicenseAqualityNot gradedmaintenanceProvides LLMs with direct access to official vendor PDF documentation for electronics components (TI, ST, ADI) via a local SQLite full-text index and PDF retrieval tools.62ISC
- AlicenseNot gradedqualityCmaintenanceSpacecraft component specifications read from vendor datasheets (2,500+ products, 24 categories): search by engineering requirements, compare, budget mass and power, read datasheet digests and facts, find data gaps, and assemble a bus around parts you lock. Every value cites its datasheet page; missing data is named, never guessed.38 npm1MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to search millions of electronic components and ICs, retrieve specifications, compare alternates, and submit turnkey BOM procurement requests.4MIT