KiCad MCP Server

KiCad MCP Server

Enables analysis of KiCad electronic schematics through natural language queries to search components, trace signal paths, explore connections, and analyze multi-board systems.

Category
访问服务器

README

KiCad MCP Server

Model Context Protocol (MCP) server for analyzing KiCad schematics. Query components, trace nets, explore connections, and analyze multi-board systems through a simple tool interface.

Features

  • Circuit Analysis: Load and analyze KiCad .kicad_sch files
  • Component Queries: Search, filter, and examine components with detailed pin information
  • Net Tracing: Explore nets, trace signal paths, and find connection routes
  • Multi-Board Systems: Analyze signals across multiple connected boards
  • Smart Caching: Optional file caching for faster repeated queries
  • Dynamic Configuration: Add/remove boards and systems without restarting

Installation

# Install with uv (recommended)
uv sync

# Or with pip
pip install -e .

Requirements: Python 3.10+

Quick Start

1. Configure MCP Client

Add to your MCP client configuration (e.g., Claude Desktop's claude_desktop_config.json):

{
  "mcpServers": {
    "kicad": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/kicad-mcp",
        "run",
        "kicad-mcp"
      ]
    }
  }
}

2. Create Configuration File

Create .kicad_mcp.yaml in your project directory:

boards:
  main:
    path: /path/to/main.kicad_sch
    description: Main controller board

  sensor:
    path: /path/to/sensor.kicad_sch
    description: Sensor board

systems:
  complete:
    boards: [main, sensor]
    description: Full system with all boards

cache:
  enabled: true
  directory: ~/.cache/kicad_mcp
  check_mtime: true

Configuration

Configuration files are searched in priority order:

  1. Environment variable: $KICAD_MCP_CONFIG
  2. Local project: .kicad_mcp.yaml (current directory or parent directories)
  3. Global config: ~/.config/kicad_mcp/config.yaml
  4. Default: Empty configuration (no boards pre-loaded)

Configuration Options

  • boards: Named board configurations with paths and descriptions
  • systems: Multi-board system definitions referencing board names
  • cache.enabled: Enable/disable pickle caching of parsed schematics
  • cache.directory: Where to store cache files
  • cache.check_mtime: Invalidate cache when source files change

Available Tools

Board Management

Tool Description
list_configured_boards List all boards from configuration
list_configured_systems List all multi-board systems
load_board Load a board by name (with caching)
load_system Load a multi-board system
reload_config Reload configuration without restarting

Configuration Management

Tool Description
add_board Add a new board to configuration
remove_board Remove a board from configuration
add_system Add a new multi-board system
remove_system Remove a system from configuration

Circuit Analysis (Single Board)

Tool Description
get_overview High-level schematic summary (component count, nets, categories)
list_components List all components, optionally filtered by category
list_nets List all nets, optionally power nets only
examine_component Detailed component info (value, pins, connected nets)
examine_net Detailed net info (connections, component types)
check_pin_connection Find which net a specific pin connects to

Connection Tracing (Single Board)

Tool Description
trace_connection Find connection path between two components
find_connected_components Find all components within N hops of a component

Multi-Board Analysis

Tool Description
get_system_overview Overview of multi-board system
trace_cross_board_signal Trace a signal across multiple boards

Usage Examples

Analyze a Single Board

# Get overview
get_overview(source="main")
# or use direct path:
get_overview(source="/path/to/board.kicad_sch")

# List all ICs
list_components(source="main", category="ICs")

# Examine a specific component
examine_component(source="main", reference="U1")

# Check what IC2 pin 5 connects to
check_pin_connection(source="main", reference="IC2", pin_number="5")

Trace Connections

# Find path between two components
trace_connection(source="main", start_ref="U1", end_ref="U5")

# Find everything connected to a regulator within 2 hops
find_connected_components(source="main", reference="U3", max_hops=2)

# Examine a power net
examine_net(source="main", net_name="VCC")

Multi-Board Systems

# Load and overview a system
load_system(system_name="complete")
get_system_overview(system_name="complete")

# Trace SPI signal across boards
trace_cross_board_signal(
    system_name="complete",
    signal_net="/MISO",
    start_component="main:U1",
    end_component="sensor:U2"
)

Dynamic Configuration

# Add a new board
add_board(
    name="power",
    path="/path/to/power.kicad_sch",
    description="Power supply board"
)

# Create a system with it
add_system(
    name="full_system",
    boards=["main", "sensor", "power"],
    description="Complete system with power"
)

# Reload after manual config edits
reload_config()

Source Parameter

Most analysis tools accept a source parameter which can be:

  • Board name from configuration (e.g., "main")
  • Direct file path to a .kicad_sch file (e.g., "/path/to/board.kicad_sch")

System tools use system_name to reference configured multi-board systems.

Development

# Install with dev dependencies
uv sync --extra dev

# Run tests
pytest

# Format code
black src/

# Type checking
mypy src/

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选