Commit Graph

297 Commits

Author SHA1 Message Date
Roman PASSLER
a018575bbc fix(mounting-hole): generate unique references MH1, MH2, etc.
All mounting holes were assigned the same reference "MH", violating
PCB conventions and causing conflicts. Now queries existing footprints
to find the next available MH number.
2026-03-01 18:41:39 +01:00
Roman PASSLER
4e70342eae fix(drc): extract violation coordinates from kicad-cli JSON items
kicad-cli DRC JSON output stores coordinates in items[].pos.x/y,
not at the violation top level. The code was reading violation.x/y
which don't exist, falling back to (0, 0) for every violation.
Now correctly reads the position from the first item in each
violation entry.
2026-03-01 18:40:45 +01:00
Roman PASSLER
ec1939bef4 fix(copper-pour): add outline parameter and fallback to board outline
Two issues fixed:
1. TypeScript schema was missing the outline parameter entirely,
   so MCP clients couldn't send pour boundary points.
2. Python code read "points" key but schema defined "outline" key.

Now accepts "outline" (with "points" as fallback for backwards
compatibility). When no outline is provided, automatically uses
the board edge bounding box as the pour boundary.
2026-03-01 18:40:24 +01:00
Roman PASSLER
246050001a fix(nets): use GetNetClassName() instead of GetClassName() on NETINFO_ITEM
NETINFO_ITEM objects don't have a GetClassName() method, causing
an AttributeError crash when listing nets. The correct method is
GetNetClassName() which returns the net class name string.
2026-03-01 18:37:55 +01:00
Roman PASSLER
c7d6d0126f fix(bom): use GetUniStringLibId() instead of str() for footprint in BOM export
str(module.GetFPID()) returns the Swig proxy representation like
"<pcbnew.LIB_ID; proxy of ...>" instead of the actual footprint name.
GetUniStringLibId() returns the proper "Library:Footprint" string.
2026-03-01 18:37:35 +01:00
Tom
d9c296f586 fix: restore KiCAD 9 format version in templates (regression from upstream 2b38796)
Upstream commit 2b38796 downgraded template_with_symbols.kicad_sch and
template_with_symbols_expanded.kicad_sch from version 20250114 to 20240101.

KiCAD 9 requires version 20250114 - files with older versions cause parse
errors or are rejected. This was originally fixed in ce78fb4.
2026-03-01 15:05:36 +01:00
Tom
f0d738fff1 feat: add route_pad_to_pad tool
Convenience wrapper around route_trace that eliminates the need for
separate get_pad_position calls before routing.

- Accepts fromRef/fromPad/toRef/toPad instead of raw coordinates
- Automatically looks up pad positions from board footprints
- Auto-detects net from pad assignment (overridable via net param)
- Returns fromPad/toPad position info in response
- Saves ~2 tool calls (64+ calls for a full TMC2209 board) vs 3-step flow

Registered in: routing.py, kicad_interface.py (dispatch), routing.ts (MCP)
2026-03-01 15:03:52 +01:00
Tom
b33d6e22fd fix: project-local library resolution + copy_routing_pattern geometric fallback + TypeScript tool
- fix: DynamicSymbolLoader reads project sym-lib-table before global dirs
  add_schematic_component now finds symbols from project-local .kicad_sym files
  project_path derived automatically from schematic file path

- fix: place_component reloads FootprintLibraryManager with project_path
  new boardPath parameter passed to place_component tool (TypeScript + Python)
  _handle_place_component wrapper recreates LibraryManager per project

- fix: copy_routing_pattern geometric fallback when pads have no nets
  primary filter: net-based (when pads are assigned to nets)
  fallback: bounding box of source footprint pads +5mm tolerance
  filterMethod field in response indicates which mode was used

- feat: register copy_routing_pattern as MCP tool in routing.ts
  sourceRefs, targetRefs, includeVias, traceWidth parameters

Live tested: ESP32 + 2x TMC2209 in Test3 project
  13 traces U2 routed, copy_routing_pattern copied all 13 to U3
  offset Y+30mm correct, 26 total traces verified
2026-03-01 15:03:52 +01:00
KiCAD MCP Bot
2b38796409 fix: Update schematic format to KiCAD 9 and fix invalid UUIDs (#37)
- Update schematic version from 20230121 (KiCAD 7) to 20240101 (KiCAD 9)
- Replace invalid all-zeros UUIDs in template files with valid UUIDs
- Add post-copy UUID regeneration to ensure each project gets unique UUID
- Add UTF-8 encoding and Unix line endings for cross-platform compatibility

Fixes the root cause where templates were copied with invalid UUIDs and
outdated version format, causing KiCAD 9.0.x to reject the schematic files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 08:02:52 -05:00
Tom
914c4fa1e3 feat: add footprint + symbol creator tools
Footprint tools:
- create_footprint: generates .kicad_mod via f-string (SMD/THT, courtyard, silkscreen, fab)
- edit_footprint_pad: updates size/position/drill/shape in-place
- list_footprint_libraries: scans .pretty directories
- register_footprint_library: adds entry to fp-lib-table

Symbol tools:
- create_symbol: generates .kicad_sym with pins, rectangles, polylines
- delete_symbol: removes symbol from library
- list_symbols_in_library: lists all symbols in a .kicad_sym file
- register_symbol_library: adds entry to sym-lib-table

Also:
- Fix footprint format version: 20250114 (schematic) -> 20241229 (footprint)
- Two MCP prompts: create_footprint_guide + footprint_ipc_checklist

Live tested: TMC2209 footprint (19 pads), R_0603_Test, edit_footprint_pad,
TMC2209_Custom symbol with pins all confirmed in KiCAD 9
2026-02-28 22:42:27 +01:00
Tom
b1eb570183 fix: footprint param ignored, delete duplicates, add edit_schematic_component
Bug 1 - add_schematic_component: footprint parameter silently ignored
  The footprint value from MCP params was never passed through to
  DynamicSymbolLoader.add_component() / create_component_instance().
  Every placed symbol had an empty Footprint field regardless of input.
  Fix: added footprint: str='' to both functions, passed through all
  call sites, added footprint to schematic.ts tool schema.

Bug 2 - delete_schematic_component: only deleted first duplicate
  When a reference appeared multiple times (e.g. after a failed
  add attempt), only the first instance was removed due to break
  after first match. Fix: collect all matching blocks first, then
  delete back-to-front to preserve indices. Response now includes
  deleted_count.

New tool - edit_schematic_component
  Update footprint, value or reference of a placed symbol in-place.
  More efficient than delete+re-add: preserves position and UUID.
  Accepts: schematicPath, reference, footprint?, value?, newReference?

All 3 fixes verified by live tests on a real JLCPCB/KiCAD 9 project:
  - R_TEST1: footprint Resistor_SMD:R_0603_1608Metric written correctly
  - J1 duplicate: deleted_count=2 with single call
  - J2 edit: PinSocket footprint assigned in-place, no delete+add needed
  - PCB update (F8) confirmed: only components with footprint imported
2026-02-28 15:21:07 +01:00
Tom
ce78fb4111 fix: update templates to KiCAD 9 format + remove corrupt _TEMPLATE_ blocks
Verified by live test: created a fresh schematic via MCP, result shows
format version 20250114, 0 _TEMPLATE_ hits, 0 (lib_id -100) hits, 24
real components placed cleanly.

--- Format version bump (20230121 KiCAD 7 -> 20250114 KiCAD 9) ---
Files: python/templates/*.kicad_sch, python/commands/project.py,
       python/commands/schematic.py

Root cause: the MCP server targets KiCAD 9 exclusively - pcbnew.pyd is
compiled for KiCAD 9.0 / Python 3.11.5, and server.ts explicitly selects
the KiCAD 9 bundled Python on Windows. Generating new schematics with a
2-year-old format tag caused a spurious 'This file was created with an
older KiCAD version' warning on every newly created schematic.

--- Remove corrupt _TEMPLATE_* placed-symbol blocks ---
File: python/templates/template_with_symbols_expanded.kicad_sch

Root cause: the expanded template was generated by the old sexpdata
serializer (same corruption PR #40 fixed for DynamicSymbolLoader add-path).
The serializer converted the string 'Device:R' to integer -100, producing
(lib_id -100) instead of (lib_id Device:R). KiCAD cannot resolve an
integer as a library reference and crashes with a null-pointer when the
user attempts to select these symbols. They appeared as grey _TEMPLATE_R?,
_TEMPLATE_C?, _TEMPLATE_U_REG? etc. ~5000mm off-sheet - invisible during
normal work but triggering a crash on accidental box-select.

Discovered via live testing on a real JLCPCB/KiCAD 9 project.
2026-02-28 14:40:32 +01:00
Tom
1ba86f7769 feat: datasheet tools + fix missing delete_schematic_component
New tools - datasheet:
- get_datasheet_url: construct LCSC datasheet PDF URL + product page URL
  without any API key (URL schema: https://www.lcsc.com/datasheet/<C#>.pdf)
- enrich_datasheets: scan .kicad_sch, write LCSC datasheet URL into every
  symbol that has an LCSC property but an empty Datasheet field; supports
  dry_run=true for preview; text-based implementation (no skip writes)
  Implementation: python/commands/datasheet_manager.py

New tool - schematic:
- delete_schematic_component: remove a placed symbol from a .kicad_sch file
  by reference designator (e.g. R1, U3)

Bug fix - delete_schematic_component (two separate root causes):
1. No MCP tool named delete_schematic_component was registered at all.
   Any delete-symbol request fell through to the PCB-only delete_component
   tool which searches pcbnew.BOARD and always returned 'Component not found'
   for schematic symbols.
2. component_schematic.py::remove_component() still used skip for writes.
   PR #40 rewrote DynamicSymbolLoader (add path) to avoid skip-induced
   schematic corruption, but the delete path was not touched by that PR.

Fix: _handle_delete_schematic_component in kicad_interface.py uses direct
text manipulation with parenthesis-depth tracking (same technique as PR #40),
bypassing component_schematic.py entirely. Error message explicitly guides
users: 'use delete_component for PCB footprints'.

Files changed:
- python/commands/datasheet_manager.py (new)
- src/tools/datasheet.ts (new)
- python/kicad_interface.py: 3 new handlers + dispatch entries
- src/tools/schematic.ts: delete_schematic_component tool
- src/server.ts: registerDatasheetTools import + call
- src/tools/index.ts: export registerDatasheetTools
- CHANGELOG.md: document all above
2026-02-28 13:48:35 +01:00
Tom
76503b144c fix: generate_netlist schematic_path, PinLocator cache, server.ts Python detection
- connection_schematic.py: generate_netlist() now accepts schematic_path param,
  threaded through to get_net_connections() so PinLocator is actually invoked
  (previously only 1 connection per component was returned due to fallback break)
- kicad_interface.py: pass schematic_path to generate_netlist()
- pin_locator.py: add _schematic_cache to avoid loading Schematic() once per pin
  (was causing timeout: O(nets x components x pins) Schematic() calls)
- server.ts: remove fragile PYTHONPATH?.includes('KiCad') condition,
  always prefer KiCAD bundled Python on Windows when executable exists
- CHANGELOG.md: document fixes under v2.2.0-alpha
2026-02-28 01:23:36 +01:00
Tom
2945b52eae feat: Add missing routing/component tools and fix SWIG/UUID bugs
New MCP tools added (TypeScript layer):
- Routing: delete_trace, query_traces, get_nets_list, modify_trace,
  create_netclass, route_differential_pair, refill_zones (with SWIG warning)
- Component: get_component_pads, get_component_list, get_pad_position,
  place_component_array, align_components, duplicate_component

Bug fixes:
- routing.py: Fix SwigPyObject UUID comparison (str() -> m_Uuid.AsString())
- routing.py: Fix SWIG iterator invalidation after board.Remove()
  by converting board.Tracks() to list() before iteration
- routing.py: Add board.SetModified() and clear Python refs after Remove()
  to prevent dangling SWIG pointers crashing subsequent calls
- routing.py: Wrap each track access in try/except in query_traces()
  to gracefully skip invalid track objects after bulk delete
- routing.py: Add missing return statement (mypy fix)
- library.py: Fix search_footprints param mapping search_term->pattern
- library.py: Fix fp.name -> fp.full_name field access
- library.py: Accept both 'pattern' and 'search_term' parameter names
- library.py: Add library filter support in search_footprints
- library.py: Fix loop variable shadowing Path object (mypy fix)
- design_rules.py: Add type annotation for violation_counts (mypy fix)

Contribution guidelines followed (CONTRIBUTING.md):
- black python/ applied (3 touched files pass without changes)
- mypy python/ passes with 0 errors on all changed files
- npx prettier --write applied to changed TypeScript files
- npm run build passes (tsc --noEmit: 0 errors)
- Commit messages follow feat:/fix: convention

Note on diff size: The large insertion/deletion count in the changed files
is due to black and prettier reformatting previously unformatted code
(missing trailing commas, quote style, line length). The actual logic
changes are limited to the 6 files listed above.

Note: refill_zones has known SWIG segfault risk (see KNOWN_ISSUES.md).
Prefer IPC backend (KiCAD open) or zone fill via KiCAD UI.
2026-02-27 18:15:46 +01:00
FlowSync0
a69d288251 fix: Rewrite DynamicSymbolLoader to prevent schematic file corruption (#40)
Fixes Issue #26 - add_schematic_component corrupts .kicad_sch files

Complete rewrite of DynamicSymbolLoader to use text manipulation instead of sexpdata:
- Preserves KiCAD file formatting perfectly
- Correctly handles KiCAD 9 symbol naming conventions (library prefix for top-level, no prefix for sub-symbols)
- Resolves parent-child symbol dependencies with (extends)
- Adds symbol caching for performance
- Simplifies component addition workflow

Tested on KiCAD 9.0.7 with R, C, LED, ESP32, and transistor components.
Compatible with recent Windows fixes (UUID generation, IPC, JLCPCB).

Co-authored-by: FlowSync0 <249798311+FlowSync0@users.noreply.github.com>
2026-02-26 11:02:10 -05:00
KiCAD MCP Bot
e4fa774eda fix: Phase 2 - DRC API fix and JLCPCB documentation restructure (#33, #34, #43)
Phase 2 medium-priority fixes addressing three issues:

Issue #33 - DRC violations API broken in KiCAD 9.0:
- Reimplemented get_drc_violations() to use run_drc() internally
- run_drc uses kicad-cli which is stable across KiCAD versions
- Maintains backward compatibility while fixing GetDRCMarkers() issue
- Added documentation to KNOWN_ISSUES.md
- Returns violations in original format by parsing kicad-cli JSON output

Issue #34 - JLCPCB API documentation misleading:
- Restructured README and JLCPCB_USAGE_GUIDE.md
- Now leads with JLCSearch public API (no authentication required)
- Moved official JLCPCB API to "Advanced" section with clear requirements
- Clarified that official API requires enterprise account + order history
- Makes it easier for new users to get started

Issue #43 - JLCPCB part count documentation inaccurate:
- Updated all "100k+" references to "2.5M+" (accurate catalog size)
- Updated download time estimates to 40-60 minutes
- Updated expected database size to 1-2 GB
- Clarified 100-part pagination limit in JLCSearch API

Documentation changes:
- README.md: Updated JLCPCB integration section
- docs/JLCPCB_USAGE_GUIDE.md: Complete restructure with 3 approaches
- docs/KNOWN_ISSUES.md: Added DRC fix documentation

All changes improve user experience and documentation accuracy.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-26 10:11:55 -05:00
KiCAD MCP Bot
b4d114ac74 fix: Address critical Windows compatibility and JLCPCB issues (#36, #37, #35)
Phase 1 critical fixes addressing three high-priority issues:

Issue #36 - Windows IPC backend crash (os.getuid not available):
- Add platform detection to skip Unix-specific socket paths on Windows
- Use hasattr check before calling os.getuid()
- Windows now uses auto-detect fallback (named pipes)
- Maintains full Unix socket support on Linux/macOS

Issue #37 - Windows schematic file creation broken:
- Generate unique UUIDs instead of invalid all-zeros UUID
- Add explicit UTF-8 encoding for cross-platform compatibility
- Force Unix line endings (LF) to prevent Windows CRLF issues
- Update template file with valid placeholder UUID
- Fix hardcoded /tmp/ paths in wire_manager.py and pin_locator.py

Issue #35 - JLCPCB download limited to 100 parts:
- Change batch_size from 1000 to 100 to match tscircuit API limit
- Remove premature loop termination when batch < batch_size
- Add documentation explaining API limitation
- Expected result: Full ~2.5M part catalog download (40-60 minutes)

All changes maintain backward compatibility and include detailed comments.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-26 10:03:20 -05:00
KiCAD MCP Bot
b9bd401b11 feat: Add routing replication commands for Issue #30 Phase 2
Implements advanced trace manipulation and routing pattern copying:
- Enhanced delete_trace with net-based bulk deletion and layer filtering
- Added modify_trace to change width, layer, or net by UUID/position
- Added copy_routing_pattern to replicate routing between component groups

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 19:24:59 -05:00
KiCAD MCP Bot
04db774a2b feat: Address multiple open issues (#32, #30, #26, #19)
Issue #32 - Unknown command errors:
- Register get_board_extents in command_routes (was implemented but not registered)
- Implement find_component command with pattern matching on reference/value/footprint
- Add schemas for both commands

Issue #30 - PCB routing replication (Phase 1):
- Implement get_component_pads: returns all pads with positions, nets, shapes
- Implement get_pad_position: returns specific pad coordinates and properties
- Implement query_traces: query traces by net, layer, or bounding box
- Add schemas for all new commands

Issue #26 - Schematic workflow:
- Add missing schemas for add_schematic_connection, add_schematic_net_label,
  connect_to_net, get_net_connections, and generate_netlist

Issue #19 - macOS Python path detection:
- Add Python 3.13 to version detection
- Add alternative KiCAD installation paths (user Applications, capitalization variants)
- Add Homebrew Python fallback paths for Apple Silicon and Intel Macs
- Expand platform_helper.py with same improvements

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 19:17:35 -05:00
KiCAD MCP Bot
aa18486359 fix: Replace SetFootprintName with SetFPID for KiCAD 9.x compatibility
Fixes issue #28 where place_component fails on KiCAD 9.0.5 with:
'FOOTPRINT' object has no attribute 'SetFootprintName'

KiCAD 9.x API changed from SetFootprintName() to SetFPID(LIB_ID).

Changes:
- place_component: Parse footprint string and use SetFPID with LIB_ID
- update_component: Parse footprint string or preserve existing library
- duplicate_component: Use source.GetFPID() directly

All three methods now use the KiCAD 9.x API while maintaining backward
compatibility with the footprint parameter format.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-10 11:43:54 -05:00
KiCAD MCP Bot
a5a542b1e9 feat: Implement wire graph analysis for net connectivity (Phase 2)
Major Feature: Wire Graph Analysis
- Rewrote get_net_connections() with geometric wire tracing
- Added points_coincide() helper for coordinate matching
- Implemented multi-step connectivity algorithm:
  1. Find all labels with target net name
  2. Trace wires connected to label positions
  3. Find component pins at wire endpoints using PinLocator
  4. Return accurate component/pin connections

Technical Implementation:
- Tolerance-based point matching (0.5mm for grid alignment)
- Wire polyline support (traces multi-segment paths)
- Accurate pin location matching with rotation support
- Fallback proximity matching when schematic_path unavailable

Testing Results:  100% PASSING
- VCC: 2 connections (R1_/1, D1_/1) ✓
- GND: 4 connections (R1_/2, R2_/2, C1_/2, D1_/2) ✓
- +3V3: 1 connection (R2_/1) ✓
- +5V: 1 connection (C1_/1) ✓
- Netlist generation: 4 nets detected ✓
- Comprehensive power circuit test: PASSED ✓

Updates:
- get_net_connections() now accepts optional schematic_path parameter
- generate_netlist() automatically uses improved connectivity analysis
- Full integration with PinLocator for accurate pin matching

Addresses: Phase 2 net connectivity analysis requirements

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-10 10:52:20 -05:00
KiCAD MCP Bot
b77f0081d6 fix: Resolve template mapping bug in dynamic symbol loading
Critical Bug Fixes:
1. Changed get_or_create_template() return type to tuple (template_ref, needs_reload)
2. Added automatic schematic reload after dynamic loading
3. Replaced hasattr() checks with symbol iteration (handles special characters like +)
4. Added template_exists() helper function
5. Fixed template lookup to check multiple potential reference formats

Issues Resolved:
- Multiple components of same type can now be added after dynamic loading
- Power symbols with special characters (+3V3, +5V) work correctly
- Template references with library prefix are properly detected
- Schematic object stays in sync with file after dynamic injections

Testing:
-  Power symbols: 4/4 loaded (VCC, GND, +3V3, +5V)
-  Components: 4/4 placed (R, R, C, LED)
-  Connections: 8/8 created
-  Special character handling (+3V3, +5V) working

Technical Details:
- hasattr() fails with attribute names containing special characters
- Must iterate symbols and check Reference.value directly
- Schematic reload required after S-expression injection
- Template name formats: _TEMPLATE_R, _TEMPLATE_power_VCC, _TEMPLATE_Device_R

Addresses template mapping issues found during Phase 2 power net testing

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-10 10:49:08 -05:00
KiCAD MCP Bot
c67f400383 feat: Update connect_to_net to use WireManager (Phase 2)
Updates:
- ConnectionManager.connect_to_net() now uses PinLocator + WireManager
- Accepts Path parameter instead of Schematic object
- Creates wire stub (2.54mm) from pin to label position
- Uses WireManager.add_wire() and WireManager.add_label()
- Updated MCP handler _handle_connect_to_net()

Testing:
-  connect_to_net test: 100% passing
-  R1/1 → VCC wire stub + label
-  D1/2 → GND wire stub + label
-  Verified with kicad-skip: 5 wires, 4 labels

Part of Phase 2: Net Labels & Named Nets (Issue #26)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-10 10:40:56 -05:00
KiCAD MCP Bot
16703e28f9 feat: Integrate WireManager and PinLocator into MCP interface handlers
Updates MCP handlers to use the new wiring infrastructure:

Handler Updates:
- _handle_add_schematic_wire: Uses WireManager.add_wire() with S-expression manipulation
- _handle_add_schematic_connection: Uses ConnectionManager with automatic pin discovery and routing options (direct, orthogonal_h, orthogonal_v)
- _handle_add_schematic_net_label: Uses WireManager.add_label() with support for label types and orientation

Features:
- Automatic pin location discovery with rotation support
- Professional wire routing (direct, orthogonal horizontal-first, orthogonal vertical-first)
- Net label placement with customizable types (label, global_label, hierarchical_label)
- Comprehensive error handling and logging

Testing:
- All MCP handlers tested and verified working
- Integration test: 100% passing (2 wires, 1 label created successfully)
- Verified with kicad-skip that wires and labels are correctly formed

Part of Issue #26 schematic wiring implementation (Phase 1)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-10 10:35:16 -05:00
KiCAD MCP Bot
1d9e92a165 feat: Complete MCP integration for dynamic symbol loading! 🎉
MAJOR MILESTONE: Dynamic symbol loading is now fully integrated through the MCP interface!

## What's Working

 **Full MCP Integration**
- Modified _handle_add_schematic_component to orchestrate dynamic loading
- Detects when symbols need dynamic loading (not in static templates)
- Automatically saves → injects → reloads → clones → saves workflow

 **ComponentManager Integration**
- Added schematic_path parameter to add_component() and get_or_create_template()
- Seamlessly switches between static templates and dynamic loading
- Proper error handling and fallback mechanisms

 **Smart Detection**
- Checks if component type is in static template map
- Verifies template exists in current schematic
- Only triggers dynamic loading when truly needed

 **Reload Orchestration**
- Saves schematic before dynamic loading (preserves changes)
- Calls DynamicSymbolLoader.load_symbol_dynamically()
- Reloads schematic to get newly injected symbols
- Clones from reloaded templates

## Test Results

End-to-end integration test:  **100% PASSING**

Components tested:
- R (resistor) - static template, dynamically loaded
- C (capacitor) - static template, dynamically loaded
- Battery - pure dynamic loading 
- Fuse - pure dynamic loading 
- Transformer_1P_1S - pure dynamic loading 

All 5 components added successfully!

## Impact

Users can now add **ANY symbol from KiCad's ~10,000 symbol libraries** through the MCP interface!
No more limitation to 13 pre-configured templates!

## Technical Details

1. MCP handler detects dynamic loading need
2. Saves current schematic state
3. Calls dynamic loader (injects symbol + creates template)
4. Reloads schematic (kicad-skip sees new template)
5. Clones template to create component
6. Saves final result

Response includes:
- success status
- dynamic_loading_used flag
- symbol_source (library:symbol)
- template_reference

## Files Modified

- python/kicad_interface.py: _handle_add_schematic_component - full orchestration
- python/commands/component_schematic.py: add_component() and get_or_create_template() - schematic_path support

## Time Estimate vs Actual

Estimated: 2-3 hours
Actual: ~2 hours
Status:  ON TARGET!

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-10 10:16:07 -05:00
KiCAD MCP Bot
62d97f1fa6 feat: Dynamic symbol loading - CORE FUNCTIONALITY WORKING! 🎉
**MAJOR BREAKTHROUGH:** Implemented dynamic symbol loading from KiCad library files!
This eliminates the 13-component limitation and enables access to ALL KiCad symbols.

**What Works (Phase A Complete):**
 Symbol extraction from .kicad_sym library files
 S-expression parsing and manipulation
 Dynamic injection of symbols into schematics
 Template instance creation for cloning
 Full end-to-end workflow tested successfully

**Test Results:**
- Loaded 5 symbols dynamically (R, C, LED, L, D) from Device.kicad_sym
- Injected symbol definitions into schematic's lib_symbols section
- Created template instances at offscreen positions
- Successfully cloned components from dynamic templates
- All operations work with kicad-skip library

**New File:**
- python/commands/dynamic_symbol_loader.py (400+ lines)
  - DynamicSymbolLoader class
  - find_kicad_symbol_libraries() - cross-platform library discovery
  - parse_library_file() - S-expression parsing with caching
  - extract_symbol_definition() - extract specific symbols
  - inject_symbol_into_schematic() - inject symbols into lib_symbols
  - create_template_instance() - create cloneable templates
  - load_symbol_dynamically() - complete workflow

**Modified:**
- python/commands/component_schematic.py
  - Added dynamic loader integration hooks
  - get_or_create_template() method for hybrid approach
  - Falls back to static templates gracefully

**How It Works:**
1. Parse .kicad_sym file with sexpdata library
2. Extract specific symbol definition (S-expression tree)
3. Inject into schematic's lib_symbols section
4. Create offscreen template instance (_TEMPLATE_Device_R)
5. kicad-skip can clone() the template to create components

**Benefits:**
- Access to ~10,000+ standard KiCad symbols
- No manual template maintenance required
- Works with ANY .kicad_sym library file
- Maintains static template fallback

**Next Steps (Integration):**
- Wire through MCP interface layer (has schematic path)
- Create add_schematic_component_dynamic MCP tool
- Add symbol search/discovery tools
- Cross-platform testing (Windows, macOS)

**Technical Notes:**
- Uses sexpdata library for S-expression manipulation
- Caches parsed libraries for performance
- Generates unique UUIDs for template instances
- Positions templates offscreen (y = -100 - offset)
- Preserves schematic structure and formatting

This is a MASSIVE step forward! The hardest part (S-expression manipulation
and template injection) is DONE and WORKING. 🚀

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-10 10:10:57 -05:00
KiCAD MCP Bot
0540a5d0f4 fix: Issue #27 - list_library_symbols now returns proper error for missing libraries
**Root Cause:**
When a library wasn't registered in sym-lib-table, the tool returned:
- success: true
- symbols: []
- count: 0

This was confusing because it looked like the library existed but was empty.

**The Fix:**
Now explicitly checks if library exists in sym-lib-table before attempting
to list symbols. If not found, returns:
- success: false
- Clear error message: "Library 'X' not found in sym-lib-table"
- Helpful details about how to resolve (add to sym-lib-table or use available libs)
- Count of available libraries
- Suggestion to use 'list_symbol_libraries' tool

**Test Results:**
✓ Non-existent library (BQ25896RTWT): Returns error as expected
✓ Valid library (Device): Returns 533 symbols successfully

**User Impact:**
Users will now get clear feedback when they try to access libraries that
aren't registered in their KiCad configuration, instead of seeing "0 symbols"
which suggests the library exists but is empty.

Fixes #27

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-10 10:06:16 -05:00
KiCAD MCP Bot
4a543313eb feat: Expand schematic component support from 3 to 13 types + plan dynamic loading
Issue #26 Follow-up: The original fix only supported 3 component types (R, C, LED).
This expands the template-based approach to 13 types while planning for unlimited access.

**Expanded Template (Option 1 - Immediate Solution):**
- Added 10 new component types to template
- Passives: R, C, L, Crystal (4 types)
- Semiconductors: D, LED, Q_NPN, Q_NMOS (4 types)
- ICs: OpAmp, Voltage Regulator (2 types)
- Connectors: Conn_2pin, Conn_4pin (2 types)
- Misc: Switch/Button (1 type)

**Components Now Supported:**
1. Resistor (R)
2. Capacitor (C)
3. Inductor (L)
4. Crystal (Y)
5. Diode (D)
6. LED
7. NPN Transistor (Q_NPN)
8. N-Channel MOSFET (Q_NMOS)
9. Op-Amp (U)
10. Voltage Regulator (U_REG)
11. 2-pin Connector (J2)
12. 4-pin Connector (J4)
13. Push Button/Switch (SW)

**Implementation:**
- Created template_with_symbols_expanded.kicad_sch with all 13 types
- Updated TEMPLATE_MAP with comprehensive type mappings
- Updated project.py to use expanded template by default
- All tests passing (13/13 components added successfully)

**Future Plan (Option 2 - Dynamic Library Loading):**
- Documented comprehensive plan for accessing ALL KiCad symbols (~10,000+)
- Dynamic loading from .kicad_sym library files
- S-expression injection approach
- 6-8 week implementation timeline
- Maintains template fallback for compatibility

**Files Added:**
- python/templates/template_with_symbols_expanded.kicad_sch
- docs/DYNAMIC_LIBRARY_LOADING_PLAN.md

**Files Modified:**
- python/commands/component_schematic.py (expanded TEMPLATE_MAP)
- python/commands/project.py (use expanded template)

This provides immediate value (13 types vs 3) while we plan the long-term
solution of unlimited symbol access through dynamic library loading.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-10 09:54:51 -05:00
KiCAD MCP Bot
994965e041 feat: Complete Phase 1 & 2 - Schematic workflow fix and JLCPCB integration
Phase 1: Schematic Workflow Fix (Issue #26)
- Fixed broken schematic workflow using template-based symbol cloning
- Updated create_project to generate both PCB and schematic files
- Rewrote add_schematic_component to use kicad-skip clone() API
- Added template schematics with cloneable R, C, LED symbols
- All schematic tests now passing

Phase 2: JLCPCB Integration Complete
- Integrated JLCSearch public API (no authentication required)
- Access to ~100k JLCPCB parts with real-time stock and pricing
- Implemented parametric search for resistors, capacitors, components
- Added package-to-footprint mapping for KiCad integration
- Cost optimization with Basic vs Extended library classification
- Alternative part suggestions with price comparison

New Components:
- python/commands/jlcsearch.py - JLCSearch API client
- python/templates/ - Template schematics for symbol cloning
- docs/JLCPCB_INTEGRATION.md - Comprehensive API documentation
- docs/SCHEMATIC_WORKFLOW_FIX.md - Phase 1 technical details
- CHANGELOG.md - Consolidated unified changelog
- PHASE_2_COMPLETE.md - Phase 2 implementation summary

MCP Tools Available:
- download_jlcpcb_database - Download full parts catalog
- search_jlcpcb_parts - Parametric search with filters
- get_jlcpcb_part - Part details + footprint suggestions
- get_jlcpcb_database_stats - Database statistics
- suggest_jlcpcb_alternatives - Find similar/cheaper parts

Technical Improvements:
- SQLite database with FTS5 full-text search
- HMAC-SHA256 authentication support (official JLCPCB API)
- Improved .gitignore to exclude credentials and databases
- Template-based schematic creation workflow

Testing:
- All integration tests passing
- Database operations validated
- Live API connectivity confirmed
- Schematic workflow end-to-end verified

Credits:
- JLCSearch API: @tscircuit
- Local JLCPCB search: @l3wi

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-10 09:04:56 -05:00
KiCAD MCP Bot
4c6514eb6b feat: Add complete JLCPCB API integration with dual-mode support
Implements full JLCPCB parts catalog integration alongside existing local library search,
giving users two complementary approaches for component selection:

1. Local Symbol Libraries (PR #25)
   - Search JLCPCB libraries installed via KiCad PCM
   - Pre-configured symbols with footprints
   - Works offline, no API needed

2. JLCPCB API Integration (NEW)
   - Complete 100k+ parts catalog access
   - Real-time pricing and stock information
   - Basic/Extended library type identification
   - Cost optimization and alternative suggestions
   - Package-to-footprint mapping

New Features:
- download_jlcpcb_database: Download complete parts catalog to local SQLite DB
- search_jlcpcb_parts: Parametric search with pricing, stock, library type filters
- get_jlcpcb_part: Detailed part info with price breaks and footprint suggestions
- get_jlcpcb_database_stats: Database statistics and status
- suggest_jlcpcb_alternatives: Find cheaper/available alternatives

Implementation:
- Python API client (commands/jlcpcb.py) - JLCPCB API authentication and data fetching
- Parts database manager (commands/jlcpcb_parts.py) - SQLite storage and search
- TypeScript MCP tools (tools/jlcpcb-api.ts) - User-facing tool definitions
- Comprehensive documentation (docs/JLCPCB_USAGE_GUIDE.md)

Database Features:
- ~100k parts with descriptions, pricing, stock levels
- Full-text search on descriptions and part numbers
- Parametric filtering (category, package, manufacturer, library type)
- Package-to-footprint mapping for KiCad
- Intelligent alternative suggestions

Setup Requirements:
- JLCPCB_API_KEY and JLCPCB_API_SECRET environment variables
- One-time database download (~5-10 minutes, 42MB)
- requests library (already in requirements.txt)

Benefits:
- Cost optimization (identify Basic parts = free assembly)
- Real-time stock checking
- Complete catalog access
- Works offline after initial download
- Complements local library search

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-31 11:04:08 -05:00
Lewis Freiberg
0227dd48d2 feat: Add local symbol library search and 3rd party library support (#25)
Adds comprehensive local KiCad symbol library search functionality and fixes KICAD9_3RD_PARTY environment variable resolution.

Features:
- Symbol library search by name, LCSC ID, description, manufacturer, MPN
- Support for 3rd party libraries installed via Plugin and Content Manager
- New MCP tools: search_symbols, list_symbol_libraries, get_symbol_info
- Enhanced library path resolution for KiCad 8 and 9

This enables users with locally installed JLCPCB libraries to search and use components directly.

Co-authored-by: l3wi <l3wi@users.noreply.github.com>
2025-12-31 10:57:10 -05:00
jbjardine
834d05130c fix: Replace Windows tasklist with Toolhelp32 API for reliable process detection (#21)
Replaces unreliable tasklist subprocess calls with proper Windows Toolhelp32 API.

- Uses CreateToolhelp32Snapshot/Process32FirstW/Process32NextW for process enumeration
- Adds pointer-size fallback for wintypes.ULONG_PTR missing in KiCad's embedded Python
- Fixes check_kicad_ui intermittent timeouts and false negatives on Windows
- Adds encoding/timeout fixes for 'where' command calls

Fixes #20

Co-authored-by: jbjardine <167578676+jbjardine@users.noreply.github.com>
2025-12-28 11:29:09 -05:00
KiCAD MCP Bot
119f1dfc16 feat: Extend IPC backend with 21 commands and hybrid footprint placement
- Add IPC handlers for zone operations (add_copper_pour, refill_zones)
- Add IPC handlers for board operations (add_board_outline, add_mounting_hole, get_layer_list)
- Add IPC handlers for component operations (rotate_component, get_component_properties)
- Add IPC handlers for net operations (delete_trace, get_nets_list)
- Implement hybrid footprint placement (SWIG library loading + IPC placement)
- Extend create_schematic to handle filename, title, projectName params
- Update documentation for IPC backend status and known issues

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 08:48:37 -05:00
fariouche
1e557d5d84 fixed create_schematics timeout 2025-12-02 21:26:13 +01:00
fariouche
c91cd45006 fixed interface parameter name projectName 2025-12-02 21:25:45 +01:00
KiCAD MCP Bot
319473b1d8 feat: Implement IPC backend for real-time UI synchronization
Add KiCAD IPC API backend using kicad-python library for real-time
communication with KiCAD 9.0+. Changes now appear instantly in KiCAD
UI without manual reload.

Key changes:
- Implement IPCBackend and IPCBoardAPI classes for IPC communication
- Auto-detect IPC availability and fall back to SWIG when unavailable
- Route existing commands (route_trace, add_via, place_component, etc.)
  through IPC automatically when available
- Add transaction support for proper undo/redo
- Add socket path auto-detection for Linux (/tmp/kicad/api.sock)

New commands:
- get_backend_info: Check which backend is active

Supported IPC operations:
- Board: set_size, get_board_info, save
- Routing: route_trace, add_via, add_net
- Components: place, move, delete, list
- Text: add_text, add_board_text

SWIG backend is now deprecated and will be removed when KiCAD 10.0
drops SWIG support.

Requires: kicad-python>=0.5.0, KiCAD 9.0+ with IPC enabled

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 14:33:27 -05:00
KiCAD MCP Bot
dd12d21f46 feat: Enhance schematic functionality with pin-to-pin connections and netlist generation
Major improvements to schematic editing capabilities:

## Python Implementation (connection_schematic.py)
- Implemented pin-to-pin connection logic using kicad-skip
- Added get_pin_location() to find absolute pin positions
- Implemented add_connection() for wire connections between component pins
- Added add_net_label() for creating net labels
- Added connect_to_net() to connect pins to named nets
- Implemented get_net_connections() to query net connectivity
- Added generate_netlist() for schematic netlist extraction

## MCP Handlers (kicad_interface.py)
- Added 5 new command handlers:
  - add_schematic_connection - Pin-to-pin wiring
  - add_schematic_net_label - Net label placement
  - connect_to_net - Connect pin to named net
  - get_net_connections - Query net connectivity
  - generate_netlist - Export netlist data

## TypeScript Tools (schematic.ts)
- Added 5 new MCP tools with proper schemas and validation
- Enhanced user feedback with descriptive messages
- Total schematic tools increased from 3 to 8

## Features
- Pin location calculation with symbol rotation support
- Automatic wire stub creation for net labels
- Comprehensive netlist generation with component and net info
- Full logging for debugging connection issues

This resolves the schematic editing limitations and enables users to:
- Wire component pins together directly
- Use net labels for cleaner schematics
- Query schematic connectivity
- Generate netlists for manufacturing

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 10:29:02 -05:00
ByteBard
bb1c7a0883 Fix BOM export for KiCAD 9.0 - GetFootprintName() API change
Replace FOOTPRINT.GetFootprintName() with str(GetFPID()) for KiCAD 9.0 compatibility.

Issue:
- KiCAD 9.0 removed FOOTPRINT.GetFootprintName() method
- BOM export was failing with AttributeError

Fix:
- Changed: module.GetFootprintName() → str(module.GetFPID())
- GetFPID() returns the footprint library ID (LIB_ID object)
- Converting to string gives "Library:Footprint" format

Testing:
- Endpoint test: export_bom  PASS
- Generates CSV BOM with all 415 components
- Footprint names correctly formatted (e.g., "Capacitor_SMD:C_0603_1608Metric")

Related KiCAD 9.0 fixes in this repo:
- design_rules.py: SetCurrent* → SetCustom* API
- export.py: EXCELLON_WRITER → kicad-cli for drill files
- view.py: PlotLayer() signature update
- component.py: FP_VIRTUAL → FP_BOARD_ONLY

Status: All export operations working 

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 16:44:00 -05:00
ByteBard
bc7de47053 Fix Gerber drill file export for KiCAD 9.0
Replace EXCELLON_WRITER.SetOptions() Python API with kicad-cli subprocess for reliable drill file generation across KiCAD versions.

Issue:
- KiCAD 9.0 changed EXCELLON_WRITER.SetOptions() signature
- Added 3 required parameters: aMinimalHeader, aOffset, aMerge_PTH_NPTH
- API signature unstable across versions

Fix:
- Replace Python API with kicad-cli subprocess approach
- Use 'kicad-cli pcb export drill' command
- More stable and version-independent
- Generates separate PTH/NPTH drill files correctly

Command used:
```
kicad-cli pcb export drill \
  --output <dir> \
  --format excellon \
  --drill-origin absolute \
  --excellon-separate-th \
  <board_file>
```

Testing:
- Integration test: 12/12 tests passed (100% success)
- Generates PTH.drl and NPTH.drl files correctly
- Works with KiCAD 9.0.6 on Windows

Related to earlier fixes:
- design_rules.py: SetCurrent* → SetCustom* API migration
- view.py: PlotLayer() signature update
- component.py: FP_VIRTUAL → FP_BOARD_ONLY

Status: All KiCAD 9.0 API changes resolved 

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 16:12:22 -05:00
ByteBard
afcfe842cf Fix KiCAD 9.0 API compatibility for board, export, and view commands
This commit resolves critical KiCAD 9.0 API compatibility issues identified
through comprehensive testing and code audit.

## Major Fixes

### board/size.py - Board Outline Creation
- **Issue:** Stub implementation didn't create actual board edges
- **Fix:** Delegate to BoardOutlineCommands for proper Edge.Cuts geometry creation
- **Impact:** set_board_size() now creates actual rectangular board outlines
- **Tested:** 100x80mm and 4x3 inch board creation validated

### board/view.py - Board Extents Query
- **Issue:** get_board_extents() command not implemented
- **Fix:** New implementation returns complete bounding box data
- **Returns:** left, top, right, bottom, width, height, center coordinates
- **Tested:** Successfully returns 93.55mm × 212.05mm for test board

### board/__init__.py - Delegation Wiring
- **Fix:** Added get_board_extents() delegation to BoardViewCommands
- **Impact:** Completes board query API surface

### export.py - 3D Model Export
- **Issue:** Get3DViewer() doesn't work in headless KiCAD 9.0
- **Fix:** Replace with kicad-cli subprocess calls for STEP/VRML export
- **New:** _find_kicad_cli() helper for cross-platform CLI detection
- **Features:**
  - STEP export with component/copper/silkscreen/soldermask options
  - VRML export with configurable units
  - 5-minute timeout for large boards
  - Proper error handling and validation
- **Tested:**
  - STEP export: 144.65 MB (full), 114.61 MB (board-only)
  - VRML export: 60.69 MB
  - All exports successful on 415-component board

## Test Results

All changes validated with test_kicad_9_fixes.py:
-  Board outline creation (mm and inch units)
-  Board extents query
-  STEP 3D export (full and board-only)
-  VRML 3D export
-  Error handling and validation

## Compatibility

- **KiCAD Version:** 9.0.6 (tested)
- **Backward Compatible:** Yes (kicad-cli available in KiCAD 8.0+)
- **Platform:** Windows, macOS, Linux

## Breaking Changes

None - all changes are additions or fixes to broken functionality.

## Related

- Complements previous fixes: design_rules.py, component.py, layers.py
- Part of comprehensive KiCAD 9.0 compatibility effort
- Documentation: PYTHON_AUDIT_REPORT_FINAL.md, TEST_RESULTS.md

Fixes #<issue-number-if-applicable>
2025-11-17 15:40:20 -05:00
ByteBard
8c04038371 various fixes for kicad 9 2025-11-14 16:38:16 -05:00
KiCAD MCP Bot
d23e90b847 feat: Implement comprehensive MCP capabilities with tool schemas and resources
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>
2025-11-05 21:50:33 -05:00
KiCAD MCP Bot
1ca3e1b5db feat: Add JSON-RPC 2.0 MCP protocol support for Claude Desktop
This commit fixes Windows Claude Desktop compatibility by implementing
proper MCP JSON-RPC 2.0 protocol handling in the Python interface.

Changes:
- Added JSON-RPC 2.0 message detection and handling
- Implemented MCP protocol methods: initialize, tools/list, tools/call
- Maintained backwards compatibility with legacy custom format
- Removed accidentally included typescript-sdk directory

Fixes #5 - Claude Desktop not working on Windows

Credit to @spplecxer for identifying the issue and providing the fix.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-05 21:27:41 -05:00
KiCAD MCP Bot
5717a91a59 Add comprehensive Windows support and documentation
Windows Support Package:
- PowerShell automated setup script (setup-windows.ps1)
  - Auto-detects KiCAD installation and version
  - Validates all prerequisites (Node.js, Python, pcbnew)
  - Installs dependencies automatically
  - Generates MCP configuration with platform-specific paths
  - Runs comprehensive diagnostic tests
- Windows troubleshooting guide (docs/WINDOWS_TROUBLESHOOTING.md)
- Platform comparison guide (docs/PLATFORM_GUIDE.md)

Code Enhancements:
- Enhanced Windows error diagnostics in Python interface
- Startup validation in TypeScript server
- Platform-specific error messages with troubleshooting hints
- Component library integration (153 KiCAD footprint libraries)
- Routing operations KiCAD 9.0 API compatibility fixes

Documentation Updates:
- Updated README with Windows automated setup
- Real-time collaboration workflow guide
- Library integration documentation
- JLCPCB integration planning
- Updated status to reflect Windows support
- Changelogs for Nov 1 and Nov 5 updates

Infrastructure:
- Added venv/ to .gitignore to prevent virtual env commits

Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-05 09:10:45 -05:00
KiCAD MCP Bot
89247fffe0 Update repository with project files and documentation
- Added comprehensive documentation (BUILD_AND_TEST, CLIENT_CONFIG, KNOWN_ISSUES, ROADMAP, etc.)
- Updated core functionality for board outline, size, and utilities
- Added new tools for project, routing, schematic, and UI management
- Included TypeScript SDK with full MCP implementation
- Updated configuration examples for all platforms
- Added changelog and status tracking
- Improved Python utilities with KiCAD process management
- Enhanced resource helpers and server capabilities

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-01 19:30:39 -04:00
KiCAD MCP Bot
e4c7119c51 feat: Week 1 complete - Linux support + IPC API prep
🎉 Major v2.0 rebuild kickoff - Week 1 accomplished!

## Highlights

### Cross-Platform Support 🌍
-  Linux primary platform (Ubuntu/Debian tested)
-  Windows fully supported
-  macOS experimental support
-  Platform-agnostic path handling (XDG spec)
-  Auto-detection of KiCAD installation

### Infrastructure 🏗️
-  GitHub Actions CI/CD pipeline
-  Pytest framework with 20+ tests
-  Pre-commit hooks (Black, MyPy, ESLint)
-  Automated Linux installation script
-  Enhanced npm scripts

### IPC API Migration Prep 🚀
-  Comprehensive migration plan (30 pages)
-  Backend abstraction layer (800+ lines)
-  Factory pattern with auto-detection
-  SWIG backward compatibility wrapper
-  IPC backend skeleton ready

### Documentation 📚
-  Updated README (Linux installation)
-  CONTRIBUTING.md guide
-  Linux compatibility audit
-  IPC API migration plan
-  Session summaries
-  Platform-specific config templates

## Files Changed

- 27 files created
- ~3,000 lines of code/docs
- 8 comprehensive documentation pages
- 20+ unit tests
- 5 abstraction layer modules

## Next Steps

- Week 2: IPC API migration (project.py → component.py → routing.py)
- Migrate from deprecated SWIG to official IPC API
- JLCPCB/Digikey integration prep

🤖 Generated with Claude Code
https://claude.com/claude-code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-25 20:48:00 -04:00