DigiKey MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add -e "CLIENT_ID=${CLIENT_ID}" -e "CLIENT_SECRET=${CLIENT_SECRET}" -e "DIGIKEY_ACCOUNT_ID=${DIGIKEY_ACCOUNT_ID}" digikey-mcp -- docker build -t digikey-mcp:latest .
Required:CLIENT_IDCLIENT_SECRETDIGIKEY_ACCOUNT_ID+ 4 optional
README.md

DigiKey component search, pricing, ordering, and order status

DigiKey MCP Server

A Model Context Protocol server for the DigiKey Product Search API v4, built with FastMCP. Docker-first, designed for the Docker MCP Toolkit.

Originally inspired by bengineer19/digikey_mcp.

Prerequisites

  • DigiKey API credentials — Register at developer.digikey.com, create an app with client_credentials grant type
  • DigiKey Customer Number — Required for order tools. Find it in your DigiKey account settings.
  • Docker (recommended) or Python 3.10+
  • Docker MCP Toolkit — included with Docker Desktop (requires MCP Toolkit support)

Project Structure

digikey-mcp/
├── mcp_app.py               # Shared FastMCP instance
├── digikey_mcp_server.py     # Main server — authenticated tools (OAuth2)
├── digikey_noauth_tools.py   # No-auth tools (cart URL, MyList link)
├── Dockerfile                # Docker image with embedded metadata
├── server.yaml               # Registry entry for docker/mcp-registry
└── tests/                    # Unit tests

Quick Start — Docker MCP Toolkit

The recommended way to run this server. The Docker MCP gateway manages the container lifecycle, injects secrets, and exposes tools to MCP clients like Claude Code or Claude Desktop.

1. Build the Docker image

git clone https://github.com/simon-77/digikey-mcp.git
cd digikey-mcp
docker build -t digikey-mcp:latest .

2. Create a custom catalog

The gateway discovers servers through catalog files. Create one at ~/.docker/mcp/catalogs/custom.yaml:

version: 3
name: custom
displayName: Custom MCP Servers
registry:
  digikey:
    description: DigiKey component search, pricing, ordering, and order status
    title: DigiKey
    type: server
    image: digikey-mcp:latest
    secrets:
      - name: digikey.CLIENT_ID
        env: CLIENT_ID
      - name: digikey.CLIENT_SECRET
        env: CLIENT_SECRET
      - name: digikey.DIGIKEY_ACCOUNT_ID
        env: DIGIKEY_ACCOUNT_ID
    env:
      - name: USE_SANDBOX
        value: "false"
      - name: DIGIKEY_LOCALE_SITE
        value: "US"
      - name: DIGIKEY_LOCALE_LANGUAGE
        value: "en"
      - name: DIGIKEY_LOCALE_CURRENCY
        value: "USD"
    tools:
      - name: keyword_search
      - name: product_details
      - name: search_manufacturers
      - name: search_categories
      - name: get_category_by_id
      - name: search_product_substitutions
      - name: get_product_media
      - name: get_product_pricing
      - name: get_digi_reel_pricing
      - name: generate_cart_url
      - name: create_mylist_link
      - name: list_orders
      - name: get_order_status
    prompts: 0
    resources: {}

Change the env values to match your locale (e.g., AT/en/EUR for Austria).

Note: The tools list must match the tools defined in the server. The gateway uses this list to register tools with MCP clients. prompts: 0 and resources: {} indicate the server exposes no MCP prompts or resources.

3. Register the catalog and enable the server

docker mcp catalog import ~/.docker/mcp/catalogs/custom.yaml
docker mcp server enable digikey

Re-run catalog import whenever you modify custom.yaml.

4. Set secrets

docker mcp secret set digikey.CLIENT_ID
docker mcp secret set digikey.CLIENT_SECRET
docker mcp secret set digikey.DIGIKEY_ACCOUNT_ID

You'll be prompted to enter each value. Secret names must be prefixed with the server name (digikey.).

The Account ID is your DigiKey customer number — required for order tools (list_orders, get_order_status).

5. Connect an MCP client

docker mcp client connect claude-code

This adds the gateway to your project's .mcp.json:

{
  "mcpServers": {
    "MCP_DOCKER": {
      "command": "docker",
      "args": ["mcp", "gateway", "run"],
      "type": "stdio"
    }
  }
}

When the MCP client starts, the gateway launches the digikey-mcp:latest container, injects secrets as environment variables, and proxies tool calls.

Rebuilding after changes

docker build -t digikey-mcp:latest .
# Restart your MCP client to pick up the new image

No need to re-import the catalog or re-set secrets — just rebuild and restart.

Alternative: Docker standalone

Run the container directly without the MCP Toolkit. You manage secrets and lifecycle yourself.

docker build -t digikey-mcp .

docker run --rm -i \
  -e CLIENT_ID=your_client_id \
  -e CLIENT_SECRET=your_client_secret \
  -e DIGIKEY_ACCOUNT_ID=your_customer_number \
  -e USE_SANDBOX=false \
  -e DIGIKEY_LOCALE_SITE=US \
  -e DIGIKEY_LOCALE_LANGUAGE=en \
  -e DIGIKEY_LOCALE_CURRENCY=USD \
  digikey-mcp

.mcp.json for MCP

Tools (13)

keyword_searchSearch for electronic components using keywords
product_detailsRetrieve detailed specifications for a specific product
search_manufacturersLook up manufacturer information
search_categoriesSearch for product categories
get_category_by_idRetrieve category details by ID
search_product_substitutionsFind alternative products
get_product_mediaGet media assets for a product
get_product_pricingGet pricing information for a product
get_digi_reel_pricingGet DigiReel specific pricing
generate_cart_urlGenerate a URL for a DigiKey shopping cart
create_mylist_linkCreate a link for a saved product list
list_ordersList recent orders
get_order_statusCheck the status of a specific order

Environment Variables

CLIENT_IDrequiredDigiKey API Client ID
CLIENT_SECRETrequiredDigiKey API Client Secret
DIGIKEY_ACCOUNT_IDrequiredDigiKey customer number for order tools
USE_SANDBOXToggle sandbox environment
DIGIKEY_LOCALE_SITESite locale (e.g., US)
DIGIKEY_LOCALE_LANGUAGELanguage code (e.g., en)
DIGIKEY_LOCALE_CURRENCYCurrency code (e.g., USD)

Configuration

claude_desktop_config.json
{"mcpServers": {"digikey": {"command": "docker", "args": ["run", "-i", "--rm", "-e", "CLIENT_ID=...", "-e", "CLIENT_SECRET=...", "digikey-mcp"]}}}

Try it

Search for a 10k ohm resistor and get its current pricing.
Find alternative parts for the component with part number SN74HC595N.
What is the current status of my recent DigiKey order?
Generate a cart URL for 50 units of part number CRCW060310K0FKEA.
List all my recent orders from DigiKey.

Frequently Asked Questions

What are the key features of DigiKey MCP Server?

Keyword-based electronic component search. Real-time product pricing and availability lookups. Order management and status tracking. Support for product substitutions and manufacturer lookups. Generation of shareable cart and product list links.

What can I use DigiKey MCP Server for?

Engineers sourcing components for hardware prototypes. Procurement teams tracking order status directly from their IDE. Developers building automated BOM (Bill of Materials) management tools. Hardware hobbyists comparing component pricing and availability.

How do I install DigiKey MCP Server?

Install DigiKey MCP Server by running: docker build -t digikey-mcp:latest .

What MCP clients work with DigiKey MCP Server?

DigiKey MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep DigiKey MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare