Model Context Protocol server · Rust

JLCPCB & LCSC parts, live in your AI assistant

jlcpcb-mcp lets Claude, Cursor or any MCP client search JLCPCB's assembly catalog in real time: stock, price breaks, Basic / Preferred / Extended class, datasheets, cheaper alternatives and rough PCB estimates. No API key required.

6 read-only toolsstdio transportsingle static binaryMIT licensed
stdio · jlcpcb-mcp 0.1.0
# tools/call search_components
→ {"query": "100nF", "package": "0402", "basic_only": true, "max_results": 3}
← {
  "total_matches": 2,
  "results": [
    {
      "lcsc": "C1525",
      "mfr_part": "CL05B104KO5NNNC",
      "manufacturer": "Samsung Electro-Mechanics",
      "package": "0402",
      "library_type": "basic",
      "jlc_stock": 31343545,
      "unit_price_usd": 0.0031,
      "price_qty": 100
    },
    {
      "lcsc": "C307331",
      "mfr_part": "CL05B104KB54PNC",
      "manufacturer": "Samsung Electro-Mechanics",
      "package": "0402",
      "library_type": "basic",
      "jlc_stock": 20494658,
      "unit_price_usd": 0.0085,
      "price_qty": 100
    }
  ]
}

Six tools

Every output below is real: captured from the live JLCPCB and LCSC endpoints on 11 Nov 2026, 16:50 IST (lists trimmed for space). Stock and prices change continuously.

Search

search_components

Keyword search across the live JLCPCB assembly catalog with category, package, stock and Basic/Preferred filters. Results are ranked Basic → Preferred → Extended, then by stock.

Arguments basic_only category include_preferred max_results min_stock package quantity query

call {"query": "10k", "category": "Resistors", "package": "0402", "max_results": 4}
{
  "filters": {
    "category": "Resistors",
    "library": "any",
    "min_stock": 1,
    "packages": ["0402"],
    "price_qty": 100,
    "query": "10k",
    "subcategory": null
  },
  "total_matches": 192,
  "returned": 4,
  "results": [
    {
      "lcsc": "C25744",
      "mfr_part": "0402WGF1002TCE",
      "manufacturer": "UNI-ROYAL(Uniroyal Elec)",
      "package": "0402",
      "library_type": "basic",
      "jlc_stock": 20655411,
      "unit_price_usd": 0.001,
      "price_qty": 100
    },
    {
      "lcsc": "C60489",
      "mfr_part": "RC0402JR-0710KL",
      "manufacturer": "YAGEO",
      "package": "0402",
      "library_type": "extended",
      "jlc_stock": 21834214,
      "unit_price_usd": 0.0019,
      "price_qty": 100
    },
    {
      "lcsc": "C60490",
      "mfr_part": "RC0402FR-0710KL",
      "manufacturer": "YAGEO",
      "package": "0402",
      "library_type": "extended",
      "jlc_stock": 5740774,
      "unit_price_usd": 0.0016,
      "price_qty": 100
    },
    {
      "lcsc": "C174175",
      "mfr_part": "RCT0210KJLF",
      "manufacturer": "HKR(Hong Kong Resistors)",
      "package": "0402",
      "library_type": "extended",
      "jlc_stock": 4143877,
      "unit_price_usd": 0.0008,
      "price_qty": 100
    }
  ]
}
Details

get_component_details

Everything about one LCSC part: JLCPCB assembly stock and price breaks, LCSC retail stock, library class, parameters, datasheet, MSL and assembly process.

Arguments lcsc quantity

call {"lcsc": "C25744"}
{
  "lcsc": "C25744",
  "mfr_part": "0402WGF1002TCE",
  "manufacturer": "UNI-ROYAL(Uniroyal Elec)",
  "package": "0402",
  "category": "Resistors",
  "subcategory": "Chip Resistor - Surface Mount",
  "library_type": "basic",
  "jlc_assembly_stock": 20655411,
  "lcsc_retail_stock": 0,
  "price_qty": 100,
  "jlc_unit_price_usd": 0.001,
  "assembly_process": "SMT",
  "moisture_sensitivity_level": null,
  "datasheet_url": "https://www.lcsc.com/datasheet/lcsc_datasheet_2411221126_UNI-ROYAL-Uniroyal-Elec-0402WGF1002TCE_C25744.pdf",
  "sources": ["JLCPCB parts detail", "LCSC product detail"],
  "warnings": [],
  "jlc_price_breaks": [
    {"max_qty": 999, "min_qty": 1, "unit_price_usd": 0.001},
    {"max_qty": 2999, "min_qty": 1000, "unit_price_usd": 0.0008},
    {"max_qty": 9999, "min_qty": 3000, "unit_price_usd": 0.0006},
    "…"
  ],
  "attributes": [
    {"name": "Resistance", "value": "10kΩ"},
    {"name": "Operating Temperature", "value": "-55℃~+155℃"},
    {"name": "Power(Watts)", "value": "62.5mW"},
    {"name": "Type", "value": "Thick Film Resistor"},
    "…"
  ]
}
Alternatives

suggest_alternatives

Cheaper, better-stocked or Basic-library substitutes in the same category, package and key value.

Arguments basic_or_preferred_only lcsc max_results min_stock quantity same_package

call {"lcsc": "C25531", "max_results": 3}
{
  "original": {
    "lcsc": "C25531",
    "mfr_part": "0402WGJ0103TCE",
    "manufacturer": "UNI-ROYAL(Uniroyal Elec)",
    "package": "0402",
    "library_type": "extended",
    "jlc_stock": 245040,
    "unit_price_usd": 0.0026,
    "price_qty": 100
  },
  "match_criteria": [
    "same category: Resistors / Chip Resistor - Surface Mount",
    "same package: 0402",
    "same Resistance: 10kΩ",
    "at least the same voltage/power/current rating, no worse tolerance or dielectric (where parseable)"
  ],
  "alternatives": [
    {
      "lcsc": "C25744",
      "mfr_part": "0402WGF1002TCE",
      "manufacturer": "UNI-ROYAL(Uniroyal Elec)",
      "package": "0402",
      "library_type": "basic",
      "jlc_stock": 20655411,
      "unit_price_usd": 0.001,
      "price_qty": 100,
      "reasons": [
        "Basic part (avoids the extended-part setup fee)",
        "61.5% cheaper at qty 100",
        "84.3x the stock (20655411 vs 245040)"
      ]
    },
    {
      "lcsc": "C174175",
      "mfr_part": "RCT0210KJLF",
      "manufacturer": "HKR(Hong Kong Resistors)",
      "package": "0402",
      "library_type": "extended",
      "jlc_stock": 4143877,
      "unit_price_usd": 0.0008,
      "price_qty": 100,
      "reasons": ["69.2% cheaper at qty 100", "16.9x the stock (4143877 vs 245040)"]
    },
    {
      "lcsc": "C173683",
      "mfr_part": "RCT0210KFLF",
      "manufacturer": "HKR(Hong Kong Resistors)",
      "package": "0402",
      "library_type": "extended",
      "jlc_stock": 3578273,
      "unit_price_usd": 0.0009,
      "price_qty": 100,
      "reasons": ["65.4% cheaper at qty 100", "14.6x the stock (3578273 vs 245040)"]
    }
  ]
}
Categories

list_categories

Browse the live JLCPCB category tree with part counts, or find the exact category name to filter on.

Arguments include_subcategories parent search

call {"search": "mosfet"}
{
  "categories": [
    {
      "id": 5,
      "name": "Transistors/Thyristors",
      "part_count": 118749,
      "subcategories": [{"id": 2954, "name": "MOSFETs", "part_count": 76199}],
      "subcategory_count": 11
    },
    {
      "id": 66,
      "name": "Silicon Carbide (SiC) Devices",
      "part_count": 5231,
      "subcategories": [
        {
          "id": 2090,
          "name": "Silicon Carbide Field Effect Transistor (MOSFET)",
          "part_count": 2429
        }
      ],
      "subcategory_count": 3
    }
  ],
  "total_categories": 2
}
PCB estimate

estimate_pcb_quote

Rough bare-PCB cost from size, layers, quantity and finish — an approximate model, clearly labelled as not an official quote.

Arguments height_mm layers quantity surface_finish thickness_mm width_mm

call {"width_mm": 100, "height_mm": 80, "quantity": 10, "layers": 2}
{
  "is_official_quote": false,
  "method": "approximate parametric model (not a JLCPCB quote)",
  "low_usd": 9.75,
  "typical_usd": 13.0,
  "high_usd": 19.5,
  "per_board_typical_usd": 1.3,
  "breakdown": [
    {"item": "engineering/setup (2L)", "usd": 5.0},
    {
      "item": "area cost 80.0 cm² × 10 @ $0.010/cm² × volume factor 1.00",
      "usd": 8.0
    }
  ],
  "official_quote_url": "https://cart.jlcpcb.com/quote"
}
Status

service_status

Uncached reachability and latency checks for the JLCPCB and LCSC endpoints, plus whether the optional official API is configured.

Arguments no arguments

call {}
{
  "version": "0.1.0",
  "jlcpcb_parts_api": {"detail": "reachable (live search probe)", "latency_ms": 345, "ok": true},
  "lcsc_api": {"detail": "reachable", "latency_ms": 145, "ok": true},
  "official_api_configured": false
}

Errors are tool results, not crashes

Bad input and missing parts come back as isError results with an actionable message (live outputs):

{
  "isError": true,
  "message": "part C999999999 was not found at JLCPCB or LCSC"
}
{
  "isError": true,
  "message": "invalid input: category \"mlcc\" is ambiguous (2 matches). Use one of: Multilayer Ceramic Capacitors MLCC - Leaded (in Capacitors); Multilayer Ceramic Capacitors MLCC - SMD/SMT (in Capacitors)"
}

Install

Requires a Rust toolchain (1.89+). Both commands put a jlcpcb-mcp binary in ~/.cargo/bin.

From GitHub once the repo is published

Available as soon as the repository is public at github.com/shubhxho/jlcpcb-mcp.

cargo install --git https://github.com/shubhxho/jlcpcb-mcp

From a local checkout

Works today from the source tree.

cd jlcpcb-mcp
cargo install --path .
jlcpcb-mcp --version   # jlcpcb-mcp 0.1.0

Optional: set JLCPCB_APP_ID, JLCPCB_API_KEY and JLCPCB_API_SECRET to also query JLCPCB's official Open API. JLCPCB_MCP_TIMEOUT_SECS (default 20) and JLCPCB_MCP_LOG (default warn) tune behaviour.

Configure your client

Paste the snippet into the file shown, replace YOUR_USERNAME, then fully restart the app. Claude Desktop does not read your shell PATH, so its configs use an absolute path.

File ~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "jlcpcb": {
      "command": "/Users/YOUR_USERNAME/.cargo/bin/jlcpcb-mcp",
      "args": []
    }
  }
}

Source: examples/claude-desktop/macos.claude_desktop_config.json

File %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "jlcpcb": {
      "command": "C:\\Users\\YOUR_USERNAME\\.cargo\\bin\\jlcpcb-mcp.exe",
      "args": []
    }
  }
}

Source: examples/claude-desktop/windows.claude_desktop_config.json

File ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "jlcpcb": {
      "command": "/home/YOUR_USERNAME/.cargo/bin/jlcpcb-mcp",
      "args": []
    }
  }
}

Source: examples/claude-desktop/linux.claude_desktop_config.json

File <your-project>/.cursor/mcp.json
{
  "mcpServers": {
    "jlcpcb": {
      "command": "jlcpcb-mcp",
      "args": []
    }
  }
}

Source: examples/cursor/project/.cursor/mcp.json

File ~/.cursor/mcp.json
{
  "mcpServers": {
    "jlcpcb": {
      "command": "jlcpcb-mcp",
      "args": []
    }
  }
}

Source: examples/cursor/global/mcp.json

* Anthropic does not ship an official Linux build of Claude Desktop; the path above is the one used by community builds.

One-click install for Cursor

With jlcpcb-mcp on your PATH, open this link to add the server to Cursor:

Add jlcpcb-mcp to Cursor

cursor://anysphere.cursor-deeplink/mcp/install?name=jlcpcb&config=eyJjb21tYW5kIjoiamxjcGNiLW1jcCIsImFyZ3MiOltdfQ%3D%3D

Data sources & limits

Nothing is bundled or scraped into a local database: each call goes to the live endpoints below.

EndpointUsed forAuth
jlcpcb.com … /selectSmtComponentList/v2Search, category tree, alternativesnone
jlcpcb.com … /getComponentDetailAssembly stock, price breaks, attributesnone
wmsc.lcsc.com/ftps/wm/product/detailLCSC retail stock and prices, datasheetnone
open.jlcpcb.com … /getComponentDetailByCodeOfficial API (optional)HMAC-SHA256

Limitations

  • The JLCPCB and LCSC web endpoints are undocumented and can change without notice.
  • estimate_pcb_quote is an approximate parametric model, not a JLCPCB quote. Always confirm at cart.jlcpcb.com/quote.
  • Alternatives are rule-based (category, package, key value); check ratings and tolerances in the datasheet before substituting.
  • Stock and prices are a snapshot at call time.

The full guide, as a PDF

Install, per-OS configs, the complete tool reference with live outputs, data sources and the PCB estimate model.

Download jlcpcb-mcp-guide.pdf