pubchem-mcp-server
공개 호스팅 서버: https://pubchem.caseyjhand.com/mcp
도구
PubChem의 화학 정보 데이터베이스를 쿼리하기 위한 8가지 도구:
도구 이름 | 설명 |
| 이름, SMILES, InChIKey, 화학식, 부분 구조, 상위 구조 또는 2D 유사성을 통해 화합물을 검색합니다. |
| CID를 통해 화합물의 물리화학적 속성, 설명, 동의어, 약물 유사성 및 분류를 가져옵니다. |
| CID를 통해 화합물의 2D 구조 다이어그램(PNG)을 가져옵니다. |
| 화합물의 GHS 유해성 분류 및 안전성 데이터를 가져옵니다. |
| 외부 데이터베이스 상호 참조(PubMed, 특허, 유전자, 단백질 등)를 가져옵니다. |
| 화합물의 생물학적 활성 프로필(분석 결과, 표적 및 활성 값)을 가져옵니다. |
| 생물학적 표적(유전자 기호, 단백질, 유전자 ID, UniProt 접근 번호)으로 생물학적 분석을 찾습니다. |
| PubChem 엔티티(분석, 유전자, 단백질, 분류)에 대한 요약을 가져옵니다. |
pubchem_search_compounds
5가지 검색 모드를 통해 PubChem에서 화학 화합물을 검색합니다.
식별자 조회 — 화합물 이름, SMILES 또는 InChIKey를 CID로 확인 (최대 25개 일괄 처리)
화학식 검색 — Hill 표기법으로 분자식에 따른 화합물 찾기
부분 구조/상위 구조 — 쿼리 구조를 포함하거나 쿼리 구조에 포함된 화합물 찾기
2D 유사성 — Tanimoto 유사성(임계값 설정 가능)을 통해 구조적으로 유사한 화합물 찾기
선택적으로 후속 세부 정보 호출을 피하기 위해 속성으로 결과를 하이드레이션(hydrate) 가능
pubchem_get_compound_details
CID를 통해 상세 화합물 정보를 가져옵니다.
단일 요청으로 최대 100개의 CID 일괄 처리
27가지 사용 가능한 속성: 분자량, SMILES, InChIKey, XLogP, TPSA, 복잡도, 입체 수 등
PUG View에서 텍스트 설명(약리학, 메커니즘, 치료 용도)을 선택적으로 포함
알려진 모든 동의어(상품명, 체계적 이름, 등록 번호)를 선택적으로 포함
가져온 속성에서 약물 유사성 평가(Lipinski의 5법칙 + Veber 규칙)를 선택적으로 계산
약리학적 분류(FDA 분류, 작용 메커니즘, MeSH 분류, ATC 코드)를 선택적으로 가져오기
pubchem_get_bioactivity
PubChem BioAssay에서 화합물의 생물학적 활성 프로필을 가져옵니다.
분석 결과(활성/비활성/결정 불가), 표적 정보(단백질 접근 번호, NCBI 유전자 ID) 및 정량적 값(IC50, EC50, Ki) 반환
활성 결과에 집중하기 위해 결과별 필터링 가능
요청당 최대 100개 결과로 제한 (잘 연구된 화합물은 수천 개가 있을 수 있음)
pubchem_get_summary
4가지 PubChem 엔티티 유형에 대한 설명 요약을 가져옵니다.
분석(AID), 유전자(유전자 ID), 단백질(UniProt 접근 번호), 분류(Tax ID)
호출당 최대 10개 엔티티
깔끔하고 구조화된 출력을 위한 유형별 필드 추출
Related MCP server: PubChem MCP Server
기능
@cyanheads/mcp-ts-core 기반으로 구축됨:
선언적 도구 정의 — 도구당 단일 파일, 프레임워크가 등록 및 유효성 검사 처리
모든 도구에 걸친 통합 오류 처리
플러그인 가능한 인증 (
none,jwt,oauth)교체 가능한 저장소 백엔드:
in-memory,filesystem,Supabase,Cloudflare KV/R2/D1선택적 OpenTelemetry 추적을 포함한 구조화된 로깅
로컬(stdio/HTTP) 또는 Docker를 통한 컨테이너화 실행
PubChem 전용:
PUG REST 및 PUG View API를 위한 속도 제한 클라이언트 (자동 대기열 포함 초당 5회 요청)
5xx 오류 및 네트워크 실패 시 지수 백오프를 통한 재시도
모든 도구는 읽기 전용이며 멱등성을 가짐 — API 키 불필요
시작하기
공개 호스팅 인스턴스
공개 인스턴스는 https://pubchem.caseyjhand.com/mcp에서 사용할 수 있습니다. 설치가 필요 없습니다. 스트리밍 가능한 HTTP를 통해 모든 MCP 클라이언트를 해당 주소로 지정하세요:
{
"mcpServers": {
"pubchem": {
"type": "streamable-http",
"url": "https://pubchem.caseyjhand.com/mcp"
}
}
}자체 호스팅 / 로컬
MCP 클라이언트 구성(예: claude_desktop_config.json)에 추가하세요:
{
"mcpServers": {
"pubchem": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/pubchem-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio"
}
}
}
}사전 요구 사항
Bun v1.2.0 이상 (또는 Node.js v22+)
설치
저장소 복제:
git clone https://github.com/cyanheads/pubchem-mcp-server.git디렉토리로 이동:
cd pubchem-mcp-server의존성 설치:
bun install구성
API 키가 필요하지 않습니다. PubChem의 API는 자유롭게 액세스할 수 있습니다.
변수 | 설명 | 기본값 |
| 전송 방식: |
|
| HTTP 서버용 포트. |
|
| HTTP 서버용 호스트. |
|
| 인증 모드: |
|
| 로그 레벨 (RFC 5424). |
|
| 저장소 백엔드. |
|
| OpenTelemetry 활성화. |
|
서버 실행
로컬 개발
빌드 및 실행:
bun run rebuild bun run start:stdio # or start:http검사 및 테스트 실행:
bun run devcheck # Lints, formats, type-checks bun run test # Runs test suite
Docker
docker build -t pubchem-mcp-server .
docker run -p 3010:3010 pubchem-mcp-server프로젝트 구조
디렉토리 | 목적 |
| 도구 정의 ( |
| 속도 제한 및 응답 파싱이 포함된 PubChem API 클라이언트. |
| 빌드, 정리, devcheck 및 트리 생성 스크립트. |
개발 가이드
개발 지침 및 아키텍처 규칙은 CLAUDE.md를 참조하세요. 요약하자면:
핸들러는 예외를 던지고 프레임워크가 이를 포착합니다. 도구 로직 내에서
try/catch를 사용하지 마세요.도메인별 로깅에는
ctx.log를 사용하세요.index.ts배럴 파일에 새 도구를 등록하세요.
기여
이슈 및 풀 리퀘스트를 환영합니다. 제출 전 검사를 실행하세요:
bun run devcheck
bun run test라이선스
Apache-2.0 — 자세한 내용은 LICENSE를 참조하세요.
Available Tools
10 toolspubchem_get_bioactivityGet BioactivityARead-onlyIdempotentInspect
Get a compound's bioactivity profile: which assays tested it, activity outcomes (Active/Inactive/Inconclusive), target identifiers (NCBI Gene ID, UniProt/GenBank accession), quantitative values (IC50, EC50, Ki, etc.), each assay's type (confirmatory, screening, summary, other), and the PubMed IDs it cites. Filter by outcome, a specific molecular target (NCBI Gene ID or protein accession), assay type, and/or activity name (e.g. IC50) to focus the profile, and rank by potency within the named measurements — e.g. "is this compound active against target T in confirmatory assays?" or "what is its lowest IC50 against T?".
Inputs: cid (required), sort, offset, assayType, +5 more. Returns: cap, cid, sort, error, +16 more
pubchem_get_compound_3d_structureGet Compound 3D StructureARead-onlyIdempotentInspect
Get one 3D conformer of a compound — atomic coordinates and bonds — for one CID: its default conformer, or the one conformerId names. format="json" (default) returns atoms and bonds parsed into structured fields; format="sdf" returns the raw V2000 SDF text for passthrough to docking, rendering, or conformer tools. Optionally lists the compound's other conformer IDs, each one a value for conformerId. Not every compound has computed 3D coordinates (large molecules, mixtures, and some salts do not).
Inputs: cid (required), format, maxAtoms, maxBonds, +3 more. Returns: cid, sdf, atoms, bonds, +12 more
pubchem_get_compound_detailsGet Compound DetailsARead-onlyIdempotentInspect
Get detailed compound information by CID. Returns physicochemical properties (molecular weight, SMILES, InChIKey, XLogP, TPSA, etc.), optionally with a textual description (pharmacology, mechanism, therapeutic use), known synonyms, drug-likeness assessment (Lipinski/Veber rules), and/or pharmacological classification (FDA classes, MeSH classes, ATC codes). Fetches up to 100 CIDs per call; CIDs past that are returned in unprocessed for a follow-up call.
Inputs: cids (required), properties, maxSynonyms, synonymOffset, +6 more. Returns: error, notice, compounds, truncated, +8 more
pubchem_get_compound_imageGet Compound ImageARead-onlyIdempotentInspect
Fetch a 2D structure diagram (PNG image) for a compound by CID.
Inputs: cid (required), size. Returns: cid, error, width, height, +2 more
pubchem_get_compound_interactionsGet Compound InteractionsARead-onlyIdempotentInspect
Get a compound's interaction data: drug-food interactions, and the molecular targets its bioassays name — one entry per target as kinds defines it, with its assay counts by outcome and most potent active value, Active targets first, most potent first. Each entry carries its originating source. Results are paged per kind, with the record total and the next offset reported for each. Drug-food coverage is richest for approved drugs; target covers any compound PubChem has assay data for, and pubchem_get_bioactivity lists one target's assays when given the entry's GeneID or accession. Drug-drug interactions (DrugBank) are unavailable while PubChem's SDQ service refuses automated requests: an explicit drug-drug request is reported in failedKinds while the other kinds still return.
Inputs: cid (required), kinds, offset, maxEntries. Returns: cid, error, notice, offset, +8 more
pubchem_get_compound_safetyGet Compound SafetyARead-onlyIdempotentInspect
Get GHS (Globally Harmonized System) hazard classification and safety data for one or more compounds by CID. Returns signal word, pictograms, hazard statements (H-codes), and precautionary statements (P-codes) per compound, merged across sources, plus each source's own classification — its signal word, pictograms, H-codes with ECHA notifier agreement percentages, and notification counts — since sources often disagree. Reports ECHA "Not Classified" verdicts as their own status.
Inputs: cids (required). Returns: error, notice, results, unprocessed, +3 more
pubchem_get_compound_xrefsGet Compound Cross-ReferencesARead-onlyIdempotentInspect
Get external database cross-references for a compound: PubMed citations, patent IDs, gene associations, CAS and EC numbers with the number of source records that deposited each, other registry numbers, and taxonomy IDs. Results are paged per type — capped at maxPerType with the total count reported; reach the IDs past a page with offset. PubMed IDs come highest (most recently assigned) first and the other numeric types in ascending order; CAS and EC come most-attested first; the other string IDs keep PubChem's order. A type that fails to load is named in failedTypes while the others still return; the call fails only when a type fails and no type other than ProteinGI (which PubChem no longer serves) loads.
Inputs: cid (required), xrefTypes (required), offset, maxPerType. Returns: cid, error, xrefs, notice, +5 more
pubchem_get_summaryGet Entity SummaryARead-onlyIdempotentInspect
Get descriptive summaries for PubChem entities by ID. Supports assays (AID), genes (Gene ID), proteins (UniProt accession), and taxonomy (Tax ID). Up to 10 per call; identifiers past that are returned in unprocessed for a follow-up call.
Inputs: entityType (required), identifiers (required). Returns: error, notice, summaries, entityType, +4 more
pubchem_search_assaysSearch AssaysARead-onlyIdempotentInspect
Find PubChem bioassays associated with a biological target. Search by gene symbol (e.g. "EGFR"), protein name, NCBI Gene ID, or UniProt accession. Returns a page of assay IDs (AIDs) — page past maxResults with offset — which can be explored further with pubchem_get_summary.
Inputs: targetType (required), targetQuery (required), offset, maxResults. Returns: cap, aids, error, shown, +8 more
pubchem_search_compoundsSearch CompoundsARead-onlyIdempotentInspect
Search PubChem for chemical compounds by identifier (name, SMILES, InChI, or InChIKey, up to 25 per call), molecular formula in Hill notation, substructure or superstructure containment, 2D Tanimoto similarity, the compounds a bioassay (AID) found active or tested, or an accurate mass or molecular weight range. Returns a page of CIDs, each similarity hit with its Tanimoto score — reach matches past maxResults with offset. Optionally hydrate results with properties to avoid a follow-up pubchem_get_compound_details call.
Inputs: searchType (required), aid, query, offset, +12 more. Returns: cap, error, shown, notice, +11 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool targets a distinct facet of PubChem data (search, details, 3D conformer, image, safety, xrefs, bioactivity, interactions, assay search, summaries), and the descriptions explicitly disambiguate the closest pairs: bioactivity is per-assay/per-target measurement data while interactions is per-target aggregation plus drug-food data. The main soft overlaps are pubchem_search_assays vs. pubchem_get_summary (AID) and the optional property hydration in pubchem_search_compounds vs. pubchem_get_compound_details, but these are explained clearly enough to guide selection.
All tools share a pubchem_ prefix and use verb_noun form (search_/get_), which is highly predictable. There are minor deviations: most follow get_compound_X but pubchem_get_bioactivity drops the compound_ segment, and pubchem_get_summary names no resource at all, so the resource is not always inferable from the name alone.
Ten tools is squarely in the well-scoped range for a chemical database server, and each one covers a distinct data type (search, properties, 3D, image, safety, xrefs, bioactivity, interactions, assays, summaries) without redundant entries.
The surface covers the full compound lifecycle: discovery (search by name/SMILES/formula/similarity/substructure), enrichment (properties, synonyms, drug-likeness, classification), structure (2D image, 3D conformer), safety, cross-references, bioactivity, target interactions, and assay lookup. No obvious dead ends for the stated PubChem domain; the only gap is a dedicated assay-detail tool, which pubchem_get_summary partially fills.
Maintenance
Related MCP Connectors
Link compounds to protein targets, rank bioactivity, and look up drug mechanisms and indications.
FTIR spectral search and material identification for AI agents via MCP.
Connect AI clients to biomedical data and tools.
Web knowledge fetching tools for your agent.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables comprehensive access to PubChem's chemical database with over 110 million compounds. Supports chemical searches, structure analysis, bioactivity data, safety information, and molecular property calculations through 30 specialized tools.30MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to search and retrieve chemical compound information, structures, and physical properties from the PubChem database. It supports querying via compound names, SMILES notation, or CIDs to provide detailed molecular data for chemical analysis.5-
- FlicenseBqualityDmaintenanceExtracts basic chemical information and drug data from the PubChem API. It enables users to retrieve molecular details such as SMILES, IUPAC names, molecular formulas, and synonyms for specific compounds.311-
- AlicenseNot gradedqualityCmaintenanceProvides access to the NIH PubChem chemistry compound database, enabling queries for compound synonyms and other data through natural language.76 npmMIT