Skip to main content
Glama

SZLCSC MCP

MCP Server for the domestic LCSC (SZLCSC), providing component search, domestic CNY small-batch pricing/stock, parametric selection, alternative part comparison, Datasheet download, EasyEDA EDA assets, Altium SchLib/PcbLib/STEP conversion, and long-term library management.

Current version: v0.5.0

Key Capabilities

  • Domestic szlcsc.com search and query by C number / MPN.

  • Domestic stock, MOQ, packaging, and CNY tiered pricing; missing values always remain unknown, not treated as 0.

  • Parametric search, engineering unit parsing, side-by-side component comparison, and alternative part scoring.

  • Datasheet batch sync, failure diagnosis, and manifest.

  • EasyEDA Symbol / Footprint / SVG / OBJ / STEP retrieval.

  • altium-cruncher-driven SchLib / PcbLib / 3D placement / merge.

  • C number as the primary key for procurement records, MPN + package as the CAD deduplication key.

  • Automatic pin/pad/3D check of Altium conversion results + mandatory manual review prompt.

Related MCP server: jlcpcb-mcp

v0.5.0: Long-Term Library Search / Audit / Security Fix

On top of the classified/ + flat/ dual-view archive from v0.4.5, three new local library management tools are added:

  • szlcsc_library_search: Fully offline search by C number, MPN, brand, package, category, stock, Datasheet/SchLib/PcbLib/STEP status, with sorting by relevance/price/stock/mpn.

  • szlcsc_library_audit: Read-only check of classified primary assets, flat mirror SHA256, CAD owner/index, cad_shared, and Altium file existence.

  • szlcsc_library_repair: Default dry_run=true; only repairs deterministically recoverable flat mirrors and CAD owner/index consistency, does not re-download Datasheets, does not regenerate CAD; missing classified primary files only reported as unresolved.

Recommended maintenance workflow:

szlcsc_library_audit(...)
        ↓
szlcsc_library_repair(dry_run=true)
        ↓ 人工确认计划
szlcsc_library_repair(dry_run=false)
        ↓
szlcsc_library_audit(...)

Formal test requirements have been included in the repository:

v0.4.5: Categorized Long-Term Library + Flat Browsing Library

After components are added to the library via szlcsc_library_add, Datasheets, SchLib, PcbLib, STEP are simultaneously stored in two views:

szlcsc-library/
├─ library-index.json
├─ classified/
│  ├─ datasheets/<立创类目>/类型-型号-C编号.pdf
│  ├─ schlib/<立创类目>/类型-型号-C编号.SchLib
│  ├─ pcblib/<立创类目>/类型-型号-C编号.PcbLib
│  ├─ 3d/<立创类目>/类型-型号-C编号.step
│  └─ reports/<立创类目>/类型-型号-C编号-*.json
├─ flat/
│  ├─ 类型-型号-C编号.pdf
│  ├─ 类型-型号-C编号.SchLib
│  ├─ 类型-型号-C编号.PcbLib
│  └─ 类型-型号-C编号.step
└─ merged/

For example:

电压基准芯片-TPR3333-S3TR-C5291487.pdf
电压基准芯片-TPR3333-S3TR-C5291487.SchLib
电压基准芯片-TPR3333-S3TR-C5291487.PcbLib
电压基准芯片-TPR3333-S3TR-C5291487.step

classified/ is the long-term primary storage: first separated by asset type, then hierarchically by LCSC category. flat/ is a flat mirror, convenient for direct browsing when there are few components. If the data source only returns the leaf category, only one level of classification is present; if the full Level1/Level2/Leaf path is returned, it is automatically saved level by level.

szlcsc_library_merge reads the classified archive first, so after the temporary altium/Cxxxx conversion directory is deleted, archived CAD can still be reused and merged.

Altium Live Status

v0.4.4 has been verified on a live Windows + Altium Designer setup:

  • altium-cruncher 2026.8.11.1

  • altium-monkey 2026.8.11.post1

  • wn-geometer 2026.6.10

  • easyeda-import: PASS

  • merge: PASS

  • 3D download / placement: PASS

  • C2040 smoke: PASS

  • C2040: 57 Symbol pins ↔ 57 Footprint pads, manually verified match

  • STEP: 0°, 0.0 mils clearance, opens normally in Altium Designer

The source EasyEDA report for C2040 still retains 51/57 off-grid pin hotspots warning; this warning is not silently ignored, but this manual inspection found no structural blocking defects.

See docs/test-reports/v0.4.4-altium-live.md. v0.4.5 local regression: 60 passed. v0.5.0 new long-term library management regression: 67 passed; see docs/test-reports/v0.5.0.md.

Installation

Python 3.11+:

py -3.11 -m venv .venv
.\.venv\Scripts\python.exe -m pip install -U pip
.\.venv\Scripts\pip.exe install -e .

MCP command:

<项目路径>\.venv\Scripts\szlcsc-mcp.exe

Alternatively:

uv tool install .

Optional: Altium Converter

SZLCSC MCP does not bundle the third-party altium-cruncher. On Windows you can run:

powershell -ExecutionPolicy Bypass -File .\scripts\install-altium-cruncher.ps1

Or manually:

uv tool install altium-cruncher
uv tool update-shell
altium-cruncher version

Then call:

szlcsc_altium_setup()
szlcsc_altium_status()

Only when ready=true and status="ready" does it indicate that the Altium toolchain is testable.

Common MCP Tools

Tool

Purpose

szlcsc_search

Retrieve by keyword / MPN / C number

szlcsc_parametric_search

Filter by engineering parameter constraints

szlcsc_get_part

Full component details

szlcsc_compare_parts

Multi-component comparison

szlcsc_find_alternatives

Alternative part candidates and scoring

szlcsc_sync_datasheets

Batch Datasheet + manifest

szlcsc_eda_assets

EasyEDA Symbol / Footprint / OBJ / STEP

szlcsc_altium_setup

Altium toolchain diagnostics

szlcsc_altium_smoke_test

SchLib/PcbLib/3D/merge smoke test

szlcsc_altium_import

Single component Altium conversion

szlcsc_altium_import_batch

Batch Altium conversion

szlcsc_altium_review

Conversion report check

szlcsc_library_add

Add to long-term library + CAD dedup + dual-view archive

szlcsc_library_status

Library index and classification status

szlcsc_library_search

Offline search of long-term library with CAD/asset filtering

szlcsc_library_audit

classified/flat/CAD owner integrity audit

szlcsc_library_repair

Dry-run-first safe mirror/index repair

szlcsc_library_sync

Refresh pricing/stock and other procurement metadata

szlcsc_library_merge

Merge SchLib/PcbLib by classification

szlcsc_parse_barcode

Parse LCSC packaging bag QR code

Full agent work rules are in skills/szlcsc/SKILL.md.

Examples

Parametric selection:

szlcsc_parametric_search(
  query="3.3V 电压基准",
  package="SOT-23",
  in_stock=true,
  max_price=5,
  constraints={
    "output_voltage": "=3.3V",
    "accuracy": "<=0.2%",
    "tempco": "<=30ppm/°C"
  }
)

Add to long-term library:

szlcsc_library_add(
  identifiers=["C2040", "C5291487"],
  library_root="D:/Components/SZLCSC-Library",
  altium_output_root="D:/Components/Altium",
  import_missing=true,
  dedupe_cad=true
)

Search within library:

szlcsc_library_search(
  library_root="D:/Components/SZLCSC-Library",
  query="TPR3333",
  in_stock=true,
  has_pcblib=true,
  has_step=true,
  sort_by="price"
)

Audit and repair:

szlcsc_library_audit(library_root="D:/Components/SZLCSC-Library")
szlcsc_library_repair(library_root="D:/Components/SZLCSC-Library", dry_run=true)
# 确认 actions 后再 dry_run=false

Merge by classification:

szlcsc_library_merge(
  library_root="D:/Components/SZLCSC-Library",
  output_dir="D:/Components/SZLCSC-Library/merged"
)

Data and Security Principles

  • Domestic procurement conclusions are based on szlcsc.com, not silently replaced with international LCSC USD prices.

  • Default comparison uses the lowest CNY tiered price corresponding to the minimum purchase quantity.

  • No reverse engineering, bypassing of CAPTCHAs, login, WASM signatures, or other access controls.

  • Datasheet support includes LCSC attachment CDN and controlled official manufacturer HTTPS PDF domains; general assets remain restricted to SZLCSC/LCSC domains.

  • EasyEDA/Altium automatic conversion does not constitute proof of manufacturing correctness. Before submitting for fabrication, you must still verify against manufacturer Datasheets: Pin 1, pin numbers, pad dimensions, and 3D orientation.

License

MIT. altium-cruncher is an independent third-party tool, licensed under its own license; this project does not vendor it.

Available Tools

25 tools
szlcsc_altium_importC

调用本机 altium-cruncher,把指定 C 编号/MPN 的 EasyEDA 数据转换为 Altium SchLib/PcbLib/3D。

Inputs: identifier (required), preview, timeout, output_root, +9 more. Returns: result

szlcsc_altium_import_batchB

批量调用 altium-cruncher 生成 Altium 库;最多 50 个器件,逐个执行并分别报告失败。

Inputs: identifiers (required), preview, timeout, output_root, +3 more. Returns: result

szlcsc_altium_reviewA

读取已生成的 Altium EasyEDA 导入报告,汇总 pin/pad/3D placement 告警,不修改文件。

Inputs: identifier (required), output_root. Returns: result

szlcsc_altium_setupA

返回 Altium 转换工具链诊断和安全安装/升级命令;本工具本身不会执行安装。

Inputs: no named parameters. Returns: result

szlcsc_altium_smoke_testB

实机 Altium 冒烟测试:最多 5 个 C 编号,检查 SchLib/PcbLib/report/可选3D,并可测试合并。

Inputs: identifiers (required), preview, timeout, require_3d, +2 more. Returns: result

szlcsc_altium_statusB

检查可选第三方 altium-cruncher 是否已安装,以及 easyeda-import 子命令是否可用。

Inputs: no named parameters. Returns: result

szlcsc_cache_statusB

查看 SQLite 请求缓存;clear=true 清空;prune_days=N 清理 N 天以前缓存。

Inputs: clear, prune_days. Returns: result

szlcsc_compare_partsA

并排比较多个明确器件,返回基础字段和同名参数差异;不会自动声明可直接替换。

Inputs: identifiers (required). Returns: result

szlcsc_download_partB

下载并整理单个器件:part.json、README.md、datasheet.pdf(若可用)和商品图片。

Inputs: identifier (required), force, output_root. Returns: result

szlcsc_download_partsC

批量下载并整理多个器件完整资料目录。

Inputs: identifiers (required), force, output_root. Returns: result

szlcsc_eda_assetsC

下载 EasyEDA 原始 EDA 资产:CAD JSON、符号/封装 SVG、OBJ/STEP(若该器件提供)。

Inputs: identifier (required), force, include_obj, output_root, +2 more. Returns: result

szlcsc_find_alternativesC

获取 SZLCSC 替代料候选并排序。结果不是 drop-in 兼容声明。

Inputs: identifier (required), max_results, in_stock_only. Returns: result

szlcsc_get_partA

按 C 编号或明确 MPN 获取国内 SZLCSC 详情、参数、库存、价格、商品页和 Datasheet。

Inputs: identifier (required). Returns: result

szlcsc_healthcheckA

轻量检查 SZLCSC 搜索接口与本地缓存是否可用;不读取价格库存详情。

Inputs: query. Returns: result

szlcsc_library_addB

把器件登记进本地库;C编号保留采购元数据,MPN+封装用于 CAD 去重,可按需生成 Altium 库。

Inputs: identifiers (required), preview, timeout, dedupe_cad, +5 more. Returns: result

szlcsc_library_auditB

只读审计长期器件库:检查 classified/flat、CAD owner、索引与文件完整性。

Inputs: identifiers, library_root, verify_hashes. Returns: result

szlcsc_library_mergeB

按库分类把已登记的独立 SchLib/PcbLib 合并成多器件 Altium 库;共享 CAD 只合并一次。

Inputs: timeout, category, conflicts, output_dir, +1 more. Returns: result

szlcsc_library_repairA

安全修复长期器件库;默认 dry-run,只恢复 flat 镜像和 CAD owner/index 一致性,不重新下载或生成 CAD。

Inputs: dry_run, identifiers, repair_flat, library_root, +1 more. Returns: result

szlcsc_library_statusB

查看本地 SZLCSC/Altium 器件库索引、分类、重复 MPN/CAD 组和已登记器件。

Inputs: query, category, library_root, only_cad_owners. Returns: result

szlcsc_library_syncB

刷新库内价格、库存、Datasheet 等采购元数据;不会因这些变化重建 CAD,MPN/封装变化会标记复核。

Inputs: dedupe_cad, identifiers, library_root. Returns: result

szlcsc_parse_barcodeA

解析立创包装袋常见二维码文本(pc=C编号、pm=MPN、qty=数量);lookup=true 时顺便查询器件详情。

Inputs: raw (required), lookup. Returns: result

szlcsc_sync_datasheetsC

批量同步 Datasheet 到一个目录并增量维护 manifest.json;适合 BOM/MPN 列表。

Inputs: identifiers (required), force, output_dir. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 25 tools

    Disambiguation4/5

    Most tools are cleanly separated by domain and action: search, parametric search, get, compare, alternatives, download, Altium import, and library management each have distinct purposes. A few adjacent pairs such as download_parts vs sync_datasheets and library_status vs library_audit require careful description reading, but the boundaries are mostly clear.

    Naming Consistency4/5

    All tools share the szlcsc_ prefix and the majority follow a domain_action pattern such as get_part, library_add, and altium_import. A handful of noun-style names like eda_assets, altium_status, and healthcheck prevent the set from being fully uniform.

    Tool Count3/5

    At 25 tools, the server sits at the upper edge of the heavy range and is larger than typical MCP servers. The count is understandable given the broad scope covering online search, artifact downloads, Altium conversion, and local library management, but it still feels slightly heavy.

    Completeness4/5

    The tool set covers the full workflow from online discovery and comparison to datasheet/EDA download, Altium conversion, and long-term local library management with audit and repair. The main gap is lifecycle management: parts can be added, merged, and synced, but there is no explicit tool to remove a part from the library.

    Maintenance

    ActivityNo data
    ResponsivenessSyncing

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      A
      maintenance
      MCP servers for KiCad schematic, PCB, symbol, footprint, and project automation, enabling AI-assisted electronic design via tools for read/write, analysis, and exports.
      109
      349 PyPI
      16
      GPL 3.0
    • A
      license
      A
      quality
      C
      maintenance
      MCP server for JLCPCB/LCSC component search, live stock and pricing, datasheets, and PCB/3D printing ordering via authenticated API.
      28
      2
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      An MCP server that picks JLCPCB/LCSC parts for KiCad circuits with assembly cost in mind, automating part selection, stock risk checks, and quantity-tiered pricing.
      8
      4
      MIT