JLCPCB MCP Server
Downloads a part's EasyEDA symbol, footprint, and 3D model (via LCSC/JLCPCB) into a user-specified output directory so the component can be imported into a PCB design project.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
JLCPCB MCP Server
An MCP (Model Context Protocol) server for searching and retrieving JLCPCB assembly-library components (LCSC parts) — backed by the official JLCPCB API, with a local SQLite layer used purely as a short-lived cache.
Designed to complement AI-assisted PCB design workflows, particularly alongside KiCAD-MCP-Server.
Features
Parametric search for resistors, capacitors, and inductors (value, package, tolerance, voltage, power rating, etc.)
Free-text search across the JLCPCB assembly library (Basic + Extended)
API-first — the local SQLite database is treated as a 6h / 24h cache, not as a source of truth (see Cache model)
Auto-refresh — membership and stock/price data are refreshed transparently before each search
Alternative suggestions ranked by library type (Basic first), price, and stock
KiCAD component download — fetch EasyEDA symbols, footprints, and 3D models directly from LCSC
Related MCP server: zotero-mcp
Requirements
Python 3.11+
uv package manager
JLCPCB API credentials (
JLCPCB_APP_ID,JLCPCB_API_KEY,JLCPCB_API_SECRET)
Getting API credentials
Register at the JLCPCB Developer Portal to obtain your credentials.
Installation
git clone https://github.com/mageoch/JLCPCB-MCP-Server.git
cd JLCPCB-MCP-Server
uv syncConfiguration
Environment variables
Variable | Required | Description |
| Yes | Your JLCPCB application ID |
| Yes | Your JLCPCB API key |
| Yes | Your JLCPCB API secret |
| No | Custom SQLite DB path (default: |
| No | Per-row stock/price TTL in hours (default: |
| No | Library-membership TTL in hours (default: |
Claude Code
Add to your project's .mcp.json or ~/.claude.json:
{
"mcpServers": {
"jlcpcb": {
"command": "uv",
"args": [
"run",
"--project", "/path/to/JLCPCB-MCP-Server",
"jlcpcb-mcp"
],
"env": {
"JLCPCB_APP_ID": "your_app_id",
"JLCPCB_API_KEY": "your_api_key",
"JLCPCB_API_SECRET": "your_api_secret"
}
}
}
}Claude Desktop
Edit ~/.config/Claude/claude_desktop_config.json (Linux/macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows) — use the same format as above.
Usage
First run
No manual setup required. The first search will trigger an automatic membership refresh of the JLCPCB assembly library (Basic + Extended — typically tens of thousands of parts; takes a couple of minutes). Subsequent searches reuse the cached membership for JLCPCB_MEMBERSHIP_TTL_HOURS (24h by default) and refresh per-row stock/price for the returned rows when they're older than JLCPCB_CACHE_TTL_HOURS (6h by default).
To force a full re-fetch (e.g. to refresh stock/price for the whole library at once), call download_library explicitly.
Tools
Tool | Description |
| Force-refresh the entire JLCPCB assembly library (Basic + Extended) |
| Free-text and category search; auto-refreshes the cache |
| Parametric search (value, tolerance, power, package) |
| Parametric search (value, voltage, dielectric, package) |
| Parametric search (value, current rating, package) |
| Full details for a part by LCSC code; refreshes if older than |
| Download EasyEDA symbol, footprint, and 3D model for a part |
| Find cheaper or better-stocked alternatives |
| Database statistics (parts count, stock, DB size, membership age) |
| Re-extract parametric specs (run after a DB upgrade) |
Example queries
# Find a Basic 10kΩ 0402 resistor
search_resistors(value="10k", package="0402", library_type="Basic")
# Find 100nF X7R capacitors rated 50V or more
search_capacitors(value="100nF", dielectric="X7R", voltage_min_v=50)
# Look up a specific part
get_part("C25804")
# Find cheaper alternatives
suggest_alternatives("C25804")
# Download KiCAD files for a component
download_kicad_component("C25804", output="/path/to/project/libs/EasyEDA")Architecture
jlcpcb_mcp/
├── server.py # FastMCP server — tool definitions and entry point
├── client.py # JLCPCB API client (HMAC-SHA256 authentication)
└── db.py # SQLite manager — import, FTS5, parametric spec extractionUses FastMCP for the MCP protocol layer
Local SQLite with full-text search (FTS5) and a
component_specstable for numeric range queriesSI prefix parsing for all passive values (Ω, kΩ, MΩ, nF, µF, µH, mH, etc.)
Cache model
The server treats the local SQLite database as a short-lived cache layered on top of the JLCPCB API, not as a source of truth:
Membership cache (
JLCPCB_MEMBERSHIP_TTL_HOURS, 24h default) — tracked viabasic_library_refreshed_at. When stale, the server paginatesgetComponentLibraryList, diffs the returned codes against the local DB, fetches full details for new codes viagetComponentDetailByCode(batched up to 1000 per call), and deletes codes that are no longer part of the library.Per-row detail cache (
JLCPCB_CACHE_TTL_HOURS, 6h default) — tracked vialast_updatedon each row. After a search returns results, the rows whose timestamp is older than the TTL are refetched in a single batched API call before being returned to the caller — so the displayed stock and prices are at most a few seconds old in practice.
This means searches can occasionally block on a membership refresh (~30s for stub pagination + a few seconds per 1000 new codes), but day-to-day calls only pay for the small detail refresh of rows actually returned.
The JLCPCB API does not expose a delta or "modified-since" filter, so the membership pagination is necessarily full — but the componentLibraryInfoVOS payload is small (3 fields per stub) and the detail enrichment is restricted to codes the server doesn't already have, which makes the typical 24h refresh much cheaper than a full re-fetch.
License
MIT — Copyright (c) 2026 mageo services Ltd. See LICENSE.
Created and maintained by @mageo.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Find electronic parts with live Mouser, DigiKey and JLCPCB stock and prices, check BOMs, order.
Search real parts with datasheet-provenance specs, check compatibility and compose priced BOMs.
Verified KiCad footprints, symbols & 3D models for AI agents. No signup, CC-BY-4.0, quality-gated.
Electronic component sourcing, BOM management, and PCB design workflows.
Related MCP Servers
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to search a Zotero library, retrieve item metadata, and access full-text PDF contents through MCP tools.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to search a personal reference library, retrieve complete item metadata, and read the full text of attached PDFs through MCP tools.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to search a Zotero library, retrieve item metadata, and access full-text PDF contents through MCP tools.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to search a Zotero library, retrieve complete item metadata, and access full-text content such as PDFs through MCP tools.-