# Visual Feedback: Seeing MCP Changes in KiCAD UI
This document explains how to see changes made by the MCP server in the KiCAD UI in real-time or near-real-time.
## Current Status (Week 1 - SWIG Backend)
**Active Backend:** SWIG (legacy pcbnew Python API)
**Real-time Updates:** Not available yet
**IPC Backend:** Skeleton implemented, operations coming in Weeks 2-3
---
## šÆ Best Current Workflow (SWIG + Manual Reload)
### Setup
1. **Open your project in KiCAD PCB Editor**
```bash
pcbnew /tmp/kicad_test_project/New_Project.kicad_pcb
```
2. **Make changes via MCP** (Claude Code, Claude Desktop, etc.)
- Example: Add board outline, mounting holes, etc.
- Each operation saves the file automatically
3. **Reload in KiCAD UI**
- **Option A (Automatic):** KiCAD 8.0+ detects file changes and shows a reload prompt
- **Option B (Manual):** File ā Revert to reload from disk
- **Keyboard shortcut:** None by default (but you can assign one)
### Workflow Example
```
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā Terminal: Claude Code ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā You: "Create a 100x80mm board with 4 mounting holes" ā
ā ā
ā Claude: ā Added board outline (100x80mm) ā
ā ā Added mounting hole at (5,5) ā
ā ā Added mounting hole at (95,5) ā
ā ā Added mounting hole at (95,75) ā
ā ā Added mounting hole at (5,75) ā
ā ā Saved project ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā KiCAD PCB Editor ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā [Reload prompt appears] ā
ā "File has been modified. Reload?" ā
ā ā
ā Click "Yes" ā Changes appear instantly! š ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
```
---
## š® Future: IPC Backend (Weeks 2-3)
When fully implemented, the IPC backend will provide **true real-time updates**:
### How It Will Work
```
Claude MCP ā IPC Socket ā Running KiCAD ā Instant UI Update
```
**No file reloading required** - changes appear as you make them!
### IPC Setup (When Available)
1. **Enable IPC in KiCAD**
- Preferences ā Advanced Preferences
- Search for "IPC"
- Enable: "Enable IPC API Server"
- Restart KiCAD
2. **Install kicad-python** (Already installed ā)
```bash
pip install kicad-python
```
3. **Configure MCP Server**
Add to your MCP config:
```json
{
"env": {
"KICAD_BACKEND": "ipc"
}
}
```
4. **Start KiCAD first, then use MCP**
- Changes will appear in real-time
- No manual reloading needed
### Current IPC Status
| Feature | Status |
|---------|--------|
| Connection to KiCAD | ā
Working |
| Version checking | ā
Working |
| Project operations | ā³ Week 2-3 |
| Board operations | ā³ Week 2-3 |
| Component operations | ā³ Week 2-3 |
| Routing operations | ā³ Week 2-3 |
---
## š ļø Monitoring Helper (Optional)
A helper script is available to monitor file changes:
```bash
# Watch for changes and notify
./scripts/auto_refresh_kicad.sh /tmp/kicad_test_project/New_Project.kicad_pcb
```
This will print a message each time the MCP server saves changes.
---
## š” Tips for Best Experience
### 1. Side-by-Side Windows
```
āāāāāāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāāāā
ā Claude Code ā KiCAD PCB ā
ā (Terminal) ā Editor ā
ā ā ā
ā Making changes ā Viewing results ā
āāāāāāāāāāāāāāāāāāāā“āāāāāāāāāāāāāāāāāāā
```
### 2. Quick Reload Workflow
- Keep KiCAD focused in one window
- Make changes via Claude in another
- Press Alt+Tab ā Click "Reload" ā See changes
- Repeat
### 3. Save Frequently
The MCP server auto-saves after each operation, so changes are immediately available for reload.
### 4. Verify Before Complex Operations
For complex changes (multiple components, routing, etc.):
1. Make the change
2. Reload in KiCAD
3. Verify it looks correct
4. Proceed with next change
---
## š Troubleshooting
### KiCAD Doesn't Detect File Changes
**Cause:** Some KiCAD versions or configurations don't auto-detect
**Solution:** Use File ā Revert manually
### Changes Don't Appear After Reload
**Cause:** MCP operation may have failed
**Solution:** Check the MCP response for success: true
### File is Locked
**Cause:** KiCAD has the file open exclusively
**Solution:**
- KiCAD should allow external modifications
- If not, close the file in KiCAD, let MCP make changes, then reopen
---
## š
Roadmap
**Current (Week 1):** SWIG backend with manual reload
**Week 2-3:** IPC backend implementation
**Week 4+:** Real-time collaboration features
---
**Last Updated:** 2025-10-26
**Version:** 2.0.0-alpha.1