Back to Home
bunnyf icon

pcb-mcp

Verified Safe

by bunnyf

Overview

Facilitates AI-assisted PCB design workflow by providing an MCP (Model Context Protocol) server for KiCad 9.x.

Installation

Run Command
python3 /root/pcb/mcp/kicad_mcp_server.py

Environment Variables

  • KICAD_MCP_PROJECTS_BASE
  • KICAD_MCP_TASKS_DIR
  • KICAD_MCP_KICAD_CLI
  • KICAD_MCP_FREEROUTING_JAR
  • KICAD_MCP_JAVA_CMD
  • KICAD_MCP_DEFAULT_TIMEOUT
  • KICAD_MCP_AUTOROUTE_TIMEOUT
  • KICAD_MCP_MAX_FILE_SIZE
  • KICAD_MCP_RENDER_WIDTH
  • KICAD_MCP_RENDER_HEIGHT
  • KICAD_MCP_TASK_MAX_AGE_DAYS

Security Notes

The server demonstrates strong security practices for its operations. It explicitly implements path validation (`is_safe_path`, `validate_file_path`) to prevent directory traversal attacks and restricts file reading to designated project and task directories. Shell injection is prevented by using `shlex.quote()` when constructing commands for background tasks (e.g., auto-routing). The server does not use `shell=True` for `subprocess.run` by default and does not contain obvious hardcoded secrets. It relies on SSH for secure communication, as it interacts via stdin/stdout rather than directly opening network ports. The main residual risk would stem from vulnerabilities in the underlying KiCad CLI, pcbnew API, or FreeRouting, but the server itself aims to interface with these tools securely.

Similar Servers

Stats

Interest Score0
Security Score9
Cost ClassMedium
Avg Tokens15000
Stars0
Forks0
Last Update2026-01-17

Tags

KiCadPCB DesignAI AssistantHardware DesignModel Context Protocol