mcp-server-kicad-tools
Provides KiCad automation tools for parsing and round-tripping KiCad S-expression files, classifying DRC/ERC JSON reports, and generating pin-header footprint S-expressions.
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., "@mcp-server-kicad-tools generate a 4-pin through-hole header footprint"
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.
kicad-mcp-tools
Standalone KiCad automation toolkit extracted from the MycoMIDI project.
What is this?
kicad-mcp-tools is a small, stdlib-only Python toolkit for automating common
KiCad-adjacent tasks without depending on a running KiCad instance. It packages
reusable helpers that started life inside MycoMIDI and proved useful enough to
stand alone.
It currently includes:
kicad_mcp_tools.sexpr_cst— lossless KiCad S-expression CST parser and serializerkicad_mcp_tools.atomic_write— same-directory atomic file replacement helperkicad_mcp_tools.drc_classify— DRC/ERC JSON classifier for clean/findings/malformed stateskicad_mcp_tools.pin_header_footprint_gen— simple through-hole pin-header footprint generatorscripts/kicad-cli.sh— pinned Docker wrapper forkicad-clidemo/— tiny sample schematic and PCB inputs for CLI experiments
Related MCP server: KiCAD MCP Server
Why does it exist?
This repository was split out from the hardware-design automation work behind MycoMIDI, a bioelectric-signal-to-MIDI project that needed lightweight, scriptable KiCad tooling during schematic, PCB, and validation workflows.
The extraction keeps that tooling reusable for other projects while preserving credit to the open-source KiCad MCP server work that informed the approach:
Origin and attribution
These files were extracted from MycoMIDI without removing MycoMIDI's own copy. The implementation and attribution headers were preserved from that origin.
The toolkit also preserves attribution to the upstream MIT-licensed projects whose patterns were adapted in MycoMIDI:
See THIRD_PARTY_LICENSES.md for the preserved third-party license text and
provenance notes.
Installation
Once the package is published:
pip install kicad-mcp-toolsFrom source today:
git clone https://github.com/rjmendez/kicad-mcp-tools.git
cd kicad-mcp-tools
pip install -e .Using as an MCP server
Run the stdio server directly from the published package with uvx:
uvx --from kicad-mcp-tools mcp-server-kicad-toolsExample MCP client configuration:
{
"mcpServers": {
"kicad-tools": {
"command": "uvx",
"args": ["--from", "kicad-mcp-tools", "mcp-server-kicad-tools"]
}
}
}Exposed tools:
parse_kicad_sexpr— parse KiCad S-expression text into a structured CST-like tree.roundtrip_kicad_sexpr— re-serialize parsed KiCad S-expression text and report whether it round-trips exactly.classify_drc_report— classify KiCad DRC/ERC JSON asclean,findings,malformed, orunavailable.generate_pin_header_footprint— generate a KiCad.kicad_modpin-header footprint S-expression.
Run tests
python3 -m unittest discover testsQuickstart
from kicad_mcp_tools import generate_electrode_connector_footprint, parse
footprint = generate_electrode_connector_footprint(4)
tree = parse(footprint.encode("utf-8"))
print(tree.lists[0].head) # footprint
print(len(tree.lists[0].find_all("pad"))) # 4Available Tools
4 toolsclassify_drc_reportB
Classify KiCad DRC/ERC JSON as clean, findings, malformed, or unavailable.
Inputs: json_text (required). Returns: object
generate_pin_header_footprintA
Generate a through-hole pin-header footprint as KiCad .kicad_mod S-expression text.
Inputs: pin_count (required), name, rows, pitch_mm, +1 more. Returns: result
parse_kicad_sexprB
Parse KiCad S-expression text into a structured CST-like representation.
Inputs: text (required). Returns: object
roundtrip_kicad_sexprC
Parse and re-serialize KiCad S-expression text to validate byte-preserving round-trips.
Inputs: text (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool targets a distinct purpose: parsing S-expressions, validating round-trips, classifying DRC reports, and generating footprints. Even parse_kicad_sexpr and roundtrip_kicad_sexpr are clearly separated by their output intent (CST representation vs. byte-preserving validation).
All tool names follow a consistent snake_case verb_noun pattern with clear domain objects: parse_kicad_sexpr, roundtrip_kicad_sexpr, classify_drc_report, and generate_pin_header_footprint. There are no mixed conventions or vague verbs.
Four tools is an appropriate, focused size for a KiCad utility server. Each tool provides a distinct operation without unnecessary bloat or redundancy.
The set covers S-expression parsing, round-trip validation, DRC/ERC classification, and a common footprint generation task. The main gap is the narrow footprint-generation scope—only pin headers are supported—so broader KiCad footprint workflows are not covered, but this is a minor limitation for the apparent utility toolkit.
Related MCP Connectors
Design, route, check, review and export manufacturable PCBs from plain language; KiCad import.
Turn datasheets into source-backed JSON contracts, pinout matrices, and KiCad CAD for AI agents.
Run ERC, DRC, parity, BOM and export checks on KiCad 9 boards before manufacturing.
Floor plans as code: compile, lint and repair ArchLang (.arch) floor plans to SVG, DXF and PDF.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI tools to create, edit, and inspect KiCAD schematic files, including components, wires, labels, and sheets.MIT
- AlicenseBqualityCmaintenanceEnables AI assistants to interact with KiCAD for PCB design automation, including schematic editing, component placement, routing, DRC/ERC, and export.10027 npm2MIT
- AlicenseBqualityCmaintenanceProvides schematic/PCB analysis, authoring, and SPICE simulation through MCP, enabling direct KiCad file manipulation and verification without requiring KiCad for reading.18MIT
- AlicenseAqualityCmaintenanceEnables MCP clients such as Claude Code to work on KiCad 10 designs by driving kicad-cli for ERC, DRC, netlists and fabrication exports, KiCad's IPC API for live board editing, and lossless edits of schematic and project files. It also provides design review, routing, parts and datasheet tooling so a board can be treated as data and checked against fab limits.353MIT