@jlcpcb/mcp 0.2.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +57 -0
- package/README.md +19 -29
- package/dist/index.js +865 -960
- package/package.json +2 -1
- package/src/index.ts +5 -1
- package/src/schemas.ts +14 -0
- package/src/services.ts +34 -0
- package/src/tools/batch.ts +123 -0
- package/src/tools/index.test.ts +13 -0
- package/src/tools/index.ts +36 -63
- package/src/tools/library-fix.ts +1 -18
- package/src/tools/library-update.ts +8 -27
- package/src/tools/library.ts +108 -149
- package/src/tools/search.ts +68 -10
- package/src/tools/details.ts +0 -66
- package/src/tools/easyeda.ts +0 -582
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,62 @@
|
|
|
1
1
|
# @jlcpcb/mcp
|
|
2
2
|
|
|
3
|
+
## 0.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d5a74c2: Fix EasyEDA 3D model transform import so KiCad footprints preserve model offsets and rotations.
|
|
8
|
+
|
|
9
|
+
Improve CLI table formatting so search and library rows keep aligned columns, including with wide characters.
|
|
10
|
+
|
|
11
|
+
Add workspace lint scripts and ESLint configuration so `bun run lint` works across packages.
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [d5a74c2]
|
|
14
|
+
- @jlcpcb/core@0.3.1
|
|
15
|
+
|
|
16
|
+
## 0.3.0
|
|
17
|
+
|
|
18
|
+
### Minor Changes
|
|
19
|
+
|
|
20
|
+
- 0.3.0
|
|
21
|
+
|
|
22
|
+
Minor Changes
|
|
23
|
+
|
|
24
|
+
CLI:
|
|
25
|
+
- Add component delete functionality with D shortcut in component view
|
|
26
|
+
- Add O shortcut to open datasheet (replaces D)
|
|
27
|
+
- Add library regenerate command to regenerate all installed components
|
|
28
|
+
- Add validation suite for footprint/symbol comparison (jlc validate)
|
|
29
|
+
- Enable 3D models by default during installation
|
|
30
|
+
- Remove non-functional S/F/M shortcuts from component view
|
|
31
|
+
|
|
32
|
+
Core:
|
|
33
|
+
- Add symbol text parsing and rendering for connector components
|
|
34
|
+
- Add arc interpolation for SOLIDREGION polygon paths (improves complex footprint accuracy)
|
|
35
|
+
- Add remove() method to library service for deleting components
|
|
36
|
+
|
|
37
|
+
Patch Changes
|
|
38
|
+
|
|
39
|
+
Core:
|
|
40
|
+
- Strip temperature prefix from component descriptions
|
|
41
|
+
- Improve hole detection and polygon pad handling in footprint converter
|
|
42
|
+
|
|
43
|
+
CLI:
|
|
44
|
+
- Fix async handling in renderApp exit
|
|
45
|
+
- Simplify loading indicators
|
|
46
|
+
|
|
47
|
+
MCP:
|
|
48
|
+
- Fix typecheck errors in batch and library tools
|
|
49
|
+
- Correct validationData property paths
|
|
50
|
+
- Fix InstalledComponent property access
|
|
51
|
+
|
|
52
|
+
Validator:
|
|
53
|
+
- Align SVG reference extraction with KiCad converter
|
|
54
|
+
|
|
55
|
+
### Patch Changes
|
|
56
|
+
|
|
57
|
+
- Updated dependencies []:
|
|
58
|
+
- @jlcpcb/core@0.3.0
|
|
59
|
+
|
|
3
60
|
## 0.2.0
|
|
4
61
|
|
|
5
62
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -76,27 +76,17 @@ bun run build
|
|
|
76
76
|
|
|
77
77
|
| Tool | Description | Key Parameters |
|
|
78
78
|
|------|-------------|----------------|
|
|
79
|
-
| `component_search` | Search JLCPCB parts
|
|
80
|
-
| `component_get` | Get detailed component info by LCSC ID | `lcsc_id` (e.g., "C2040") |
|
|
79
|
+
| `component_search` | Search JLCPCB parts or EasyEDA community | `query`, `source`, `in_stock`, `basic_only`, `limit` |
|
|
81
80
|
|
|
82
81
|
### Library Management
|
|
83
82
|
|
|
84
83
|
| Tool | Description | Key Parameters |
|
|
85
84
|
|------|-------------|----------------|
|
|
86
|
-
| `
|
|
87
|
-
| `
|
|
88
|
-
| `
|
|
89
|
-
| `
|
|
90
|
-
| `
|
|
91
|
-
|
|
92
|
-
### EasyEDA Community Library
|
|
93
|
-
|
|
94
|
-
| Tool | Description | Key Parameters |
|
|
95
|
-
|------|-------------|----------------|
|
|
96
|
-
| `easyeda_search` | Search community-contributed components | `query`, `source`, `open_preview` |
|
|
97
|
-
| `easyeda_get` | Get community component details | `uuid` |
|
|
98
|
-
| `easyeda_fetch` | Fetch community component to project | `uuid`, `project_path`, `include_3d` |
|
|
99
|
-
| `easyeda_get_3d_model` | Download community 3D model | `uuid`, `format` |
|
|
85
|
+
| `library_install` | Install component to KiCad library | `id`, `project_path`?, `include_3d`?, `force`? |
|
|
86
|
+
| `library_batch_install` | Install up to 10 components at once | `ids`, `include_3d`?, `force`? |
|
|
87
|
+
| `library_get_component` | Get installed component metadata | `id` (LCSC ID) |
|
|
88
|
+
| `library_update` | Regenerate all components with latest data | `project_path`?, `dry_run`? |
|
|
89
|
+
| `library_fix` | Apply pin corrections to a component | `id`, `corrections` |
|
|
100
90
|
|
|
101
91
|
## Usage Examples
|
|
102
92
|
|
|
@@ -108,40 +98,40 @@ component_search(query="STM32F103", in_stock=true, basic_only=true)
|
|
|
108
98
|
|
|
109
99
|
Returns matching components with LCSC IDs, stock levels, and pricing.
|
|
110
100
|
|
|
111
|
-
###
|
|
101
|
+
### Install a component
|
|
112
102
|
|
|
113
103
|
```
|
|
114
|
-
|
|
104
|
+
library_install(id="C8734")
|
|
115
105
|
```
|
|
116
106
|
|
|
117
107
|
Downloads the component and returns:
|
|
118
108
|
- `symbol_ref`: Reference for schematic (e.g., `JLC-MCP-ICs:STM32F103C8T6`)
|
|
119
109
|
- `footprint_ref`: Reference for PCB (e.g., `Package_QFP:LQFP-48_7x7mm_P0.5mm`)
|
|
120
110
|
|
|
121
|
-
###
|
|
111
|
+
### Install to project-local library
|
|
122
112
|
|
|
123
113
|
```
|
|
124
|
-
|
|
114
|
+
library_install(id="C8734", project_path="/path/to/kicad/project", include_3d=true)
|
|
125
115
|
```
|
|
126
116
|
|
|
127
|
-
###
|
|
117
|
+
### Batch install components
|
|
128
118
|
|
|
129
119
|
```
|
|
130
|
-
|
|
120
|
+
library_batch_install(ids=["C2040", "C5446", "C14663"])
|
|
131
121
|
```
|
|
132
122
|
|
|
133
|
-
|
|
134
|
-
- Creates `JLC-MCP-Resistors.kicad_sym`, `JLC-MCP-Capacitors.kicad_sym`, etc.
|
|
135
|
-
- Creates `JLC-MCP.pretty/` footprint directory
|
|
136
|
-
- Creates `JLC-MCP.3dshapes/` 3D model directory
|
|
123
|
+
Install multiple components in parallel (up to 10 at once).
|
|
137
124
|
|
|
138
|
-
###
|
|
125
|
+
### Regenerate libraries
|
|
139
126
|
|
|
140
127
|
```
|
|
141
|
-
|
|
128
|
+
library_update()
|
|
142
129
|
```
|
|
143
130
|
|
|
144
|
-
|
|
131
|
+
Creates the category-based library structure if it doesn't exist:
|
|
132
|
+
- Creates `JLC-MCP-Resistors.kicad_sym`, `JLC-MCP-Capacitors.kicad_sym`, etc.
|
|
133
|
+
- Creates `JLC-MCP.pretty/` footprint directory
|
|
134
|
+
- Creates `JLC-MCP.3dshapes/` 3D model directory
|
|
145
135
|
|
|
146
136
|
## Library Organization
|
|
147
137
|
|