This commit fixes the critical bug where the MCP server fails to start on
Linux with "Python executable not found: python3" even when python3 is
correctly installed and available in PATH.
Root Cause:
- findPythonExecutable() returned 'python3' (command name) on Linux
- validatePrerequisites() used existsSync('python3') which checks current
directory, not PATH
- Validation failed even though spawn() would resolve 'python3' via PATH
Changes Made:
1. Enhanced findPythonExecutable() for Linux (src/server.ts:42-126):
- Added Linux platform detection
- Check KiCad bundled Python paths first (/usr/lib/kicad/bin/python3, etc.)
- Use 'which python3' to resolve system python3 to absolute path
- Fallback to common system paths (/usr/bin/python3, /bin/python3)
- Import execSync for 'which' command execution
2. Improved validatePrerequisites() (src/server.ts:214-266):
- Distinguish between absolute paths and command names
- Use existsSync for absolute paths
- Use --version execution test for command names
- Added Linux-specific error messages and troubleshooting
3. Documentation Updates (README.md:409-444):
- Added "Linux Python Detection" section
- Documented detection priority order
- Added troubleshooting steps for KICAD_PYTHON
- Clarified that no manual config needed for standard installations
Testing:
- Build completed successfully (npm run build)
- Python detection now resolves /usr/bin/python3 on Ubuntu/Debian
- Maintains backward compatibility with Windows/macOS
- KICAD_PYTHON override still works
Fixes#29
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.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 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>
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>
- Added missing schematic tools registration (fixes#12)
- Created library tools TypeScript implementation
- Added 4 library management tools (list_libraries, search_footprints, list_library_footprints, get_footprint_info)
- Now properly exports and registers all 10 tool categories
- Total of 54 TypeScript tools now properly registered
This resolves the issue where schematic and library tools were defined in Python but not visible to MCP clients.
🤖 Generated with 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>