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>
This commit is contained in:
KiCAD MCP Bot
2026-02-26 10:11:55 -05:00
parent b4d114ac74
commit e4fa774eda
4 changed files with 110 additions and 36 deletions

View File

@@ -11,7 +11,7 @@ The [Model Context Protocol](https://modelcontextprotocol.io/) is an open standa
- 64 fully-documented tools with JSON Schema validation
- Smart tool discovery with router pattern (reduces AI context by 70%)
- 8 dynamic resources exposing project state
- JLCPCB parts integration with 100k+ component catalog and local library search
- JLCPCB parts integration with 2.5M+ component catalog and local library search
- Full MCP 2025-06-18 protocol compliance
- Cross-platform support (Linux, Windows, macOS)
- Real-time KiCAD UI integration via IPC API (experimental)
@@ -129,7 +129,7 @@ Complete integration with JLCPCB's parts catalog, providing two complementary ap
**Dual-Mode Architecture:**
1. **Local Symbol Libraries** - Search JLCPCB libraries installed via KiCAD Plugin and Content Manager (contributed by [@l3wi](https://github.com/l3wi))
2. **JLCPCB API Integration** - Access the complete 100k+ parts catalog with real-time pricing and stock data
2. **JLCPCB API Integration** - Access the complete 2.5M+ parts catalog with real-time pricing and stock data
**Key Features:**
- Real-time pricing with quantity breaks (1+, 10+, 100+, 1000+)
@@ -457,7 +457,22 @@ Claude Code automatically detects MCP servers in the current directory. No addit
The JLCPCB integration provides two modes that can be used independently or together:
**Mode 1: Local Symbol Libraries (No Setup Required)**
**Mode 1: JLCSearch Public API (Recommended - No Setup Required)**
The easiest way to access JLCPCB's parts catalog:
- No API credentials needed
- No JLCPCB account required
- Access to 2.5M+ parts with pricing and stock data
- Download time: 40-60 minutes for full catalog (100-part batches due to API limit)
To download the database:
```
Ask Claude: "Download the JLCPCB parts database"
```
This creates a local SQLite database at `data/jlcpcb_parts.db` (~1-2 GB for full catalog).
**Mode 2: Local Symbol Libraries (No Setup Required)**
Install JLCPCB libraries via KiCAD's Plugin and Content Manager:
1. Open KiCAD
@@ -466,14 +481,15 @@ Install JLCPCB libraries via KiCAD's Plugin and Content Manager:
4. Install libraries like `JLCPCB-KiCAD-Library` or `EDA_MCP`
5. Use `search_symbols` to find components with pre-configured footprints and LCSC IDs
**Mode 2: JLCPCB API (Complete Catalog Access)**
**Mode 3: Official JLCPCB API (Advanced - Requires Enterprise Account)**
For access to the full 100k+ parts catalog with pricing:
For users with JLCPCB enterprise accounts and order history:
1. **Get API Credentials**
- Log in to [JLCPCB](https://jlcpcb.com/)
- Navigate to Account > API Management
- Navigate to Account > API Management (requires enterprise approval)
- Create API Key and save your `appKey` and `appSecret`
- Note: This requires prior order history and enterprise account approval
2. **Configure Environment Variables**
@@ -489,12 +505,6 @@ For access to the full 100k+ parts catalog with pricing:
JLCPCB_API_SECRET=your_app_secret_here
```
3. **Download Parts Database (One-time setup, takes 5-10 minutes)**
```
Ask Claude: "Download the JLCPCB parts database"
```
This creates a local SQLite database at `data/jlcpcb_parts.db` with ~100k parts.
See [JLCPCB Usage Guide](docs/JLCPCB_USAGE_GUIDE.md) for detailed documentation.
## Usage Examples