digi-mouse-search
digi-mouse-search
DigiKey와 Mouser에서 전자 부품을 검색하는 MCP 서버입니다. 각 유통사를 단독으로 조회하거나 둘을 함께 조회할 수 있으며, 동일한 부품 번호에 대한 오퍼(offer)는 단일 항목으로 병합되어 가격을 비교할 수 있습니다.
도구
도구 | 용도 |
| 하나 또는 두 유통사 모두에서 키워드 검색 |
| 제조업체 또는 유통사 부품 번호로 단일 부품 조회 |
| 구성된 소스와 남은 요청 예산 확인 |
| 캐시된 응답을 삭제하여 최신 재고와 가격 조회 |
search_parts는 sources 목록을 받습니다. 이 목록을 생략하면 구성된 모든 유통사를 검색하며, ["mouser"]를 전달하면 해당 유통사만 검색합니다. 결과는 기본적으로 부품 번호별로 병합되고 cheapest_at_quantity 비교가 포함됩니다. merge=false를 전달하면 각 유통사의 결과가 별도의 목록으로 유지됩니다.
하나의 유통사가 실패하거나, 구성되지 않았거나, 할당량을 모두 소진한 경우에도 나머지 유통사는 결과를 반환하며, 실패 내역은 errors 아래에 보고됩니다.
설정
mise install
mise run install
mise run test자격 증명(credentials)은 환경 변수에서 가져옵니다:
# DigiKey: register an app at developer.digikey.com with Product Information enabled
export DIGIKEY_CLIENT_ID=...
export DIGIKEY_CLIENT_SECRET=...
# Mouser: request a Search API key from mouser.com/api-hub
export MOUSER_API_KEY=...실제로 사용하려는 유통사의 자격 증명만 필요합니다. 자격 증명이 없는 소스는 검색을 실패시키지 않고 구성되지 않은 것으로 보고됩니다.
자격 증명 얻기
DigiKey. 개인 개발자 앱은 항상 샌드박스 액세스만 받으며, 샌드박스는 합성(synthetic) 데이터를 반환합니다. 실제 재고와 가격을 확인하려면 조직(Organization)에 속한 프로덕션 앱(Production app)이 필요합니다:
DigiKey 계정으로 developer.digikey.com에 로그인합니다.
내비게이션 바에서 **조직(Organizations)**을 열고 아직 회원이 아니라면 조직을 하나 만듭니다.
운영(Operations) 아래에서 **프로덕션 앱(Production Apps)**을 선택한 다음 **프로덕션 앱 만들기(Create Production App)**를 선택합니다.
앱에 대해 **제품 정보(Product Information)**를 활성화합니다.
앱을 열어 **클라이언트 ID(Client ID)**와 **클라이언트 시크릿(Client Secret)**을 복사합니다.
OAuth 콜백 필드는 3-legged OAuth에서만 사용됩니다. 이 서버는 2-legged 클라이언트 자격 증명 흐름을 사용하므로 콜백으로 리디렉션되는 일이 없습니다. https://localhost를 입력하면 양식 요구 사항을 충족합니다.
샌드박스와 프로덕션 자격 증명은 서로 바꿔 쓸 수 없습니다. 샌드박스 자격 증명은 sandbox-api.digikey.com에 대해서만 작동하며, DIGIKEY_SANDBOX=true가 바로 이 호스트를 선택합니다.
Mouser. mouser.com/api-hub에서 Search API 키를 요청합니다. 단일 키이며 쿼리 매개변수로 전송되고 이메일로 도착합니다.
MCP 클라이언트 구성
{
"mcpServers": {
"digi-mouse-search": {
"command": "/path/to/digi-mouse-search/.venv/bin/python",
"args": ["-m", "digi_mouse_search"],
"env": {
"DIGIKEY_CLIENT_ID": "...",
"DIGIKEY_CLIENT_SECRET": "...",
"MOUSER_API_KEY": "..."
}
}
}
}속도 제한
두 유통사 모두 하루에 약 천 건의 호출을 허용하므로 모든 요청이 예산에 반영됩니다. 초당 및 분당 윈도우는 대기를 통해 적용되며, 일일 윈도우는 대신 오류를 보고하는 하드 스톱(hard stop)입니다. 자정에 초기화되는 할당량을 호출자가 기다려봐야 실익이 없기 때문입니다. 일일 카운터는 영속화되므로 서버를 재시작해도 초기화되지 않습니다.
기본값:
윈도우 | DigiKey | Mouser |
초당 | 2 | 1 |
분당 | 60 | 25 |
하루당 | 1000 | 1000 |
버스트 | 5 | 3 |
최대 대기 | 10 s | 10 s |
모든 값은 환경 변수 또는 TOML 파일을 통해 공급자별로 구성할 수 있습니다. 윈도우를 비활성화하려면 none, off, unlimited 또는 0을 사용하세요:
export DIGIKEY_RATE_PER_DAY=250
export DIGIKEY_RATE_PER_MINUTE=30
export MOUSER_RATE_PER_SECOND=none
export MOUSER_RATE_BURST=5
export MOUSER_RATE_MAX_WAIT=30또는 DMS_CONFIG가 파일을 가리키게 하세요. config.example.toml을 참조하세요. 환경 변수는 파일보다 우선하므로, 클라이언트 실행 명령으로 디스크의 구성을 편집하지 않고도 한도를 조정할 수 있습니다.
캐시된 응답은 예산을 소모하지 않고 제공됩니다. source_status는 오늘 남은 예산을 보고합니다.
기타 설정
변수 | 기본값 | 의미 |
| 설정되지 않음 | TOML 구성 파일 경로 |
|
| 캐시 및 사용량 데이터베이스 |
| 3600 | 캐시된 응답 유지 시간(초) |
| 30 | HTTP 타임아웃(초) |
| false | 합성 데이터를 반환하는 DigiKey 샌드박스 호스트 사용 |
| US | 검색할 DigiKey 사이트 |
| USD | DigiKey 가격 표시 통화 |
| en | DigiKey 결과에 사용할 언어 |
아키텍처
classDiagram
class MCPServer {
search_parts(keyword, sources, merge)
part_details(part_number, sources)
source_status()
clear_cache(source)
}
class SearchService {
+providers: dict
+limiters: dict
+resolve_sources(sources)
+search(...) SearchResult
+details(...) list~Part~
}
class Provider {
<<abstract>>
+name: str
+configured: bool
+search(...) list~Part~
+details(...) Part
#_cached_request(...)
}
class DigiKeyProvider {
-_token: str
-_access_token()
-_manufacturer_filter_id(name)
-_pick_variation(product)
}
class MouserProvider {
-_parse_response(response)
+parse_price(raw)
}
class RateLimiter {
+acquire()
+remaining_today()
}
class Cache {
+get(key)
+set(key, provider, value, ttl)
+get_daily_usage(provider, day)
+increment_daily_usage(provider, day)
}
class Part {
+source, mpn, manufacturer
+stock, price_breaks, specs
+unit_price_at(quantity)
}
class MergedPart {
+mpn
+offers: list~Part~
+sources
}
MCPServer --> SearchService
SearchService --> Provider
SearchService --> RateLimiter
SearchService --> Cache
Provider <|-- DigiKeyProvider
Provider <|-- MouserProvider
Provider --> RateLimiter : acquire before call
Provider --> Cache : read before spending budget
RateLimiter --> Cache : persist daily counter
Provider --> Part : produces
MergedPart o-- Part : groups offers by part number공급자 호출 한 건의 요청 흐름:
sequenceDiagram
participant C as MCP client
participant S as SearchService
participant P as Provider
participant K as Cache
participant L as RateLimiter
participant A as Distributor API
C->>S: search_parts(keyword, sources)
S->>S: resolve_sources
par each source
S->>P: search(keyword)
P->>K: get(key)
alt cached
K-->>P: payload
else not cached
P->>L: acquire()
alt budget available
L-->>P: ok
P->>A: HTTP request
A-->>P: response
P->>K: set(key, payload)
else daily quota spent
L--)P: RateLimitExceeded
end
end
P-->>S: parts or error
end
S->>S: merge by part number
S-->>C: results plus per source errors두 API에 관한 참고 사항
DigiKey는 OAuth2 클라이언트 자격 증명을 사용합니다. 토큰은 10분 동안 유효하며 메모리에 캐시됩니다. 요청에는 베어러 토큰과 함께 클라이언트 ID 헤더가 필요합니다. 필터는 불투명한 ID(opaque id)로 표현되므로, 제조업체 이름은 먼저 manufacturers 엔드포인트를 통해 해석됩니다.
Mouser는 쿼리 매개변수로 전달되는 API 키를 사용하며, 요청이 실패한 경우에도 HTTP 200으로 응답하고 실패 내용을 Errors 배열에 넣습니다. 어댑터는 이 배열을 권위 있는 정보로 취급합니다. 가격은 숫자가 아닌 지역화된 표시 문자열로 제공됩니다.
파라메트릭 사양은 두 유통사 간에 공통된 어휘가 없으므로, 공통 스키마로 정규화하는 대신 이름/값 맵으로 그대로 전달됩니다.
이 도구를 만드는 데 Claude Code가 사용되었습니다.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Electronic component sourcing, BOM management, and PCB design workflows.
Electronic component datasheets for AI agents — specs, pinouts, package data on demand.
Hosted no-auth MCP for exact-spec packaging search, live price, stock, cart handoff, and no-match.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/tmpk13/digikey-search-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server