Skip to main content

Model Context Protocol (MCP) server for electronic parts sourcing with KiCad integration

Project description

Parts MCP

A Model Context Protocol (MCP) server for sourcing electronic parts with multi-EDA integration.

Overview

Parts MCP enables AI assistants to search for electronic components, compare prices, check availability, and process BOMs from popular EDA tools. It provides a unified interface for component sourcing workflows powered by the Source Parts API.

Supported EDA Tools

Tool BOM Format Status
KiCad CSV, XML Full support + CLI integration
Altium Designer CSV, XLS Full support
Autodesk Fusion 360 CSV Full support
Eagle CSV, BRD Full support
PADS CSV, ASC Full support
Protel 99 CSV Full support

Features

  • Universal Parts Search: Search millions of parts via Source Parts API
  • Multi-EDA BOM Processing: Import BOMs from KiCad, Altium, Fusion360, Eagle, PADS, Protel99
  • Component Matching: AI-powered matching with confidence scoring
  • Price Comparison: Compare prices across distributors
  • Availability Check: Real-time inventory levels
  • Alternative Parts: Find drop-in replacements and functional equivalents
  • KiCad CLI Integration: Generate BOMs directly from schematics
  • Local Caching: Fast responses with intelligent caching

Installation

From PyPI (Recommended)

pip install parts-mcp

From Source

git clone https://github.com/SourceParts/parts-mcp.git
cd parts-mcp
pip install -e .

Requirements

Configuration

Create a .env file or set environment variables:

# Required
SOURCE_PARTS_API_KEY=your_api_key_here

# Optional
SOURCE_PARTS_API_URL=https://api.source.parts/v1
KICAD_SEARCH_PATHS=/path/to/kicad/projects
PARTS_CACHE_DIR=~/.cache/parts-mcp
CACHE_EXPIRY_HOURS=24

Claude Desktop Integration

Add to your Claude Desktop configuration file:

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

{
  "mcpServers": {
    "parts": {
      "command": "python",
      "args": ["-m", "parts_mcp"],
      "env": {
        "SOURCE_PARTS_API_KEY": "your_api_key_here"
      }
    }
  }
}

If installed from source:

{
  "mcpServers": {
    "parts": {
      "command": "/path/to/python",
      "args": ["/path/to/parts-mcp/main.py"],
      "env": {
        "SOURCE_PARTS_API_KEY": "your_api_key_here"
      }
    }
  }
}

After adding the configuration, restart Claude Desktop.

Claude.ai Integration (Remote)

Connect directly from claude.ai without any local installation:

  1. Open claude.ai in your browser
  2. Go to Settings > Connectors
  3. Click Add custom connector
  4. Enter the URL: https://mcp.source.parts/
  5. Complete the OAuth sign-in when prompted
  6. Start using Parts tools in any conversation

No API key needed -- authentication is handled via OAuth.

Claude Code Integration

Add to your Claude Code MCP settings (~/.claude/settings.json):

{
  "mcpServers": {
    "parts": {
      "command": "python",
      "args": ["-m", "parts_mcp"],
      "env": {
        "SOURCE_PARTS_API_KEY": "your_api_key_here"
      }
    }
  }
}

Or run directly:

claude --mcp-server "python -m parts_mcp"

Usage Examples

Search for Parts

"Find a 10k resistor in 0603 package"

Process a BOM

"Upload my Altium BOM and find the best prices for 100 units"

KiCad Integration

"Extract the BOM from my amplifier.kicad_sch and source all components"

Find Alternatives

"Find alternatives for the obsolete LM358"

Check Availability

"Check stock levels for STM32F103C8T6"

Available Tools

Tool Description
search_parts Search for components by query
get_part_details Get detailed part information
get_part_pricing Get pricing across distributors
check_availability Check real-time inventory
find_alternatives Find replacement parts
process_bom Process BOM file from any supported EDA
match_components Match BOM components to parts
find_kicad_projects Discover local KiCad projects
generate_kicad_bom Generate BOM from KiCad schematic

Architecture

Parts MCP follows a thin client architecture:

Local (MCP):

  • KiCad CLI operations
  • Project discovery
  • Response caching
  • BOM file parsing

Server (Source Parts API):

  • Component matching
  • Price aggregation
  • Inventory checking
  • Alternative search

Development

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Run with debug logging
DEBUG=1 python main.py

Project Structure

parts_mcp/
├── server.py          # MCP server entry
├── config.py          # Configuration
├── tools/             # MCP tools
├── resources/         # MCP resources
├── prompts/           # Prompt templates
└── utils/
    ├── api_client.py        # Source Parts API client
    ├── bom_parser.py        # Multi-EDA BOM parsing
    ├── component_matcher.py # Component matching
    ├── cache.py             # Response caching
    └── kicad_utils.py       # KiCad CLI integration

Marketplace Listings

Links

License

MIT License with Trademark Protection - see LICENSE.md

"Source Parts" is a trademark. See license for usage restrictions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parts_mcp-0.3.2.tar.gz (283.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

parts_mcp-0.3.2-py3-none-any.whl (144.3 kB view details)

Uploaded Python 3

File details

Details for the file parts_mcp-0.3.2.tar.gz.

File metadata

  • Download URL: parts_mcp-0.3.2.tar.gz
  • Upload date:
  • Size: 283.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for parts_mcp-0.3.2.tar.gz
Algorithm Hash digest
SHA256 945f990d8e0253eed86e47c6cb2187ac76f5dfd5ab5c13edf370fa3fab77a1de
MD5 03341e1a445d5ccac71fa9008b557995
BLAKE2b-256 bc4f44131b5bec27303ddc6c6d03b57b27b7a3a7ad30511cd4281968032dd17d

See more details on using hashes here.

File details

Details for the file parts_mcp-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: parts_mcp-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 144.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for parts_mcp-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 85c20710f5822af66371b270ed88389b5913024aea14100e009aa80abf08f01f
MD5 3d7fd8a46f4c249fd3f44c5711e56123
BLAKE2b-256 f1d7554c19adf7119337445c11e630ccb8e5bd00c579be96c5f00e93a0e75382

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page