KiCAD MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| NODE_ENV | No | Node.js environment. Typically set to 'production'. | production |
| LOG_LEVEL | No | Log verbosity. One of error, warn, info, debug, or off. Ignored if KICAD_MCP_LOG_LEVEL is set. | info |
| PYTHONPATH | No | Path to KiCad Python libraries. Required for importing pcbnew. Platform-specific. | |
| KICAD_PYTHON | No | Path to the Python executable to use. Highest priority for Linux Python detection. | |
| JLCPCB_APP_ID | No | JLCPCB API app ID (for official JLCPCB API). | |
| KICAD_BACKEND | No | KiCad backend selection. One of auto, ipc, or swig. auto tries IPC first and falls back to SWIG. | auto |
| KICAD_MCP_DEV | No | Set to 1 to save MCP session logs into the project's logs/ directory for debugging. | 0 |
| JLCPCB_API_KEY | No | JLCPCB API access key (for official JLCPCB API). | |
| JLCPCB_API_SECRET | No | JLCPCB API secret key (for official JLCPCB API). | |
| KICAD_AUTO_LAUNCH | No | Whether to automatically launch the KiCad UI when needed. Set to 'true' or 'false'. | false |
| KICAD_MCP_LOG_LEVEL | No | Log verbosity. Overrides LOG_LEVEL. One of error, warn, info, debug, or off. | info |
| KICAD_MCP_DEBUG_SKIP | No | Set to 1 to re-enable the verbose kicad-skip parser DEBUG logs (muted by default). | |
| KICAD_MCP_LOG_MAX_BYTES | No | Maximum size per log file before rotation. Set to 0 to disable rotation. | 10485760 |
| KICAD_MCP_LOG_BACKUP_COUNT | No | Number of rotated log backups to keep. | 3 |
| KICAD_INTERACTIVE_SCHEMATIC | No | Set to 1 to auto-confirm KiCad's reload dialog on Windows after schematic writes. |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| completions | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_tool_categoriesA | List all available KiCAD tool categories with their descriptions and tool counts. Use this to discover which tools are available via the router. |
| get_category_toolsA | Return all tools available in a specific category. Use list_tool_categories first to find valid category names. |
| search_toolsA | Search all available KiCAD tools by keyword. Returns matching tool names and their categories. |
| create_projectB | Create a new KiCAD project |
| open_projectC | Open an existing KiCAD project |
| open_boardA | Open a specific .kicad_pcb board file and refresh the MCP in-memory board state. |
| reload_boardA | Reload the current or specified .kicad_pcb from disk, discarding stale in-memory board state. |
| close_projectA | Close the currently loaded KiCAD project: optionally save, then drop the in-memory board and clear session state. Use this to hand control back so the user (or the agent) can edit project files directly without the MCP later clobbering those changes on save. |
| save_projectA | Save the current KiCAD project. Refuses to overwrite the board file if its contents changed on disk since load (external edit) unless force is true. |
| save_boardA | Save the current PCB board. Refuses to overwrite external disk edits unless force=true. |
| save_asA | Save the current PCB board to a new .kicad_pcb path. |
| is_dirtyA | Return whether the MCP knows the loaded board has unsaved memory changes or external disk changes. |
| discard_or_reloadA | Discard the current in-memory PCB state and reload the board from disk. |
| get_project_infoB | Get information about the current KiCAD project |
| snapshot_projectA | Save a named checkpoint snapshot of the current project state (renders board to PDF and records step label). Call after completing each major step — e.g. after Step 1 (schematic_ok) and Step 2 (layout_ok). Required by the demo workflow before waiting for user confirmation. |
| set_board_sizeA | Set the PCB board dimensions (width and height) in the specified unit. |
| set_board_originA | Set the auxiliary (drill/place) origin and/or grid origin of a .kicad_pcb. The aux origin is the datum used by export_drill's drillOrigin:'plot' option and by pick-and-place / plot exports with useAuxOrigin. File-based (LoadBoard -> SaveBoard): if the board is open in the KiCad GUI, a later GUI save will overwrite this edit. |
| get_board_originA | Read back the auxiliary (drill/place) origin and grid origin of a .kicad_pcb in mm. |
| add_layerA | Add a new copper or technical layer to the PCB stackup. |
| set_active_layerA | Set the currently active PCB layer by name (e.g. F.Cu, B.Cu). |
| get_board_infoA | Retrieve general information about the current PCB board (dimensions, layer count, DRC status). |
| get_layer_listA | Return the list of all layers defined in the current PCB board. |
| add_board_outlineA | Draw the PCB board outline (Edge.Cuts layer) as a rectangle, rounded rectangle, circle or polygon. |
| clear_board_outlineA | Delete all Edge.Cuts graphics from the current PCB board. |
| replace_board_outlineB | Replace the current Edge.Cuts board outline with a rectangle, rounded rectangle, circle or polygon. |
| list_graphicsA | List PCB graphic/drawing items such as gr_line, gr_arc, gr_rect, gr_text and dimensions. |
| delete_graphicA | Delete a PCB graphic/drawing item by UUID. |
| update_graphicC | Update common properties of a PCB graphic/drawing item by UUID. |
| add_mounting_holeA | Place a mounting hole (NPTH or PTH) at the specified position on the PCB. |
| add_board_textA | Add a text label to a PCB layer (e.g. silkscreen, fab, courtyard). |
| add_zoneC | Create a copper fill zone (pour) on a PCB layer for a specified net. |
| get_board_extentsA | Return the bounding box (min/max X and Y) of all objects on the current PCB board. |
| get_board_2d_viewA | Render a 2D image of the PCB using kicad-cli. Returns PNG, JPG, or SVG. Use layers to filter — e.g. ["F.Cu","B.Cu","Edge.Cuts"] for copper + outline only. Use responseMode to choose delivery: "inline" (default) — PNG/JPG rendered as an image visible to Claude; SVG returned as text. "file" — image written next to the .kicad_pcb as _2d_view.; filePath is returned. Use file mode for large boards to avoid MCP message-size limits. |
| import_svg_logoA | Imports an SVG file as filled graphic polygons onto a KiCAD PCB layer (default F.SilkS / front silkscreen). Curves are linearised automatically. Ideal for placing a company or project logo on the board. |
| place_componentA | Place a footprint component onto the PCB at the specified position. Optionally set reference, value, footprint, rotation and layer. |
| move_componentA | Move a PCB component to a new position. Optionally update rotation or flip to a different copper layer. |
| batch_move_componentsA | Move multiple PCB components transactionally. If one reference/spec is invalid, no components are moved. Saves by default unless save=false. |
| rotate_componentA | Rotate a PCB component to an absolute angle in degrees. |
| delete_componentA | Remove a component from the PCB by its reference designator. |
| edit_componentA | Edit properties of an existing PCB component (reference, value, footprint). |
| set_footprint_typeA | Set the placement type (through_hole / smd / unspecified) and optional exclusion flags on a placed PCB footprint. The placement type controls whether the footprint is included in pick-and-place (.pos) output files. Use exclude_from_pos_files to suppress a footprint from .pos exports without changing its type. |
| find_componentA | Search for a PCB component by reference designator or value and return its position and properties. |
| get_component_propertiesA | Return all properties of a PCB component (position, rotation, layer, value, footprint). |
| get_component_padsA | Return all pads of a PCB component with their positions, net assignments and sizes. |
| get_padsA | Return pads for one PCB component, selected refs, or all components, including XY, layer, size and net. |
| get_net_padsA | Return every PCB pad attached to a net name or net code. |
| get_component_geometryA | Return separated footprint geometry bboxes: body, pads, courtyard, keepout, fab, silk and text. |
| get_component_listA | Return a list of all components on the PCB, optionally filtered by layer or bounding box region. |
| get_pad_positionA | Return the exact XY position of a specific pad on a PCB component. Use this before routing to get accurate start/end coordinates. |
| get_ratsnestA | Estimate ratsnest/airwire segments and lengths from current pad positions grouped by net. |
| estimate_airwire_lengthsA | Alias for get_ratsnest: estimate airwire segments and lengths by net. |
| check_placement_clearanceA | Classify placement conflicts as body overlap, courtyard overlap, keepout violation, silk/text overlap or pad clearance. |
| move_footprint_textA | Move or update a footprint Reference/Value/user text field without moving the footprint. |
| place_component_arrayA | Place a rectangular grid array of identical components on the PCB with configurable row/column spacing. |
| align_componentsB | Align multiple PCB components horizontally, vertically or on a grid with optional spacing. |
| check_courtyard_overlapsA | Detect courtyard overlaps between footprints and (optionally) flag courtyards that extend past the board outline. Accepts a |
| suggest_placementA | Propose an optimized PCB footprint placement that shortens net length, orients parts toward their partners, and removes courtyard overlaps. Force-directed clustering pulls connected parts together (a converter's feedback divider and decoupling caps end up hugging its IC), power/high-current nets are weighted short & direct, and each part is rotated (0/90/180/270) to face neighbours so airwires stop crossing. PCB ONLY — does not touch the schematic. DRY RUN by default: returns proposals {ref:[x,y,rot]} plus a score (HPWL before/after, overlap counts) without modifying the board. Validate via check_courtyard_overlaps(positions=proposals), then re-run with apply=true before autoroute. |
| duplicate_componentB | Duplicate an existing PCB component at an offset position, optionally with a new reference designator. |
| hierarchical_placeA | Cluster a board's footprints by their schematic-sheet hierarchy (the HierPlace algorithm). After sync_schematic_to_board piles every footprint at the origin, this packs each functional block together as a starting point for manual placement. File-based: reads and rewrites the .kicad_pcb on disk, so save any in-memory board edits first. Locked footprints are left in place. |
| add_netB | Create a new net on the PCB |
| route_traceA | Route a trace segment between two XY points on a fixed layer. WARNING: Does NOT handle layer changes — if start and end are on different copper layers, use route_pad_to_pad instead, which automatically inserts a via. |
| route_arc_traceA | Route a copper arc trace defined by start/mid/end points. Uses true PCB arc primitives when available. |
| add_viaB | Add a via to the PCB |
| add_copper_pourB | Add a copper pour (ground/power plane) to the PCB |
| delete_traceA | Delete traces from the PCB. Can delete by UUID, position, or bulk-delete all traces on a net. |
| query_tracesA | Query traces on the board with optional filters by net, layer, or bounding box. |
| query_zonesA | Query copper zones (filled pours) on the board with optional filters by net, layer, or bounding box. Returns zone net, layers, priority, fill state, and bounding box. Useful for auditing power planes and GND pours that query_traces does not include. |
| add_gnd_stitching_viasA | Drop GND stitching vias across the board with collision checking against every non-GND segment, via, and pad on every copper layer (PTH vias penetrate the full stackup, so missing any one layer is the classic silent-short failure mode). Three combinable strategies: |
| get_nets_listA | Get a list of all nets in the PCB with optional statistics. |
| modify_traceA | Modify an existing trace (change width, layer, or net). |
| create_netclassA | Create a new net class with custom design rules, optionally assigning nets to it immediately. |
| route_differential_pairC | Route a differential pair between two sets of points. |
| refill_zonesA | Refill all copper zones on the board. WARNING: SWIG path has known segfault risk (see KNOWN_ISSUES.md). Prefer using IPC backend (KiCAD open) or triggering zone fill via KiCAD UI instead. |
| route_pad_to_padA | PREFERRED tool for pad-to-pad routing. Looks up pad positions automatically, detects the net from the pad, and — critically — if the two pads are on different copper layers (e.g. J1 on F.Cu and J2 on B.Cu) automatically inserts a via at the midpoint so the connection is complete. Always use this instead of route_trace when routing between named component pads. |
| copy_routing_patternA | Copy routing pattern (traces and vias) from a group of source components to a matching group of target components. The offset is calculated automatically from the position difference between the first source and first target component. Useful for replicating routing between identical circuit blocks. |
| set_design_rulesB | Configure PCB design rules: clearance, track width, via dimensions and courtyard requirements. |
| get_design_rulesA | Return the current PCB design rules (clearance, track width, via sizes, courtyard settings). |
| run_drcA | Run the KiCAD Design Rule Check (DRC) on the current PCB and return violations. Optionally save the report to a file. |
| add_net_classB | Create a named net class with specific clearance, track-width, via, and differential-pair rules. |
| assign_net_to_classA | Assign a net to an existing net class to apply its specific design rules. |
| set_layer_constraintsA | Set per-layer design rule constraints (minimum track width, clearance and via dimensions). |
| check_clearanceA | Check the actual clearance between two PCB items (track, via, pad, zone or component) and report whether it meets the design rules. |
| get_drc_violationsA | Return the list of current DRC violations on the PCB, optionally filtered by severity (error, warning). |
| export_gerberA | Export PCB Gerber manufacturing files to a directory. Optionally include drill files, map files and choose layer subset. |
| export_pdfA | Export the PCB layout as a PDF document, optionally selecting layers, page size and colour mode. |
| export_svgA | Export the PCB layout as an SVG vector image, optionally selecting layers and colour mode. |
| export_3dA | Export the PCB as a 3D model (STEP, STL, VRML or OBJ) including optional copper, solder mask, silkscreen and component 3D models. |
| export_bomA | Export a Bill of Materials (BOM) from the PCB in CSV, XML, HTML or JSON format. |
| export_netlistA | Export the schematic netlist to a file using kicad-cli. Supports KiCad XML (default), Spice (for simulation), Cadstar, and OrcadPCB2 formats. Use this when you need to write a netlist file to disk — for example to produce a SPICE file for simulation or to diff against a reference. To get net/component data inline without writing a file, use generate_netlist instead. |
| export_position_fileA | Export a component placement/position file through kicad-cli. This compact alias of export_pos exposes the common side, format, and unit options. |
| export_vrmlA | Export the PCB as a VRML 3D model through kicad-cli. This compact alias of export_3d_cli exposes the VRML-specific options. |
| export_gerbersA | Plot Gerber files for a PCB via kicad-cli, exposing the full Plot-dialog option set (X2, netlist attributes, DNP handling, soldermask subtraction, precision, drill-file origin, stored board plot settings, etc). Reads the board from disk, so it reflects the last SAVED state of the .kicad_pcb. |
| export_drillA | Generate drill files for a PCB via kicad-cli, exposing the full Excellon/Gerber drill option set (format, drill origin, zero suppression, oval format, units, mirror-Y, minimal header, separate PTH/NPTH files, drill map + map format). Reads the last SAVED state of the .kicad_pcb. |
| export_ipc2581A | Export the PCB in IPC-2581 format via kicad-cli. Single-file MES/CAD interchange carrying placement, nets and BOM part data inline. The bomCol* params map schematic fields to the embedded BOM columns (e.g. internal P/N, manufacturer P/N) — useful for assembly/MES imports. Reads the last SAVED state of the .kicad_pcb. |
| export_odbA | Export the PCB in ODB++ format via kicad-cli. Single job archive (copper, drill, placement, components, nets, outline) widely used by CAM/MES/assembly. Reads the last SAVED state of the .kicad_pcb. |
| export_ipcd356A | Generate an IPC-D-356 bare-board electrical-test netlist via kicad-cli. Consumed by flying-probe and bed-of-nails testers. Reads the last SAVED state of the .kicad_pcb. |
| export_gencadA | Export the PCB in GenCAD format via kicad-cli. Assembly/test interchange format. Exposes padstack flip, unique pin/footprint shape generation, drill-file origin, and store-origin-coordinate options. Reads the last SAVED state of the .kicad_pcb. |
| export_posA | Generate a component placement (position / pick-and-place) file via kicad-cli, exposing the full CLI option set (side, format, units, bottom-negate-X, drill-file origin, SMD-only, exclude through-hole / DNP, gerber board edge). Rich CLI sibling of export_position_file. Reads the last SAVED state of the .kicad_pcb. |
| export_pcb_pdfA | Plot the PCB layout to PDF via kicad-cli, exposing the full layer-plot option set (layer + common-layer lists, mirror, refdes/value exclusion, border+title, soldermask subtraction, DNP fab-layer modes, negative, black-and-white, theme, drill shape, and single/separate/multipage output modes). Rich CLI sibling of export_pdf. Reads the last SAVED state of the .kicad_pcb. |
| export_pcb_svgA | Plot the PCB layout to SVG via kicad-cli, exposing the full layer-plot option set (layer + common-layer lists, mirror, soldermask subtraction, negative, black-and-white, theme, DNP fab-layer modes, page-size mode, fit-page-to-board, exclude-drawing-sheet, drill shape, single/multi output modes). Rich CLI sibling of export_svg. Reads the last SAVED state of the .kicad_pcb. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| component_selection | Recommend components that satisfy a circuit's electrical and physical requirements |
| component_placement_strategy | Develop a placement strategy for a supplied set of PCB components |
| component_replacement_analysis | Evaluate electrically and mechanically compatible component replacements |
| component_troubleshooting | Diagnose a component or circuit issue systematically |
| component_sourcing_properties | Plan KiCad sourcing and BOM properties for supplied components |
| component_value_calculation | Calculate practical component values from circuit requirements |
| routing_strategy | Develop a board-specific routing strategy |
| differential_pair_routing | Plan routing for supplied differential pairs |
| high_speed_routing | Plan signal-integrity-aware routing for supplied high-speed signals |
| power_distribution | Develop a PCB power-distribution strategy |
| via_usage | Plan via types, dimensions, and placement for a PCB |
| pcb_layout_review | Review a PCB layout for electrical, thermal, mechanical, and DFM issues |
| layer_stackup_planning | Plan a PCB layer stack-up from signal, power, and fabrication requirements |
| design_rule_development | Develop concrete PCB design rules from project and fabrication requirements |
| component_selection_guidance | Guide component and package selection from circuit requirements |
| pcb_design_optimization | Prioritize PCB improvements against explicit optimization goals |
| create_footprint_guide | Guide creation of a KiCad 9 footprint from a component description |
| footprint_ipc_checklist | Review a KiCad footprint against an IPC-7351-oriented checklist |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| project_info | Metadata for the currently loaded KiCad project |
| project_properties | Title-block and metadata properties for the current project |
| project_status | Current backend, loaded-file, synchronization, and dirty-state status |
| project_summary | Combined project, board, and component summary |
| board_info | Properties of the currently loaded PCB |
| layer_list | Enabled layer stack for the currently loaded PCB |
| board_statistics | Combined board dimensions, component counts, and net counts |
| component_list | All footprints placed on the currently loaded PCB |
| component_placement | Placement and orientation data for all footprints on the current PCB |
| library_list | Names of all installed footprint libraries |
| Board extents in millimeters | Bounding box of the loaded PCB in millimeters or inches |
| Board extents in inches | Bounding box of the loaded PCB in millimeters or inches |
| Board preview (PNG) | Rendered image of the loaded PCB with optional dimensions and layer filter |
| Board preview (JPEG) | Rendered image of the loaded PCB with optional dimensions and layer filter |
| Board preview (SVG) | Rendered image of the loaded PCB with optional dimensions and layer filter |
| All footprint libraries | Search installed footprint libraries by name and optional library filter |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Avinash1286/KiCAD-MCP-Server-THEAVI'
If you have feedback or need assistance with the MCP directory API, please join our Discord server