io.github.daedalus/mcp-kicad
MCP server exposing KiCad PCB Editor functionality via IPC API
Versions
0.1.0latest0.1.1Tools 41
save_board Save the board to a file.
delete_item Delete an item from the board.
connect_kicad Connect to a running KiCad instance via the IPC API. This must be called before any other operations. Ensure KiCad is running with the API server enabled in Preferences > Plugins. Args: socket_path: Optional path to IPC socket. If not provided, reads from KICAD_API_SOCKET environment variable or uses default platform path. kicad_token: Optional API token for authentication. timeout_ms: Connection timeout in milliseconds. Default 2000. Returns: Dictionary with connection status, KiCad version, and version match info. Example: >>> connect_kicad() {"connected": True, "version": "9.0.1", "version_match": True}
check_connection Check if currently connected to KiCad. Returns connection status, KiCad version, and whether versions match. Returns: Dictionary with connection status and version info. Example: >>> check_connection() {"connected": True, "version": "9.0.1", "version_match": True}
get_board_info Get board metadata (title, date, company, revision, comments). Returns: Dictionary with board metadata fields. Example: >>> get_board_info() {"title": "My PCB", "date": "2025-01-01", "company": "", "revision": "1.0"}
get_layers List all PCB layers with their properties. Returns: List of layer objects with id, name, type, visible, enabled. Example: >>> get_layers() [{"id": 0, "name": "Copper", "type": "signal", "visible": True, "enabled": True}]
get_board_design_settings Get board design rules and constraints. Returns: Dictionary with design settings (track widths, clearances, via specs). Example: >>> get_board_design_settings() {"track_width": 0.2, "via_diameter": 0.6, "via_drill": 0.3}
list_footprints List all footprints on the board. Returns: List of footprint objects with reference, value, footprint type, position. Example: >>> list_footprints() [{"reference": "U1", "value": "ATmega328P", "footprint": "Package:DIP-8", ...}]
get_footprint Get detailed properties of a specific footprint by reference designator. Args: reference: Footprint reference designator (e.g., "U1", "R5"). Returns: Footprint object with all properties including pads, or None if not found. Example: >>> get_footprint("U1") {"reference": "U1", "value": "ATmega328P", "pads": [...]}
search_footprints Search footprints by reference designator, value, or footprint name. Args: query: Search string to match against reference, value, or footprint name. Returns: List of matching footprints. Example: >>> search_footprints("ATmega") [{"reference": "U1", "value": "ATmega328P", ...}]
list_nets List all nets on the board. Returns: List of net objects with name, code, and netclass. Example: >>> list_nets() [{"name": "GND", "code": 0, "netclass": "Default"}, {"name": "VCC", ...}]
create_zone Create a copper zone on the board.
get_net Get detailed information about a specific net by name. Args: name: Net name (e.g., "GND", "VCC"). Returns: Net object with connected pads and item count, or None if not found. Example: >>> get_net("GND") {"name": "GND", "code": 0, "connected_pads": [...], "item_count": 42}
list_netclasses List all netclasses on the board. Returns: List of netclass objects with name and properties. Example: >>> list_netclasses() [{"name": "Default", "clearance": 0.2, "track_width": 0.25, ...}]
list_zones List all zones (copper areas) on the board. Returns: List of zone objects with name, net, layer, fill mode, priority. Example: >>> list_zones() [{"name": "GND", "net": "GND", "layer": "Copper", "priority": 0}]
list_tracks List all tracks on the board. Returns: List of track objects with start/end positions, layer, net, width. Example: >>> list_tracks() [{"start": {"x": 0, "y": 0}, "end": {"x": 100, "y": 0}, "net": "VCC", ...}]
list_vias List all vias on the board. Returns: List of via objects with position, diameter, drill, net, layers. Example: >>> list_vias() [{"position": {"x": 100, "y": 50}, "diameter": 0.6, "drill": 0.3, "net": "GND"}]
list_pads List all pads across all footprints. Returns: List of pad objects with footprint reference, number, net, position, size. Example: >>> list_pads() [{"footprint": "U1", "number": "1", "net": "VCC", "position": {"x": 0, "y": 0}, ...}]
list_texts List all text elements on the board. Returns: List of text objects with content, type, layer, position, size. Example: >>> list_texts() [{"text": "PCB Title", "type": "PCB_TEXT", "layer": "Silkscreen", ...}]
get_text_extents Calculate the bounding box of a text string. Args: text: The text string to measure. size: Font size in mm. Default 10. Returns: Dictionary with x, y, width, height of the bounding box. Example: >>> get_text_extents("Hello") {"x": 0, "y": 0, "width": 12.5, "height": 3.0}
get_version Get KiCad version and API version information. Returns: Dictionary with version strings and version match status. Example: >>> get_version() {"version": "9.0.1", "api_version": "9.0", "version_match": True}
get_project Get current project information. Returns: Dictionary with project name and path. Example: >>> get_project() {"name": "my_design", "path": "/path/to/my_design.pro"}
create_net Create a new net on the board.
create_track Create a track segment on the board.
create_via Create a via on the board.
create_text Create a text element on the board.
create_circle Create a circle on the board.
create_rectangle Create a rectangle on the board.
create_arc Create an arc on the board.
create_line Create a line segment on the board.
move_item Move an item to a new position.
rotate_item Rotate an item.
move_footprint Move a footprint to a new position by reference.
rotate_footprint Rotate a footprint by reference.
create_footprint Place a footprint on the board.
add_to_selection Add an item to the selection.
clear_selection Clear the current selection.
get_selection Get the current selection.
set_active_layer Set the active layer.
refill_zones Refill all zones on the board.
get_item_by_id Get item details by ID.
Permissions 2
filesystem low env_vars low