Wraps the PubChem REST APIs to let Claude search chemical compounds, pull properties, safety data, bioactivity profiles, and cross-references without leaving the conversation. You get 10 tools covering identifier lookup (name, SMILES, InChIKey), substructure and similarity searches, GHS hazard classification, drug interaction data, and BioAssay queries. Results include molecular descriptors, 2D/3D structures, pharmacological classifications, and links to external databases like DrugBank and ChEMBL. Ships with both stdio and a public HTTP endpoint at pubchem.caseyjhand.com, so you can skip the local install. Built on the author's mcp-ts-core framework with rate limiting and retry logic baked in. Useful for chemistry research, drug discovery workflows, or any task that needs programmatic access to one of the largest open chemical databases.
claude mcp add --transport http pubchem https://pubchem.caseyjhand.com/mcpRun in your terminal. Add --scope user to make it available in every project.
Review the command, arguments, and environment values before installing — MCP servers run with your local permissions.
Verified live against the running server on Jun 10, 2026.
pubchem_search_compoundsSearch PubChem for chemical compounds by identifier (name, SMILES, or InChIKey, batched up to 25), molecular formula in Hill notation, substructure or superstructure containment, or 2D Tanimoto similarity. Optionally hydrate results with properties to avoid a follow-up pubchem...10 paramsSearch PubChem for chemical compounds by identifier (name, SMILES, or InChIKey, batched up to 25), molecular formula in Hill notation, substructure or superstructure containment, or 2D Tanimoto similarity. Optionally hydrate results with properties to avoid a follow-up pubchem...
querystringformulastringqueryTypestringsmiles · cidthresholdnumbermaxResultsnumberpropertiesarraysearchType*stringidentifier · formula · substructure · superstructure · similarityidentifiersarrayidentifierTypestringname · smiles · inchikeyallowOtherElementsbooleanpubchem_get_compound_detailsGet detailed compound information by CID. Returns physicochemical properties (molecular weight, SMILES, InChIKey, XLogP, TPSA, etc.), optionally with a textual description (pharmacology, mechanism, therapeutic use), all known synonyms, drug-likeness assessment (Lipinski/Veber...7 paramsGet detailed compound information by CID. Returns physicochemical properties (molecular weight, SMILES, InChIKey, XLogP, TPSA, etc.), optionally with a textual description (pharmacology, mechanism, therapeutic use), all known synonyms, drug-likeness assessment (Lipinski/Veber...
cids*arraypropertiesarrayincludeSynonymsbooleanmaxDescriptionsintegerincludeDescriptionbooleanincludeDrugLikenessbooleanincludeClassificationbooleanpubchem_get_compound_imageFetch a 2D structure diagram (PNG image) for a compound by CID.2 paramsFetch a 2D structure diagram (PNG image) for a compound by CID.
cid*integersizestringsmall · largedefault: largepubchem_get_compound_3d_structureGet a compound's default 3D conformer — atomic coordinates and bonds — for one CID. format="json" (default) returns parsed atoms and bonds the model can reason over directly; format="sdf" returns the raw V2000 SDF text for passthrough to docking, rendering, or conformer tools....3 paramsGet a compound's default 3D conformer — atomic coordinates and bonds — for one CID. format="json" (default) returns parsed atoms and bonds the model can reason over directly; format="sdf" returns the raw V2000 SDF text for passthrough to docking, rendering, or conformer tools....
cid*integerformatstringsdf · jsondefault: jsonincludeAlternateConformerIdsbooleanpubchem_get_compound_xrefsGet external database cross-references for a compound: PubMed citations, patent IDs, gene/protein associations, registry numbers, and taxonomy IDs. Results are capped per type with total counts reported.3 paramsGet external database cross-references for a compound: PubMed citations, patent IDs, gene/protein associations, registry numbers, and taxonomy IDs. Results are capped per type with total counts reported.
cid*integerxrefTypes*arraymaxPerTypenumberpubchem_get_compound_safetyGet 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. Data sourced from PubChem depositors — source attribu...1 paramsGet 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. Data sourced from PubChem depositors — source attribu...
cids*arraypubchem_get_bioactivityGet a compound's bioactivity profile: which assays tested it, activity outcomes (Active/Inactive/Inconclusive), target identifiers (NCBI Gene ID, UniProt/GenBank accession), and quantitative values (IC50, EC50, Ki, etc.). Filter by outcome and/or a specific molecular target (N...5 paramsGet a compound's bioactivity profile: which assays tested it, activity outcomes (Active/Inactive/Inconclusive), target identifiers (NCBI Gene ID, UniProt/GenBank accession), and quantitative values (IC50, EC50, Ki, etc.). Filter by outcome and/or a specific molecular target (N...
cid*integermaxResultsnumbertargetGeneIdintegeroutcomeFilterstringactive · inactive · alldefault: alltargetAccessionstringpubchem_get_compound_interactionsGet a compound's interaction data: drug-drug interactions (DrugBank), drug-food interactions, and chemical-target interactions (binding/activity from BindingDB, ChEMBL, and others). Each entry carries its originating source. Richest for approved drugs; many compounds have no d...3 paramsGet a compound's interaction data: drug-drug interactions (DrugBank), drug-food interactions, and chemical-target interactions (binding/activity from BindingDB, ChEMBL, and others). Each entry carries its originating source. Richest for approved drugs; many compounds have no d...
cid*integerkindsarraymaxEntriesintegerpubchem_search_assaysFind PubChem bioassays associated with a biological target. Search by gene symbol (e.g. "EGFR"), protein name, NCBI Gene ID, or UniProt accession. Returns assay IDs (AIDs) which can be explored further with pubchem_get_summary.3 paramsFind PubChem bioassays associated with a biological target. Search by gene symbol (e.g. "EGFR"), protein name, NCBI Gene ID, or UniProt accession. Returns assay IDs (AIDs) which can be explored further with pubchem_get_summary.
maxResultsnumbertargetType*stringgenesymbol · proteinname · geneid · proteinaccessiontargetQuery*stringpubchem_get_summaryGet 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.2 paramsGet 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.
entityType*stringassay · gene · protein · taxonomyidentifiers*arraySearch the PubChem chemical database for compounds, properties, safety data, bioactivity, cross-references, and entity summaries via MCP. STDIO or Streamable HTTP.
Public Hosted Server: https://pubchem.caseyjhand.com/mcp
Ten tools for querying PubChem's chemical information database:
| Tool Name | Description |
|---|---|
pubchem_search_compounds | Search for compounds by name, SMILES, InChIKey, formula, substructure, superstructure, or 2D similarity. |
pubchem_get_compound_details | Get physicochemical properties, descriptions, synonyms, drug-likeness, and classification for compounds by CID. |
pubchem_get_compound_image | Fetch a 2D structure diagram (PNG) for a compound by CID. |
pubchem_get_compound_3d_structure | Fetch a 3D conformer (atomic coordinates and bonds) for a compound by CID, as parsed JSON or raw SDF. |
pubchem_get_compound_xrefs | Get external database cross-references (PubMed, patents, genes, proteins, etc.). |
pubchem_get_compound_safety | Get GHS hazard classification and safety data for one or more compounds by CID (batch). |
pubchem_get_bioactivity | Get a compound's bioactivity profile: assay results, targets, and activity values; filter by outcome or molecular target. |
pubchem_get_compound_interactions | Get drug-drug, drug-food, and chemical-target interactions for a compound by CID. |
pubchem_search_assays | Find bioassays by biological target (gene symbol, protein, Gene ID, UniProt accession). |
pubchem_get_summary | Get summaries for PubChem entities: assays, genes, proteins, taxonomy. |
pubchem_search_compoundsSearch PubChem for chemical compounds across five search modes.
pubchem_get_compound_detailsGet detailed compound information by CID.
pubchem_get_bioactivityGet a compound's bioactivity profile from PubChem BioAssay.
pubchem_get_summaryGet descriptive summaries for four PubChem entity types.
pubchem_get_compound_interactionsGet a compound's interaction data by CID.
pubchem_get_compound_3d_structureGet a compound's default 3D conformer by CID.
format="json" returns parsed atoms (element + x/y/z) and bonds for direct reasoning; format="sdf" returns raw V2000 SDF for passthrough to docking or renderingCompound and assay records are also exposed as URI-templated MCP resources, backed by the same client methods as the tools:
| URI Template | Returns |
|---|---|
pubchem://compound/{cid} | Core physicochemical properties (JSON). |
pubchem://compound/{cid}/safety | GHS hazard classification (JSON). |
pubchem://compound/{cid}/image | 2D structure diagram (PNG). |
pubchem://compound/{cid}/xrefs | External cross-references (JSON). |
pubchem://compound/{cid}/bioactivity | Bioassay activity profile (JSON). |
pubchem://assay/{aid} | BioAssay summary (JSON). |
Built on @cyanheads/mcp-ts-core:
none, jwt, oauth)in-memory, filesystem, Supabase, Cloudflare KV/R2/D1PubChem-specific:
A public instance is available at https://pubchem.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP:
{
"mcpServers": {
"pubchem-mcp-server": {
"type": "streamable-http",
"url": "https://pubchem.caseyjhand.com/mcp"
}
}
}
Add to your MCP client config (e.g., claude_desktop_config.json):
{
"mcpServers": {
"pubchem-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/pubchem-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio"
}
}
}
}
git clone https://github.com/cyanheads/pubchem-mcp-server.git
cd pubchem-mcp-server
bun install
No API keys are required — PubChem's API is freely accessible.
| Variable | Description | Default |
|---|---|---|
MCP_TRANSPORT_TYPE | Transport: stdio or http. | stdio |
MCP_HTTP_PORT | Port for HTTP server. | 3010 |
MCP_HTTP_HOST | Host for HTTP server. | localhost |
MCP_AUTH_MODE | Auth mode: none, jwt, or oauth. | none |
MCP_LOG_LEVEL | Log level (RFC 5424). | info |
STORAGE_PROVIDER_TYPE | Storage backend. | in-memory |
OTEL_ENABLED | Enable OpenTelemetry. | false |
Build and run:
bun run rebuild
bun run start:stdio # or start:http
Run checks and tests:
bun run devcheck # Lints, formats, type-checks
bun run test # Runs test suite
docker build -t pubchem-mcp-server .
docker run -p 3010:3010 pubchem-mcp-server
| Directory | Purpose |
|---|---|
src/mcp-server/tools/definitions/ | Tool definitions (*.tool.ts). |
src/services/pubchem/ | PubChem API client with rate limiting and response parsing. |
scripts/ | Build, clean, devcheck, and tree generation scripts. |
See CLAUDE.md for development guidelines and architectural rules. The short version:
try/catch in tool logicctx.log for domain-specific loggingindex.ts barrel fileIssues and pull requests are welcome. Run checks before submitting:
bun run devcheck
bun run test
Apache-2.0 — see LICENSE for details.
MCP_LOG_LEVELdefault: infoSets the minimum log level for output (e.g., 'debug', 'info', 'warn').
MCP_HTTP_HOSTdefault: 127.0.0.1The hostname for the HTTP server.
MCP_HTTP_PORTdefault: 3010The port to run the HTTP server on.
MCP_HTTP_ENDPOINT_PATHdefault: /mcpThe endpoint path for the MCP server.
MCP_AUTH_MODEdefault: noneAuthentication mode to use: 'none', 'jwt', or 'oauth'.
com.mcparmory/google-search
io.github.pipeworx-io/brave-search
marcopesani/mcp-server-serper
brave/brave-search-mcp-server
com.mcparmory/google-search-console
acamolese/google-search-console-mcp