Source Parts MCP Server

Source Parts MCP Server

Enables Claude to search and manage electronic components, PCB parts, and manufacturing services through direct access to the Source Parts API. Provides comprehensive product search, pricing, inventory checking, and parametric filtering capabilities for electronics procurement.

Category
访问服务器

README

Source Parts MCP Server

A Model Context Protocol (MCP) server that provides Claude with direct access to the Source Parts API for searching and managing electronic components, PCB parts, and manufacturing services.

Features

  • Product Search: Search the Source Parts marketplace with keywords, categories, and filters
  • Product Details: Get comprehensive product information including specs, pricing, and availability
  • Stock Checking: Real-time inventory availability across multiple suppliers
  • Pricing Information: Detailed pricing with quantity breaks and volume discounts
  • Parametric Search: Find components by technical specifications
  • Datasheets: Access product documentation and datasheets
  • Product Comparison: Compare specifications and pricing across multiple products
  • Categories: Browse the product category hierarchy

Installation

Prerequisites

  • Node.js 18 or higher
  • Claude Desktop or any MCP-compatible client
  • Source Parts API access (optional - works with public API)

Setup

  1. Clone or install the package:
npm install @sourceparts/mcp

Or for development:

git clone git@github.com:SourceParts/mcp.git
cd mcp
npm install
npm run build
  1. Configure Claude Desktop to use the MCP server:

Add to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "sourceparts": {
      "command": "node",
      "args": [
        "/path/to/mcp/dist/index.js"
      ],
      "env": {
        "SOURCE_PARTS_API_KEY": "your-api-key-here"
      }
    }
  }
}
  1. Restart Claude Desktop

Configuration

Environment Variables

Create a .env file in the project root (optional):

# Optional: API base URL (defaults to https://source.parts/api)
SOURCE_PARTS_API_URL=https://source.parts/api

# Optional: API key for authenticated requests
SOURCE_PARTS_API_KEY=your_api_key_here

The server works without an API key for public product searches. An API key provides access to additional features like:

  • Higher rate limits
  • Access to private/draft products
  • Bulk operations
  • Historical data

Available Tools

search_products

Search for electronic components and products.

Parameters:

  • query (required): Search keywords, part numbers, or descriptions
  • category (optional): Filter by category (e.g., "resistors", "capacitors")
  • limit (optional): Max results (default: 20, max: 100)
  • offset (optional): Pagination offset (default: 0)

Example:

Search for "STM32 microcontroller" in the "ics" category

get_product_details

Get detailed information about a specific product.

Parameters:

  • productId (required): The unique product ID

Example:

Get details for product ID "prod_123abc"

check_stock

Check real-time inventory availability.

Parameters:

  • productIds (required): Array of product IDs to check

Example:

Check stock for products ["prod_123", "prod_456"]

get_pricing

Get pricing information with quantity breaks.

Parameters:

  • productId (required): The product ID
  • quantity (optional): Desired quantity (default: 1)

Example:

Get pricing for product "prod_123" with quantity 1000

search_by_specs

Parametric search by technical specifications.

Parameters:

  • category (required): Component category
  • specs (required): Object with specification key-value pairs
  • limit (optional): Max results (default: 20)

Example:

Find resistors with specs: {"resistance": "10k", "tolerance": "1%", "power": "0.25W"}

get_datasheets

Get datasheet URLs and documentation.

Parameters:

  • productId (required): The product ID

Example:

Get datasheets for product "prod_123"

compare_products

Compare specifications and pricing across products.

Parameters:

  • productIds (required): Array of 2-5 product IDs

Example:

Compare products ["prod_123", "prod_456", "prod_789"]

get_categories

Get product categories and hierarchy.

Parameters:

  • parentCategory (optional): Get subcategories of a parent

Example:

Get all top-level categories or subcategories of "passives"

Development

Building

npm run build

Development Mode

npm run dev

This runs TypeScript in watch mode, rebuilding on file changes.

Testing

Test the MCP server with the MCP Inspector:

npx @modelcontextprotocol/inspector node dist/index.js

Architecture

The server is built using:

  • @modelcontextprotocol/sdk: Official MCP SDK for Node.js
  • @sourceparts/sdk: Official Source Parts TypeScript SDK
  • TypeScript: Type-safe development
  • Zod: Runtime validation

The MCP server acts as a thin wrapper around the Source Parts SDK, exposing its functionality through MCP tools for use in Claude and other MCP-compatible clients.

Project Structure

mcp/
├── src/
│   └── index.ts          # Main MCP server implementation
├── dist/                 # Compiled JavaScript output
├── package.json          # Package configuration
├── tsconfig.json         # TypeScript configuration
└── README.md            # This file

API Endpoints

The server connects to the Source Parts API at https://source.parts/api by default. Available endpoints:

  • GET /products/search - Product search
  • GET /products/:id - Product details
  • POST /products/stock - Stock availability
  • GET /products/:id/pricing - Pricing information
  • POST /products/search/specs - Parametric search
  • GET /products/:id/datasheets - Datasheets
  • POST /products/compare - Product comparison
  • GET /products/categories - Category listing

Example Usage in Claude

Once configured, you can ask Claude questions like:

  • "Search for STM32 microcontrollers with at least 256KB flash"
  • "Compare these three resistors: prod_123, prod_456, prod_789"
  • "Check if product prod_abc is in stock and get pricing for 1000 units"
  • "Find all ceramic capacitors with 10uF capacitance and 25V rating"
  • "Show me the datasheet for product prod_xyz"

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

Apache License 2.0 - see LICENSE file for details

Copyright 2025 Source Parts

Support

  • Documentation: https://source.parts/docs
  • API Docs: https://source.parts/docs/api
  • Issues: https://github.com/SourceParts/mcp/issues
  • Email: support@source.parts

Changelog

v0.2.0 (2025-10-15)

  • Breaking: Refactored to use @sourceparts/sdk instead of direct API calls
  • Added 14 tools (expanded from 8):
    • Products: search_products, get_product_details, get_categories, get_manufacturers
    • Quotes: list_quotes, get_quote, create_quote
    • BOMs: list_boms, get_bom, get_bom_pricing
    • Orders: list_orders, get_order, get_order_tracking
  • Improved error handling through SDK
  • Better type safety with SDK types

v0.1.0 (2025-10-15)

  • Initial release
  • 8 core tools for product search and management
  • TypeScript support
  • Full MCP SDK integration
  • Direct API integration

Related Projects


Made with ❤️ by Source Parts

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选