kschlint
Provides tools for linting, rendering, fixing, and inspecting KiCad schematics and PCBs, including collision detection, PNG rendering, symbol inspection, and safe text placement fixes.
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., "@kschlint lint my schematic and fix any label overlaps"
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-sch-lint
Readability linter, renderer and text fixer for KiCad 10 schematics. Built for AI
assistants that edit .kicad_sch files as text and cannot see the result.
It answers three questions after every edit:
What collides?
lintcomputes the real geometry (symbol transforms, pin tips, text extents in KiCad's stroke font) and reports overlaps, wires through bodies, floating labels, wire ends on pin lines, missing junctions, off-grid points.What does it look like?
rendergives a PNG from KiCad's own plot, with the findings boxed and numbered. Crops and tiles keep 1.27 mm text readable.Can it be fixed safely?
fixmoves fields and local labels to free spots. It never touches symbols, pins or wires, and it rolls back if the kicad-cli netlist changes.
Plus two helpers for building schematics: inspect (exact pin tip coordinates, so wires
land on pins) and free (empty space for a new block).
PCB
python -m kschlint pcb-lint BOARD.kicad_pcb [--all]
python -m kschlint pcb-render BOARD.kicad_pcb [--around U101,C101 | --region x0,y0,x1,y1]
python -m kschlint pcb-fix BOARD.kicad_pcb [--write] [--min-size 0.8]KiCad is the geometry engine: kicad-cli DRC finds silkscreen problems, pcb_silk.py runs
in KiCad's python (pcbnew) and gets exact text, pad and silkscreen boxes from KiCad.
pcb-fix moves only the Reference text of flagged footprints (and ones past the board
edge, which DRC does not flag) to the nearest clean spot next to its own part: clear of
pads, silkscreen, other courtyards and the edge, and nearer its own part than any other.
Footprints never move. It writes only the moved (at ...) nodes, then re-runs DRC and
restores the board if any non-silkscreen result, the unconnected count or schematic
parity changed. MCP tools: pcb_lint, pcb_render, pcb_fix.
References that do not fit anywhere are reported as unresolved: the parts are packed too tightly. Leave room for the text in the placement instead (a 1.6 mm band per row for 1 mm text).
Related MCP server: KiCAD MCP Server
Requirements
Python 3.10+, no packages for lint, fix and inspect
kicad-cli(KiCad 10) on PATH or inKICAD_CLI, for netlist checks and renderingpymupdfforrenderandselftest(pip install pymupdf)
Use
python -m kschlint lint PROJECT [--sheet Power] [--severity info] [--json]
python -m kschlint render PROJECT --sheet Power [--around U101,R101 | --region x0,y0,x1,y1 | --tiles] [--boxes]
python -m kschlint fix PROJECT [--sheet Power] [--write] [--horizontal] [--no-labels]
python -m kschlint inspect PROJECT --sheet Power [--refs U101,C115]
python -m kschlint free PROJECT --sheet Power --size 40,25 [--near 100,80]
python -m kschlint selftest PROJECT
python -m kschlint checks
python -m kschlint mcpPROJECT is a .kicad_pro, the root .kicad_sch or the project directory.
--sheet takes a name path (/Actuators/HighSideSwitch12V_Fan/), a sheet or instance
name (HighSideSwitch12V_Fan) or a file name (HighSideSwitch12V.kicad_sch).
Coordinates are mm, y down, like the file.
lint exits 1 when there are errors, so it works in CI.
MCP server
{"mcpServers": {"kschlint": {"command": "python", "args": ["-m", "kschlint", "mcp"],
"env": {"PYTHONPATH": "C:/path/to/kicad-sch-lint"}}}}Tools: sch_lint, sch_render (returns the PNG as an image), sch_fix, sch_inspect,
sch_free_space, sch_checks, sch_selftest. The server is a plain stdio JSON-RPC
loop, no mcp package needed.
Checks
Code | Severity | Meaning |
| error | two texts overlap (fields, labels, pin names and numbers, notes, sheet pins) |
| error | text on another symbol's body or a sheet |
| error | a wire or a pin line runs through text |
| error | two symbol bodies overlap |
| error | wire crosses a symbol body |
| error | collinear wires overlap |
| error | label anchor touches no wire or pin |
| error | wire ends on a pin line but not on the tip. KiCad does not connect it |
| warning | reference or value drawn across its own outline |
| warning | pin tip touches the middle of a wire (connects, often unintended) |
| warning | T connection without a dot |
| warning | four wires meet at one point |
| warning | wire end connected to nothing |
| warning | pin tip, wire end or label off the 1.27 mm grid |
| warning | item outside the frame or on the title block |
| info | text within the clearance (0.25 mm) of another item |
| info | vertical reference or value |
| info | GND not pointing down, supply not pointing up |
| info | dot where only two items meet |
Findings of reused sheets are reported once, with the list of instances.
What fix changes
Symbol fields. Visible fields of a colliding symbol are re-placed as a horizontal stack (reference above value) on the best side of the symbol. Candidates: right, top, left, bottom, shifted along the side. Sides without pins come first. Each candidate is scored against every text, body, wire and pin line on the page, the frame and the title block. The widest reference over all sheet instances is used. A spot is rejected when the text would sit nearer another part than its own, closer than 0.4 mm to another text, or (power symbols) away from its arrow or along an unrelated wire, where it would read as a net name. Power symbol text only moves to a fully clean spot.
fields_autoplacedis removed from moved symbols so KiCad does not undo the placement.Local labels. Slide along the wire segment they sit on (1.27 mm steps) or flip side. Still on the same wire, so the same net.
Nothing else. Hierarchical and global labels, wires, symbols stay put. Problems that need geometry changes are reported as
unresolved.
With --write it edits in place, compares the kicad-cli netlist (nets and nodes)
before and after, and restores the files on any difference. KiCad must be closed.
How the geometry was verified
KiCad is the oracle, the numbers are not guessed:
Pin tips:
tests/test_transform.pyplaces three stock symbols in all 12 rotation and mirror combinations, puts a label where the model says each pin tip is, and checks KiCad's netlist puts every pin on its own label's net. KiCad rotates first, then mirrors in screen space.Text: character advances and per-kind offsets were measured from the PDF text layer of kicad-cli exports.
tests/test_textbox.pychecks fields in every symbol orientation, labels and notes against a fresh PDF. Error < 0.5 mm, typically 0.1 mm.selftestruns the same comparison on your own project. Run it after a KiCad update.
Limits: stroke font only (custom TrueType fonts are measured as stroke font), global label outlines are approximate, text inside symbol graphics is ignored.
Workflow for AI edits
inspectthe symbols you will wire. Use the pin tips it prints.Edit the file. Use
freeto find room for a new block.lint. Fix geometry errors yourself (wires, symbol positions).fix --writefor text collisions.render --around <refs>and look at the image.Repeat until
lintis clean. Then the usual netlist and ERC diff.
Tests
python -m unittest discover -s tests -vNeeds kicad-cli and pymupdf. The tests build their own schematics from KiCad stock symbols.
Available Tools
10 toolspcb_fixA
Move reference designators flagged by DRC (and ones past the board edge) to the nearest clean spot next to their own part. Never moves footprints. With write=true it edits the board, re-runs DRC and restores the file if any non-silkscreen result changes. KiCad must be closed.
Inputs: board (required), write, min_size.
pcb_lintA
KiCad DRC of a .kicad_pcb. Silkscreen findings by default (reference on pads, on other silkscreen), all=true for everything.
Inputs: board (required), all.
pcb_renderA
PNG of a board region (F.Cu, silkscreen, courtyards, edge) as an image, silkscreen findings boxed. Use around (references) or region [x0,y0,x1,y1] mm.
Inputs: board (required), around, layers, region.
sch_checksA
List lint check codes with severity and meaning.
Inputs: no named parameters.
sch_fixA
Move symbol fields (reference, value) and local labels out of collisions. Never touches symbols, pins, wires or connectivity. Dry run by default. With write=true it edits the files, checks the kicad-cli netlist is unchanged and restores the files if not. KiCad must be closed.
Inputs: project (required), sheet, write, labels, +1 more.
sch_free_spaceA
Find free, grid-aligned rectangles of w x h mm on a page, nearest to a point. Use to place a new block without collisions.
Inputs: h (required), w (required), sheet (required), project (required), +2 more.
sch_inspectA
Exact geometry of symbols on a page: pin tip coordinates (where wires must end), pin direction, body box, field boxes. Without refs it also lists labels and wires. Use before drawing wires so they land on pin tips.
Inputs: sheet (required), project (required), refs.
sch_lintA
Find layout problems in a KiCad schematic: overlapping texts, text on symbols or wires, wires through bodies, floating labels, wire ends on pin lines, missing junctions, dangling wires, off-grid points, title block overlap. Run after every schematic edit. Coordinates are mm, y down.
Inputs: project (required), codes, sheet, severity.
sch_renderA
Render one page to PNG (KiCad's own plot) and return it as an image, with findings boxed and numbered like sch_lint. Use region or around to zoom so text stays readable. tiles=true splits a full sheet into readable tiles.
Inputs: sheet (required), project (required), grid, boxes, +7 more.
sch_selftestA
Compare the text geometry model with kicad-cli PDF output for a project. Run once after a KiCad update.
Inputs: project (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool targets a distinct operation: linting, inspecting geometry, rendering images, fixing collisions, finding free space, and listing check codes. The schematic and PCB groups are clearly separated by prefix, and even similar tools like sch_lint and sch_checks are unambiguous (one runs checks, the other lists them). No two tools appear to overlap in purpose.
The pattern is mostly consistent: domain prefix (sch_ or pcb_) followed by a noun or verb (lint, inspect, render, fix, free_space, checks, selftest). However, sch_free_space, sch_checks, and sch_selftest break the verb_noun convention, using noun phrases instead of actions like 'find_free_space' or 'list_checks'. Still, the prefix and readable names make it predictable.
With 10 tools, the server is well-scoped for its purpose of KiCad schematic and PCB linting, rendering, and fixing. Each tool covers a distinct need without redundancy, and the count is within the ideal range for a focused toolset. It feels neither thin nor bloated.
The schematic side has strong coverage: lint, inspect, render, fix, free space, checks, and selftest. The PCB side covers lint, render, and fix, but lacks a direct PCB geometry inspection tool (e.g., pcb_inspect) which agents might need for precise placement. Overall, the core workflows (detect, visualize, fix) are well-supported, with only minor gaps.
Maintenance
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.
Design circuits, simulate and verify embedded firmware, and lay out PCBs with AI agents.
Your electronics workspace. Explore public PCB projects and inspect schematics, layouts, BOMs and saved versions with your AI assistant.
Related MCP Servers
- AlicenseBqualityBmaintenanceEnables AI assistants to design PCBs in KiCAD through natural language, with transactional preview-verify-commit workflow, undo/redo, and an engineering knowledge base.141MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with KiCAD for PCB design automation. Users can design PCBs using natural language, including component placement, routing, checks, and export.1MIT
- AlicenseBqualityCmaintenanceEnables AI assistants to interact with KiCAD for PCB design automation, including schematic editing, component placement, routing, DRC/ERC, and export.10038 npm2MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to design and edit PCBs through natural language, including project setup, schematic editing, component placement, custom symbol and footprint generation, routing, DRC/ERC checks, and production file export. It also integrates JLCPCB parts catalog data, Freerouting automation, and visual snapshots for cross-platform Windows, Linux, and macOS workflows.61 npmMIT