schematic-pdf-mcp

schematic-pdf-mcp

Converts vector PDF circuit schematics into evidence-preserving SchematicIR JSON with tools to inspect, convert, and validate schematic PDFs.

Category
访问服务器

README

Schematic PDF to JSON

Precision-first conversion of vector PDF circuit schematics into an evidence-preserving SchematicIR JSON document. The project includes a Python conversion engine, command-line interface, MCP server, reusable Codex skill, and validation tools.

This project deliberately prefers missing uncertain content over emitting plausible but incorrect electrical information. A result marked needs_review must not be treated as a verified netlist.

Architecture

  1. PDF parsing — extracts native text, vector paths, styles, coordinates, source IDs, and evidence.
  2. Primitive recognition — identifies conservative wire, component, pin, junction, label, and network-flag candidates.
  3. Connectivity recovery — applies explicit endpoint, T-junction, junction marker, and evidence-backed named-net rules.
  4. JSON output — emits validated SchematicIR, unresolved issues, topology checks, and a deterministic hash.

Each conversion preserves all four stages as separate JSON artifacts.

Install

Python 3.11 or newer is required.

python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -e ".[test]"

Command line

schematic-pdf inspect "D:\path\drawing.pdf"
schematic-pdf convert "D:\path\drawing.pdf" --output output\artifacts
schematic-pdf validate "D:\path\schematic.final.json"

The conversion output contains:

job-.../
├── layer1/raw.json
├── layer2/semantic.json
├── layer3/connectivity.json
├── layer4/schematic.final.json
└── manifest.json

MCP server

Start the stdio server with:

schematic-pdf-mcp

Available tools:

  • inspect_schematic_pdf
  • convert_schematic_pdf
  • validate_schematic_ir

The server exposes schematic://schema/current and staged artifacts through schematic://jobs/{job_id}/{stage}. Restrict readable local paths with SCHEMATIC_PDF_ALLOWED_ROOTS; set SCHEMATIC_PDF_ARTIFACT_ROOT to control the artifact destination.

Example MCP configuration:

{
  "mcpServers": {
    "schematic-pdf": {
      "command": "schematic-pdf-mcp",
      "env": {
        "SCHEMATIC_PDF_ALLOWED_ROOTS": "D:\\schematics",
        "SCHEMATIC_PDF_ARTIFACT_ROOT": "D:\\schematic-output"
      }
    }
  }
}

Accuracy and validation

The final JSON contains source evidence and explicit issues for unresolved content. Schema validity and topology validity are independent of recognition completeness. Important policies include:

  • no inferred connection at a four-way crossing without explicit evidence;
  • no invented pin numbers, reference-designator suffixes, or net names;
  • ambiguous part-number-like text is omitted and reported for review;
  • recognition changes must keep 100% precision on registered real-PDF regression samples.

Run the automated suite:

python -m pytest

Run the EasyEDA-backed precision regression after placing authorized local sample PDFs and truth exports at the paths registered in the script:

python scripts\run_precision_regression.py

For a genuinely unseen PDF, lock the conversion before reading EDA truth:

python scripts\blind_validate_pdf.py lock "Test_PDF_SCH\new.pdf"
python scripts\blind_validate_pdf.py compare `
  "output\blind\job-...\blind-lock.json" `
  "output\accuracy\new.easyeda-ground-truth.json"

Test schematics, EasyEDA truth exports, and generated artifacts are excluded from the repository because they may contain proprietary circuit designs.

Codex skill

The reusable skill is in skill/convert-schematic-pdf. It defines the precision-first workflow, acceptance order, validation policy, MCP contract, and current limitations.

Current limitations

  • Native vector PDFs are the primary supported input.
  • Raster OCR and raster primitive recognition are not implemented.
  • Hidden pin numbers and ambiguous symbol identity remain unresolved.
  • Long-distance value/label association is intentionally conservative.
  • Human review is still required whenever blocking issues remain.

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选