This major update transforms the KiCad MCP server from file-based analysis to a complete EDA automation platform with real-time KiCad integration and automated routing capabilities. 🎯 Key Features Implemented: - Complete FreeRouting integration engine for automated PCB routing - Real-time KiCad IPC API integration for live board analysis - Comprehensive routing tools (automated, interactive, quality analysis) - Advanced project automation pipeline (concept to manufacturing) - AI-enhanced design analysis and optimization - 3D model analysis and mechanical constraint checking - Advanced DRC rule management and validation - Symbol library analysis and organization tools - Layer stackup analysis and impedance calculations 🛠️ Technical Implementation: - Enhanced MCP tools: 35+ new routing and automation functions - FreeRouting engine with DSN/SES workflow automation - Real-time component placement optimization via IPC API - Complete project automation from schematic to manufacturing files - Comprehensive integration testing framework 🔧 Infrastructure: - Fixed all FastMCP import statements across codebase - Added comprehensive integration test suite - Enhanced server registration for all new tool categories - Robust error handling and fallback mechanisms ✅ Testing Results: - Server startup and tool registration: ✓ PASS - Project validation with thermal camera project: ✓ PASS - Routing prerequisites detection: ✓ PASS - KiCad CLI integration (v9.0.3): ✓ PASS - Ready for KiCad IPC API enablement and FreeRouting installation 🚀 Impact: This represents the ultimate KiCad integration for Claude Code, enabling complete EDA workflow automation from concept to production-ready files. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
53 lines
1.5 KiB
Python
53 lines
1.5 KiB
Python
"""
|
|
Project listing and information resources.
|
|
"""
|
|
|
|
import os
|
|
|
|
from fastmcp import FastMCP
|
|
|
|
from kicad_mcp.utils.file_utils import get_project_files, load_project_json
|
|
|
|
|
|
def register_project_resources(mcp: FastMCP) -> None:
|
|
"""Register project-related resources with the MCP server.
|
|
|
|
Args:
|
|
mcp: The FastMCP server instance
|
|
"""
|
|
|
|
@mcp.resource("kicad://project/{project_path}")
|
|
def get_project_details(project_path: str) -> str:
|
|
"""Get details about a specific KiCad project."""
|
|
if not os.path.exists(project_path):
|
|
return f"Project not found: {project_path}"
|
|
|
|
try:
|
|
# Load project file
|
|
project_data = load_project_json(project_path)
|
|
if not project_data:
|
|
return f"Error reading project file: {project_path}"
|
|
|
|
# Get related files
|
|
files = get_project_files(project_path)
|
|
|
|
# Format project details
|
|
result = f"# Project: {os.path.basename(project_path)[:-10]}\n\n"
|
|
|
|
result += "## Project Files\n"
|
|
for file_type, file_path in files.items():
|
|
result += f"- **{file_type}**: {file_path}\n"
|
|
|
|
result += "\n## Project Settings\n"
|
|
|
|
# Extract metadata
|
|
if "metadata" in project_data:
|
|
metadata = project_data["metadata"]
|
|
for key, value in metadata.items():
|
|
result += f"- **{key}**: {value}\n"
|
|
|
|
return result
|
|
|
|
except Exception as e:
|
|
return f"Error reading project file: {str(e)}"
|