schematic-mcp-bridge
Enables AI agents to design electrical schematics through a high-level semantic API, handling components, pins, nets, validation/ERC, auto-layout, and SVG/KiCad rendering without requiring coordinate or file internals.
README
schematic-mcp
AI-agent-friendly system for building electrical schematics: an MCP server
exposes a high-level, semantic API (components, pins, nets) so an LLM never
has to touch coordinates, wires, or .kicad_sch internals directly.
AI Agent → MCP / high-level API → semantic schematic model → validation/ERC
→ automatic layout → SVG and/or KiCad schematic
See schematic_mcp_requirements.md for the full spec and SKILL.md
for agent rules.
Status
-
Stage 1 done: minimal semantic model (
Component,Pin,Net,Schematic) with JSON save/load, inschematic/model.py. -
Stage 2 done: KiCad symbol library import backed by SKiDL (
schematic/library.py:search_components/get_component_pins/instantiate) and structural validation + basic ERC (schematic/validation.py:validate/run_erc). Tested against real official KiCad symbol libraries vendored intests/fixtures/kicad-symbols/(Device,MCU_Espressif,Sensor_Current). -
Stage 3 done: naive auto layout (
schematic/layout.py, one row of boxes, no overlap), an SVG renderer (schematic/renderer.py) that draws component boxes with pin numbers/names and net-name labels next to each pin — no drawn wires yet, connectivity is shown via labels (see requirements section 11); and a CLI (cli/main.py:search,validate,render). -
Stage 4 done: MCP server (
mcp_server/server.py) exposing the full section 8 tool list — library lookup, schematic lifecycle, connections, layout hints, validation/ERC, SVG output — over stdio. The stateful logic lives inmcp_server/tools.py::SchematicSession(one active schematic per session), framework-free so it's tested directly without an MCP client.set_placement_hint/set_pin_side/group_componentsstore intent on the model already. -
Stage 5 done:
auto_layoutnow honorsleft_of/right_ofplacement hints (topological reorder of the row; other relations are still ignored, a real 2D layout is stage 7 territory if needed). Newschematic/routing.pydraws an actual orthogonal wire between two components when they land as immediate neighbors and it's a 2-endpoint net with pins facing each other — otherwise still a net label, since routing around an intervening box is real routing-algorithm work (deferred).set_pin_side/group_componentsare still stored-but-unconsumed. -
Stage 6 done:
.kicad_schexport (schematic/exporters/kicad.py), reusing SKiDL's own schematic generator rather than hand-rolling a KiCad file writer — it already draws real classical symbols with correct geometry (section 4/19's stated preference). Only works for components sourced from a real library symbol viaadd_component; raisesKicadExportErroron a hand-authored/invented component or one that doesn't resolve, rather than silently producing a broken file.examples/esp32_ina226.jsoncan't export (its ESP32/INA226 pins are hand-authored placeholders, not real symbols) — seeexamples/build_rc_filter.pyfor a small schematic built entirely from real library parts that does. Needed vendoringpower.kicad_symtoo (SKiDL's schematic generator loads it unconditionally).Also fixed a real bug found while building that RC filter example:
ComponentLibrary.instantiate()defaultedreferenceto the bare library ref_prefix ('R' for every resistor) instead ofcomponent_id— so adding a second resistor without an explicitreference=produced a falseduplicate_referenceERC error on a perfectly valid schematic.
MVP is now complete end-to-end (search → add → connect → validate/ERC → SVG / KiCad export) via both the CLI and the MCP server. What's left is optional polish: stage 7 (ELK-based 2D layout + general wire routing) is explicitly "only if this isn't good enough" territory in the spec, not committed to.
Development
python3 -m pip install --user --break-system-packages -e ".[dev]"
PYTHONPATH=. python3 -m pytest
# CLI
PYTHONPATH=. python3 -m cli.main search resistor
PYTHONPATH=. python3 -m cli.main validate examples/esp32_ina226.json
PYTHONPATH=. python3 -m cli.main render examples/esp32_ina226.json -o out.svg
PYTHONPATH=. python3 -m cli.main export-kicad examples/rc_filter.json -o out.kicad_sch
# MCP server (stdio)
PYTHONPATH=. python3 -m mcp_server.server
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。