This major update brings the KiCAD MCP server to full MCP 2025-06-18 spec
compliance with proper tool schemas and resources capability.
## Dependencies Updated
- @modelcontextprotocol/sdk: 1.10.0 → 1.21.0 (critical update)
- dotenv: 16.0.3 → 17.0.0 (latest stable)
- typescript: 5.2.2 → 5.9.3
- zod: 3.22.2 → 3.25.0
- @types/node: 20.5.6 → 20.19.0
- @types/express: 5.0.1 → 5.0.5
- requests (Python): 2.31.0 → 2.32.5
- Added @cfworker/json-schema for MCP SDK compatibility
## Tool Schemas (52 tools)
Created comprehensive JSON Schema definitions for all tools organized by category:
- **Project Tools** (4): create_project, open_project, save_project, get_project_info
- **Board Tools** (9): set_board_size, add_board_outline, add_layer, etc.
- **Component Tools** (10): place_component, move_component, rotate_component, etc.
- **Routing Tools** (8): add_net, route_trace, add_via, route_differential_pair, etc.
- **Library Tools** (4): list_libraries, search_footprints, etc.
- **Design Rule Tools** (4): set_design_rules, run_drc, get_drc_violations, etc.
- **Export Tools** (5): export_gerber, export_pdf, export_svg, export_3d, export_bom
- **Schematic Tools** (6): create_schematic, add_schematic_component, etc.
- **UI Tools** (2): check_kicad_ui, launch_kicad_ui
Each tool now has:
- Detailed descriptions explaining purpose
- Complete JSON Schema for input validation
- Required/optional parameter specifications
- Type constraints and validation rules
## Resources Capability (8 resources)
Implemented MCP resources to expose project state:
- `kicad://project/current/info` - Project metadata
- `kicad://project/current/board` - Board properties
- `kicad://project/current/components` - Component list
- `kicad://project/current/nets` - Electrical nets
- `kicad://project/current/layers` - Layer stack
- `kicad://project/current/design-rules` - Design rules
- `kicad://project/current/drc-report` - DRC violations
- `kicad://board/preview.png` - Board preview image
## Protocol Compliance
- Updated initialize response with proper capabilities declaration
- Added `tools: { listChanged: true }`
- Added `resources: { subscribe: false, listChanged: true }`
- Enhanced serverInfo with title and version
- Added instructions field for user guidance
- Implemented resources/list method
- Implemented resources/read method with proper error handling
- All responses follow MCP 2025-06-18 spec exactly
## Benefits
✅ Claude/LLMs can now understand what each tool does
✅ Automatic parameter validation via JSON Schema
✅ Better error messages for invalid inputs
✅ Access to project state via resources (no need to call tools)
✅ Full MCP protocol compliance
✅ Better developer experience with latest SDK features
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
49 lines
1.4 KiB
JSON
49 lines
1.4 KiB
JSON
{
|
|
"name": "kicad-mcp",
|
|
"version": "2.1.0-alpha",
|
|
"description": "AI-assisted PCB design with KiCAD via Model Context Protocol",
|
|
"type": "module",
|
|
"main": "dist/index.js",
|
|
"scripts": {
|
|
"build": "tsc",
|
|
"build:watch": "tsc --watch",
|
|
"start": "node dist/index.js",
|
|
"dev": "npm run build:watch & nodemon dist/index.js",
|
|
"clean": "rm -rf dist",
|
|
"rebuild": "npm run clean && npm run build",
|
|
"test": "npm run test:ts && npm run test:py",
|
|
"test:ts": "echo 'TypeScript tests not yet configured'",
|
|
"test:py": "pytest tests/ -v",
|
|
"test:coverage": "pytest tests/ --cov=python --cov-report=html --cov-report=term",
|
|
"lint": "npm run lint:ts && npm run lint:py",
|
|
"lint:ts": "eslint src/ || echo 'ESLint not configured'",
|
|
"lint:py": "cd python && black . && mypy . && flake8 .",
|
|
"format": "prettier --write 'src/**/*.ts' && black python/",
|
|
"prepare": "npm run build",
|
|
"pretest": "npm run build"
|
|
},
|
|
"keywords": [
|
|
"kicad",
|
|
"mcp",
|
|
"model-context-protocol",
|
|
"pcb-design",
|
|
"ai",
|
|
"claude"
|
|
],
|
|
"author": "",
|
|
"license": "MIT",
|
|
"dependencies": {
|
|
"@modelcontextprotocol/sdk": "^1.21.0",
|
|
"dotenv": "^17.0.0",
|
|
"express": "^5.1.0",
|
|
"zod": "^3.25.0"
|
|
},
|
|
"devDependencies": {
|
|
"@cfworker/json-schema": "^4.1.1",
|
|
"@types/express": "^5.0.5",
|
|
"@types/node": "^20.19.0",
|
|
"nodemon": "^3.0.1",
|
|
"typescript": "^5.9.3"
|
|
}
|
|
}
|