PCB零件MCP服务器
MCP服务器,用于直接从Claude、Cursor和其他AI编码助手搜索JLCPCB、Mouser和DigiKey的电子元件。具有参数化滤波和KiCad封装的1.5M以上零件。不需要API密钥。
网站: pcbparts.dev
特性
- 跨分销商搜索: JLCPCB、Mouser和DigiKey可在一台MCP服务器上使用
- 参数搜索: 按电气规格过滤(Vgs(th)\=25V”)
- 智能查询解析(“10k 0603 1%”自动检测值、包、容差)
- 大多数搜索
使用 jlc_stock_check 只有当你需要:
- 下单前实时库存验证
- 缺货或库存不足的零件(库存\=10)
库类型
| 类型 | 装配费 | 说明 |
|---|---|---|
basic | 无 | JLCPCB标准库中的通用部件 |
preferred | 无 | 推荐可用性良好的零件 |
extended | 3美元/独特零件 | 不太常见的零件 |
no_fee | 无 | 筛选快捷方式:搜索基本+首选组合 |
子类别别名
映射到JLCPCB子类别的自然语言名称(支持220多个别名):
| 类别 | 别名 |
|---|---|
| 电容器 | mlcc, ceramic capacitor, electrolytic, tantalum, supercap |
| 电阻器 | resistor, chip resistor, current sense resistor |
| 电感器 | inductor, ferrite bead, ferrite |
| 二极管 | schottky, zener, tvs, esd diode, rectifier |
| MOSFET | mosfet, n-channel mosfet, p-channel mosfet, nmos, pmos |
| 监管机构 | ldo, buck, boost, dc-dc |
| 晶体 | crystal, oscillator, tcxo |
| 连接器 | usb-c, pin header, jst, terminal block, qwiic |
| LED | led, rgb led, ws2812, neopixel |
| MCU | mcu, microcontroller |
属性别名
参数化等级库过滤器的简称:
| 组件 | 属性 |
|---|---|
| MOSFET | Vgs(th), Vds, Id, Rds(on) |
| 二极管 | Vr, If, Vf |
| BJTs | Vceo, Ic |
| 被动语态 | Capacitance, Resistance, Inductance, Voltage, Tolerance, Power |
使用 jlc_search_help(subcategory=...) 发现任何子类别的所有可过滤规范。
胀包
包过滤器会自动扩展以包含变体:
"SOT-23"→ 包括SOT-23-3,SOT-23-3L,SOT-23(TO-236)"0603"→ 包括1608(公制等效)- 特定的软件包,如
"QFN-24-EP(4x4)"未扩展
查找替代方案
使用规范感知规则查找经过验证的兼容替代方案:
- 匹配主要规格(电阻、电容等)
- 验证
must_match规格(电介质、LED颜色、继电器线圈电压) - 验证
same_or_better规格(电压越高越好,公差越低越好) - 按库类型(基本/首选节省3美元)、库存、EasyEDA可用性排名
支持:电阻器、电容器、电感器、铁氧体磁珠、MOSFET、BJT、二极管(所有类型)、LED、光耦合器、晶体、振荡器、LDO、DC-DC转换器、电压基准、WiFi/BT/LoRa模块、开关、继电器、连接器等(120多个子类别)。
查询示例
"Find logic-level MOSFETs with Vgs(th) = 5A"
"100nF 25V capacitors in 0402 or 0603"
"Find alternatives for C82899 in basic library"
"STM32 microcontrollers with 10000+ stock"
"Cross-reference TPS63020 on Mouser and compare with JLCPCB pricing"
"Get KiCad footprint for ESP32-S3-WROOM-1"
"What sensor should I use to measure CO2 on ESPHome?"
"Recommend an IMU sensor with I2C interface"
"Show me boards that use the MCP73831 charger"
"How is the RP2040 typically used? What decoupling and crystal do real boards use?"
"Get the ESP32-S3 neighborhood on the Adafruit Feather"
"What are the design rules for USB-C?"
"Show me LDO design best practices"API详细信息
- 端点:
https://pcbparts.dev/mcp - 运输: 流式HTTP(无状态)
- 健康:
https://pcbparts.dev/health - 费率限制: 每个IP每分钟100个请求
- 认证: 无需
自我寄宿
git clone https://github.com/Averyy/pcbparts-mcp
cd pcbparts-mcp
uv venv && uv pip install -e .
.venv/bin/python -m pcbparts_mcp.server # http://localhost:8080/mcp或者使用Docker:
docker compose up -d # production (GHCR image)
docker compose -f docker-compose.local.yml up --build # local dev (builds from source)环境变量
| 变量 | 默认值 | 描述 |
|---|---|---|
HTTP_PORT | 8080 | 服务器端口 |
RATE_LIMIT_REQUESTS | 100 | 每分钟每个IP的请求数 |
DISTRIBUTOR_DAILY_LIMIT | 1000 | 每个经销商每日API申请配额(Mouser/DigiKey) |
MOUSER_API_KEY | - | 鼠标API键(可选,启用鼠标工具) |
DIGIKEY_CLIENT_ID | -- | DigiKey OAuth2客户端ID(可选,启用DigiKey工具) |
DIGIKEY_CLIENT_SECRET | -- | DigiKey OAuth2客户机密 |
LLM可读文档
一 llms.txt 文件可供LLM和AI代理快速了解此服务。看 llmstxt.org 对于规范。
许可证
麻省理工学院
