Promotes BOM / sourcing fields (MPN, Manufacturer, DigiKey_PN, LCSC,
JLCPCB_PN, Voltage, Tolerance, Dielectric, ...) to first-class citizens
on placed schematic symbols.
New MCP tools:
- set_schematic_component_property: add or update one custom property
on a component (convenience wrapper around edit_schematic_component).
- remove_schematic_component_property: delete one custom property.
The four built-in fields (Reference, Value, Footprint, Datasheet) are
protected and rejected.
edit_schematic_component enhancements:
- New `properties` parameter: map of property name to either a string
value or a full spec object { value, x?, y?, angle?, hide?, fontSize? }.
Adds the property when missing, otherwise updates the existing field
(and optionally its label position / visibility). Lets a single tool
call attach an entire BOM payload to a component.
- New `removeProperties` parameter: list of custom property names to
delete in the same call.
- Property values are now backslash-escaped so descriptions containing
a double-quote or a backslash no longer corrupt the .kicad_sch file.
- New properties default to (hide yes) so they appear in BOM exports
without cluttering the schematic canvas.
get_schematic_component description clarified to highlight that it
already returns every field on the symbol, including custom ones.
New MCP prompt component_sourcing_properties guides agents through the
conventional property names recognised by downstream BOM tooling and
the recommended call sequence.
Implementation (python/kicad_interface.py):
- _PROTECTED_PROPERTY_FIELDS frozenset
- _escape_sexpr_string / _find_matching_paren static helpers
- _set_property_in_block / _set_hide_on_property /
_remove_property_from_block surgical text-level edits that preserve
formatting and the property's UUID
- _handle_edit_schematic_component rewritten to orchestrate
add/update/remove and return a per-property summary
- New handlers _handle_set_schematic_component_property and
_handle_remove_schematic_component_property registered in the
command dispatch table
Tests (tests/test_schematic_component_properties.py):
32 tests covering escape helper, paren matcher, add/update/remove
(single + batched), full spec dicts, default position, default
(hide yes), special-character escaping, UUID preservation, protected
built-in field rejection, no-op removal, both new convenience tools,
and input validation. All 590 tests in the project still pass.
Docs: README, SCHEMATIC_TOOLS_REFERENCE, TOOL_INVENTORY, CHANGELOG.
Adds two new MCP tools for working with free-form text annotations
(SCH_TEXT elements) in KiCad schematics:
- add_schematic_text: place a text note with optional angle, font size,
bold/italic, and justification
- list_schematic_texts: list all text annotations with optional
case-insensitive substring filter
Includes WireManager.add_text / list_texts using _text_insert + sexpdata,
handler dispatch in KiCADInterface, TypeScript tool definitions, registry
entry, reference doc updates, and 30 unit tests.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
KiCad ships Python 3.9 on macOS (both v9 and v10), and `pcbnew.so` is
compiled against that interpreter. The previous `>=3.10` floor was
unreachable on macOS and docs referenced nonexistent
`python3.11/site-packages` paths. Lower the floor and correct the docs;
no source changes needed — all 49 files in `python/` already compile
clean on 3.9.
Also add `.venv/` to `.gitignore` (dotted form used by `python -m venv`).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
export_netlist was returning "Unknown command" because no Python handler
existed. generate_netlist was timing out (30s) due to an O(nets × components
× pins) wire-graph algorithm with a new PinLocator instantiated per net.
Both handlers now delegate to `kicad-cli sch export netlist`:
- export_netlist: new handler; writes KiCad XML / Spice / Cadstar / OrcadPCB2
to the caller-supplied outputPath. Added schematicPath parameter to the TS
tool definition (was absent, making file export impossible).
- generate_netlist: replaces the slow wire-graph with kicad-cli + XML parse;
returns the same {components, nets} JSON the TS handler already expected.
Also adds _find_kicad_cli_static() so both handlers share CLI discovery
without depending on ExportCommands (which requires a loaded pcbnew board).
Cleaned up generate_netlist schema in tool_schemas.py (removed outputPath and
format fields the handler never used), updated MCP tool descriptions and
SCHEMATIC_TOOLS_REFERENCE.md to clearly distinguish the two tools.
26 unit tests added covering parameter validation, subprocess mocking,
format mapping, XML→JSON parsing, and error/timeout propagation.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Four tools added in this branch had no docs coverage. Add entries to
SCHEMATIC_TOOLS_REFERENCE.md with parameter tables, response field
tables, and usage notes. Update section tool counts (Net Analysis 4→5,
Validation 3→6).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- add_schematic_net_label: document new optional componentRef/pinNumber
snap-to-pin mode, labelType/orientation params, response fields
(actual_position, snapped_to_pin), and updated position to optional
- connect_to_net: document new response fields (pin_location,
label_location, wire_stub)
- get_schematic_pin_locations: update cross-reference to reflect that
direct pin snapping is now available in add_schematic_net_label
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fix incorrect default Claude Desktop config path — macOS uses
~/Library/Application Support/Claude/claude_desktop_config.json,
not ~/.config/Claude/claude_desktop_config.json.
Capture stderr in merge_config subshell (2>&1) so Python tracebacks
and interpreter errors are surfaced instead of silently dropped when
the command substitution fails under set -e.
Update README.md and docs/PLATFORM_GUIDE.md to reflect the corrected
macOS config path, and split the combined Linux/macOS config location
reference into separate per-platform entries.
Add trailing newline at the end.
Add setup-macos.sh, a shell script that automates Claude Desktop MCP
configuration on macOS. The script detects KiCad's bundled Python,
resolves PYTHONPATH, generates the correct MCP server config, and
safely merges it into the existing Claude Desktop configuration with
backup support. Supports --verify, --dry-run, and --apply modes.
Update README.md with documentation for the automated setup workflow,
including usage examples, parameter reference, and post-setup steps.
Extend docs/PLATFORM_GUIDE.md with macOS-specific sections covering
installation, path handling, Python environment, troubleshooting,
best practices, cross-platform migration, and support resources.
Update docs/STATUS_SUMMARY.md to reflect the new macOS automation
capabilities and bump the last-updated date.
Add Prettier as a dev dependency with .prettierrc.json config and
.prettierignore. Hook added via mirrors-prettier in pre-commit config.
All TypeScript, JSON, Markdown, and YAML files auto-formatted.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add .pre-commit-config.yaml with pre-commit-hooks v5.0.0 (trailing
whitespace, end-of-file fixer, yaml/json checks, large file guard,
merge conflict detection). Add minimal pyproject.toml. Auto-fix
trailing whitespace and missing end-of-file newlines across the
codebase.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add macOS venv setup using KiCAD's bundled Python (fixes#45)
- Update JLCPCB database size from 1-2 GB to 3-5 GB (accurate for 2.5M+ parts)
- Update all "100k+" references to "2.5M+" for consistency
- Update jlcpcb-api.ts tool description (JLCSearch API, no auth required)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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>
Updated DYNAMIC_LOADING_STATUS.md to reflect:
✅ Phase C (MCP Integration) - COMPLETE
- Full MCP interface integration done
- Save → inject → reload → clone orchestration working
- Smart detection and automatic fallback
- 100% test pass rate (5/5 components)
Added comprehensive integration test results section showing:
- Test matrix with 5 components
- 3 successful dynamic loads (Battery, Fuse, Transformer)
- Zero configuration required for users
- Access to ~10,000 KiCad symbols now available
Status: PRODUCTION READY! 🚀
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Properly credits @l3wi for the local symbol library search implementation
from PR #25, which provides the foundation for our dual-mode JLCPCB integration.
Co-Authored-By: l3wi <l3wi@users.noreply.github.com>
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>
Adds macOS-specific detection for KiCad's bundled Python, eliminating manual
PYTHONPATH configuration for macOS users.
Changes:
- Detects KiCad bundled Python at standard macOS install path (Python 3.9-3.12)
- Makes KICAD_PYTHON environment variable cross-platform (not just Windows)
- Adds logging for Python detection to aid debugging
- Updates documentation with simplified macOS setup (no PYTHONPATH needed)
Fixes server startup on macOS where existsSync('python3') was failing validation
because it doesn't check PATH.
Based on PR #18 by @hexatriene - applied manually due to merge conflict with
router implementation. Full credit to hexatriene for the solution design and
implementation.
Co-authored-by: hexatriene <106840313+hexatriene@users.noreply.github.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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>
- 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>