schematic-pdf-mcp
Converts vector PDF circuit schematics into evidence-preserving SchematicIR JSON with tools to inspect, convert, and validate schematic PDFs.
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_reviewmust not be treated as a verified netlist.
Architecture
- PDF parsing — extracts native text, vector paths, styles, coordinates, source IDs, and evidence.
- Primitive recognition — identifies conservative wire, component, pin, junction, label, and network-flag candidates.
- Connectivity recovery — applies explicit endpoint, T-junction, junction marker, and evidence-backed named-net rules.
- 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_pdfconvert_schematic_pdfvalidate_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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.