pubchem-mcp-server
PubChem MCP server — search PubChem chemistry data (compounds, properties, safety, bioactivity, xrefs, summaries) over MCP via 10 read-only tools, 6 resources, and 1 skill.
Search compounds by name/SMILES/InChI/InChIKey (25 per call), formula, substructure/superstructure, 2D similarity (with Tanimoto scores), bioassay AID, or monoisotopic/exact/molecular-weight range — paged, optionally hydrating properties inline.
Get compound details for up to 100 CIDs: 27 physicochemical properties (default 15), descriptions, synonyms, Lipinski/Veber drug-likeness, and FDA/MeSH/ATC classification, with per-CID
foundflags.Fetch 2D structure images (100x100 or 300x300 PNG, base64) for a CID.
Fetch 3D conformers as parsed JSON (atoms/bonds, capped preview) or raw V2000 SDF, by default conformer or a named
conformerId; lists alternate conformers.Get cross-references (CAS, EC, RN, RegistryID, PatentID, PubMedID, GeneID, ProteinGI, TaxonomyID) with per-type paging, totals, and CAS/EC source counts.
Get safety data (batch up to 25 CIDs): merged GHS signal word, pictograms, H-codes, P-codes plus per-source classifications, with statuses distinguishing
cid_not_found/no_ghs_data/not_classified.Get bioactivity profiles: assays, outcomes, targets, activity values, assay types, PubMed IDs; filter by outcome, Gene ID, accession, assay type, or activity name, and rank by potency (e.g. lowest IC50).
Get interactions: drug-food interactions and per-target assay summaries (counts by outcome, most potent active value), paged per kind; drug-drug is reported unavailable.
Search assays by gene symbol, protein name, Gene ID, or UniProt accession, returning paged AIDs.
Get entity summaries for assays, genes, proteins, and taxonomy (up to 10 IDs per call), including assay method, targets, counts, and depositor comments.
Resources expose compound properties, safety, image, xrefs, bioactivity, and assay summaries at URI templates (
pubchem://compound/{cid},pubchem://assay/{aid}), plus apubchem-guideskill on identifier chains, salt vs parent CIDs, and reading activity/GHS data.Agent-friendly: read-only and idempotent, no API keys, typed error reasons with recovery hints, batch caps disclosed via
cappedInputs/unprocessed, and graceful per-item failures.
Provides access to PubChem's chemical information database, enabling searches for chemical compounds by identifier, structure, similarity, and molecular formula. Retrieves compound properties, structural images, substance details, bioassay summaries, and cross-references to external databases including PubMed.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@pubchem-mcp-server search for aspirin and get its molecular weight"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Public Hosted Server: https://pubchem.caseyjhand.com/mcp
Overview
Chemical compounds and bioassays from PubChem. Search compounds by name, formula, or structure; fetch properties, safety data, bioactivity, drug-food interactions, molecular targets, and 3D structures; and find bioassays by biological target.
Tools
Tool | Description |
| Search for compounds by name, SMILES, InChI, InChIKey, formula, substructure, superstructure, 2D similarity (each hit with its Tanimoto score), or accurate mass or molecular weight range, or list the compounds a bioassay found active. |
| Get physicochemical properties, descriptions, synonyms, drug-likeness, and classification for compounds by CID. |
| Fetch a 2D structure diagram (PNG) for a compound by CID. |
| Fetch a 3D conformer (atomic coordinates and bonds) for a compound by CID, its default or a conformer you name, as parsed JSON or raw SDF. |
| Get external database cross-references (PubMed, patents, genes, CAS and EC numbers, etc.). |
| Get GHS hazard classification and safety data for one or more compounds by CID (batch). |
| Get a compound's bioactivity profile: assay results, targets, activity values, assay types, and cited PubMed IDs; filter by outcome, molecular target, assay type, or activity name, and rank by potency. |
| Get a compound's drug-food interactions and the molecular targets its assays name, each with assay counts and the most potent active value. |
| Find bioassays by biological target (gene symbol, protein, Gene ID, UniProt accession). |
| Get summaries for PubChem entities: assays, genes, proteins, taxonomy. |
Resources
Compound and assay records are also exposed as URI-templated resources, backed by the same client methods as the tools; many MCP clients are tool-only and never surface resources.
Resource | Description |
| Core physicochemical properties (JSON). |
| GHS hazard classification (JSON). |
| 2D structure diagram (PNG). |
| External cross-references (JSON). |
| Bioassay activity profile (JSON). |
| BioAssay summary (JSON). |
Skills
The server publishes an agent skill, pubchem-guide, covering gates and identifier chains the tool descriptions don't carry: salt vs parent CIDs, where Gene IDs and accessions come from, why gene-symbol, Gene ID, and accession searches disagree, and how to read activity labels, potency values, and GHS data. Plugin installs (Claude Code, Codex) and the .mcpb bundle pick it up from skills/, and the server also serves it over MCP as skill://pubchem-guide/SKILL.md.
Related MCP server: PubChem MCP Server
Capability reference
pubchem_search_compounds tool
Seven search strategies: identifier (
identifierType+identifiers; name/SMILES/InChI/InChIKey, 25 per call, the rest returned inunprocessed; aquerysent withoutidentifiersis read as the one identifier, with a notice), formula (formula, Hill notation, optionalallowOtherElements), substructure/superstructure and 2D similarity (query+queryType; similarity threshold 70-100, default 90), assay (aid; compounds the bioassay marked active, or every compound tested withactiveOnly: false), or mass (massTypeofmonoisotopic_mass,exact_mass, ormolecular_weight, with an inclusivemassMin/massMaxwindow in daltons;exact_massdiffers frommonoisotopic_massfor Cl- and Br-rich compounds and molecules of about 90 or more carbons). Mass matches come in PubChem's order, not ranked by closeness to a target massEach similarity hit carries
similarity, PubChem's own Tanimoto score (0 to 1, three decimals) from the 881-bitFingerprint2Dfingerprint. Hits are not ranked by score, so raisethresholdto narrow to closer analogs; a score of 1 means a fingerprint identical to the query's, not an identical compound (isotopologues and some positional isomers score 1). The fingerprints ride the page's property request, one extra request per page whenpropertiesis not set (a SMILES query adds one for its own fingerprint, sent alongside); if a lookup made only for scoring fails, the page returns unscored with a retry notice, and a hit or query with no fingerprint (a SMILES PubChem has no record of, for one) goes unscored with the reason in the noticeUp to 200 CIDs per page (default 20; a larger
maxResultsis served at 200 and reported incappedInputs);offsetpages identifier, assay, and mass searches to the end of their matches, and formula, substructure, superstructure, and similarity searches to 10,000 (deeper fails withoffset_ceiling_exceeded). A mass search counts and pages at most 1,000,000 matches, reported astotalFoundAtLeastwith a notice to narrow the window. Optionalpropertiessaves a follow-uppubchem_get_compound_detailscall, and takesSMILESandConnectivitySMILESas the details tool doesReports
totalFound, or atotalFoundAtLeastfloor when an upstream search saturated, andunresolvedIdentifiersfor inputs with no CID. Fails withaid_not_foundfor an unknown AID andsearch_query_rejected(with a hint) for a query PubChem cannot search. A mass search fails withmissing_mass_argswhenmassType,massMin, ormassMaxis absent,inverted_mass_windowwhenmassMinexceedsmassMax, andmass_search_timeoutfor a window hundreds of daltons wide
pubchem_get_compound_details tool
Up to 100 CIDs per call (the rest returned in
unprocessed);cidsalso takes a lone CID, numeric strings, or the keycid27 available properties, defaulting to a core set of 15 that opens with
Title, PubChem's display name for the record (an emptypropertieslist reads as that set; a property PubChem has no value for is left out of the record). PubChem's current namesSMILESandConnectivitySMILESare accepted and returned asIsomericSMILESandCanonicalSMILESOptional descriptions (
descriptionOffset/maxDescriptions, default 3, max 20) and classification (FDA, MeSH, ATC; MeSH classes come as{ name, description }, the heading and its scope note) cover the first 10 CIDs only, the rest listed inskippedCids. Optional synonyms (synonymOffset/maxSynonyms, default 20, max 100) and a Lipinski/Veber drug-likeness check cover every found CIDPer-CID
found: falseseparates a nonexistent CID from a compound with no data; a real compound that lacks every requested property returnsfound: truewith an emptypropertiesrecord
pubchem_get_compound_image tool
Single CID;
sizeis"small"(100x100) or"large"(300x300, default)Returns base64-encoded PNG plus width/height
Typed
cid_not_founderror when PubChem has no record for the CID
pubchem_get_compound_3d_structure tool
Single CID;
format="json"(default) returns parsed atoms (element + x/y/z) and bonds,format="sdf"returns the raw V2000 SDF textReturns the compound's default conformer, or the one
conformerIdnames (16 hex digits whose first 8 are the CID, either case); the response'sconformerIdsays which was returned. A malformed ID or one owned by another CID fails asinvalid_conformer_idbefore any request, and one PubChem doesn't hold fails asconformer_not_foundmaxAtoms/maxBondscap the JSON preview (default 200 each);atomCount/bondCountalways report the full totals, with any capping disclosed via enrichmentincludeRawSdfbypasses the default 500-line cap on the raw SDF textOptional
includeAlternateConformerIdslists the compound's other conformer IDs (alternateConformerIds, the default included when another was requested), each a value forconformerIdTyped
no_3d_structureerror when PubChem has no computed 3D coordinates (large molecules, mixtures, some salts)
pubchem_get_compound_xrefs tool
Single CID; one or more
xrefTypes:CAS,EC,RN,RegistryID,PatentID,PubMedID,GeneID,ProteinGI,TaxonomyIDCASandECare the numbers deposited for the compound, every distinct value ordered by how many source records deposited it, with those counts insourceCounts.RNis PubChem's unranked registry-number list: the CAS number sits beside deprecated and related CAS RNs and EC numbersProteinGIcurrently returns no data from PubChem; useGeneIDfor gene/protein associationsmaxPerTypeup to 500 (default 50), with oneoffsetapplied to every type; each type reportstotalAvailableandtruncated.PubMedIDcomes newest firstA type that fails to load is named in
failedTypesand the others still return; the call fails only when a type fails and no type other than ProteinGI (which PubChem no longer serves) loads. An empty result says whether the compound has none of the requested types or the CID may be mistyped
pubchem_get_compound_safety tool
Up to 25 CIDs per call (the rest returned in
unprocessed);cidsalso takes a lone CID, numeric strings, or the keycidReturns the GHS signal word, pictograms, H-codes, and P-codes merged across sources, plus
classifications[]with each source's own label; precautionary statements carry adecodedflagPer-CID
status:ok,not_classified(notifiers found no GHS hazard),no_ghs_data(no deposited classification), orcid_not_found, so a bad CID never reads as "no hazards on file"
pubchem_get_bioactivity tool
Single CID; filter by
outcomeFilter(active/inactive/all, defaultall),targetGeneId/targetAccession,assayType(any ofconfirmatory/screening/summary/other), andactivityName(whole measurement names such as["IC50"], case-insensitive; keeps assays whose reported target has a value with that name and narrows itsactivityValuesto the matches); an assay must pass every filter setsort: "potency"orders by lowest kept activity value first (ties to the lower AID) and needsactivityName, else it fails asmissing_activity_name; the defaulttableorder is not ranked by potency.offsetapplies after every filter and the sort, andfilteredCountcounts after the activity-name filter. The strongest IC50 against a target is one call:activityName: ["IC50"],sort: "potency",maxResults: 1A target filter matches any identifier tied to the same target, so Gene ID 5742, UniProt P23219, and RefSeq NP_542158 all reach the same COX-1 assays
Each result carries the assay's
assayTypeand the PubMed IDs it cites (pmids, newest first)Up to 100 results per page (default 20);
offsetreaches the rest. A multi-target assay reports the matched target and lists the others underotherTargetsReports
totalAssays/activeCount/inactiveCountfor the whole compound andfilteredCount/returnedCountfor the page; notices say whether there is no data, the filter excluded everything (an activity-name miss lists the names those assays carry), oroffsetis past the end
pubchem_get_compound_interactions tool
Single CID; one or more
kinds—drug-food(PUG View),target,drug-drug(DrugBank); default["drug-food"]. When the drug-food request answers that PubChem has no record for the CID, the notice says so and points atpubchem_search_compounds; for a CID that has a record, an empty drug-food page points attarget, and an empty target-only or drug-drug-only page (no drug-food answer to tell the two apart) adds a verify-the-CID hinttargetgives one entry per target the compound's assay summary names: a Gene ID with the accessions the table pairs with it, or an identifier it never pairs. A Gene ID and an accession that no row pairs are separate entries even when they name the same protein (erlotinib's ERBB2 appears asaccession:P04626and asGeneID:2064). Each entry names the target from a batched gene or protein summary lookup, plus theGeneID:oraccession:valuepubchem_get_bioactivityfilters on, and states the assay counts by outcome and the most potent Active value with its AID. Active targets come first, most potent first. If a name lookup fails or does not answer within a few seconds, the entries keep their identifier and the notice says somaxEntriesper kind per page (max 50, default 10);offsetcounts records (targets, fortarget), up to 2,147,483,646. Each kind pages independently, reported inpaging[](totalRecords/nextOffset/truncated)A kind that fails is named in
failedKindsand the others still return. The notice offers a retry only for a failure a retry can clear (timeout, rate limit, network error, unreadable response, 5xx other than 501); an HTTP 400, 403, or 501, or a response in a shape the server does not expect, fails the same way on every call.drug-drugcomes from PubChem's SDQ service, which refuses automated requests, so it lands infailedKindsand a retry will not help
pubchem_search_assays tool
Search by
targetType:genesymbol/proteinname(text),geneid(NCBI Gene ID),proteinaccession(UniProt)A
genesymbolmatches across species.geneidandproteinaccessioneach pin one protein but return overlapping, different assay sets for it; union both for a complete listUp to 200 AIDs per page (default 50);
offsetpages through the resultsRejects a blank
targetQueryand a non-numericgeneid; atargetQueryPubChem refuses with HTTP 400 (one carrying a line break, another C0 control character other than tab and NUL, or DEL) fails astarget_query_rejectedReports
totalFoundand distinguishes "no match" from "offset past the end"
pubchem_get_summary tool
entityType:assay(AID),gene(NCBI Gene ID),protein(UniProt accession), ortaxonomy(Tax ID); up to 10 identifiers per callA comma-joined string is split into identifiers; any past the first 10 are returned in
unprocessed, and more than 1000 fails astoo_many_identifiersAIDs, Gene IDs, and Tax IDs must be positive integers up to 2147483647; other pieces get an
invalid: truerow, and the call fails asinvalid_identifieronly when none is usablePer-identifier
foundflag; fields depend onentityType(taxonomy: orderedlineage; gene:symbol/taxonomy; assay:method, the first 25targetswithtargetCount, tested/active compound counts,lastDataChange, the depositor'scomment(often the Active threshold, citation, or target notes) andsourceId(their own assay ID, e.g. a ChEMBL ID) when recorded)
pubchem://compound/{cid} resource
Core physicochemical properties (the same default 15-property set as
pubchem_get_compound_details), asapplication/jsonThrows a typed not-found when the CID doesn't exist in PubChem
Use
pubchem_get_compound_detailsto select specific properties or add descriptions, synonyms, drug-likeness, and classification
pubchem://compound/{cid}/safety resource
GHS hazard classification as
application/json, including the per-sourceghs.classificationsand the contributorsourceliststatus(ok/not_classified/no_ghs_data/cid_not_found) is the only signal distinguishing a bad CID from a compound with no deposited classification — a resource read has no notice surface
pubchem://compound/{cid}/image resource
2D structure diagram, 300x300 PNG, returned as a base64 blob
Use
pubchem_get_compound_imagefor the 100x100 size option
pubchem://compound/{cid}/xrefs resource
Focused default set —
RN,RegistryID,PubMedID,CAS(withsourceCounts) — up to 25 IDs per type, asapplication/json; the PubMed IDs are the 25 highest (most recently assigned), highest first. A type that fails to load is named infailedTypesUse
pubchem_get_compound_xrefsfor the full set of xref types, a higher per-type cap, and offset paging
pubchem://compound/{cid}/bioactivity resource
Up to 25 assays as
application/json, each with itsassayTypeandpmids, plustotalAssays/activeCountfor the whole compound; a multi-target assay lists its further targets underotherTargetsUse
pubchem_get_bioactivityto filter by outcome, target, assay type, or activity name, rank by potency, raise the cap, or page with offset
pubchem://assay/{aid} resource
BioAssay summary as
application/json— name, description, source, protocol, substance countsThrows a typed not-found when the AID doesn't exist
Features
Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
PubChem-specific:
Covers PUG REST and PUG View endpoints, plus SDQ for drug-drug interactions
Rate-limited client (5 req/s) with request queuing and one retry on transient failures
A 50 s budget per call fails a slow upstream as
Timeout, and a cancelled call fails withRequestCancelledBuilt-in V2000 SDF parser for 3D conformers; drug-likeness computed from already-fetched properties
All tools are read-only and idempotent, with no API keys required
Agent-friendly output:
Per-CID
statusandfoundflags let callers branch on data instead of matching error stringsBatch tools return per-item results alongside
unresolvedIdentifiers,skippedCids,failedKinds, andfailedTypesrather than failing the whole callCapped lists disclose
truncated,shown/cap, andnextOffset; oversized batches are served up to the cap, withcappedInputsandunprocessedreporting the restFailures carry a typed
reason(e.g.cid_not_found,missing_identifier_args,invalid_cid_query) with recovery text
Getting started
Public Hosted Instance
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"
}
}
}Self-Hosted / Local
Add the following to your MCP client configuration file.
{
"mcpServers": {
"pubchem-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/pubchem-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio"
}
}
}
}Or with npx (no Bun required):
{
"mcpServers": {
"pubchem-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/pubchem-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio"
}
}
}
}Or with Docker:
{
"mcpServers": {
"pubchem-mcp-server": {
"type": "stdio",
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/pubchem-mcp-server:latest"]
}
}
}For Streamable HTTP, set the transport and start the server:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
# Server listens at http://localhost:3010/mcpPrerequisites
Bun v1.4.4 or higher (or Node.js v24+).
No API keys required — PubChem's API is freely accessible.
Installation
Clone the repository:
git clone https://github.com/cyanheads/pubchem-mcp-server.gitNavigate into the directory:
cd pubchem-mcp-serverInstall dependencies:
bun installConfigure environment (optional):
cp .env.example .env
# edit .env to override transport, session mode, storage, or logging defaultsConfiguration
Variable | Description | Default |
| Transport: |
|
| Port for HTTP server. |
|
| Host for HTTP server. |
|
|
|
|
| Auth mode: |
|
| Log level (RFC 5424). |
|
| Storage backend. |
|
| Enable OpenTelemetry. |
|
See .env.example for the full list of optional overrides.
Running the server
Local development
Build and run:
# One-time build bun run rebuild # Run the built server bun run start:stdio # or bun run start:httpRun checks and tests:
bun run devcheck # Lint, format, typecheck, security bun run test # Vitest test suite bun run lint:mcp # Validate MCP definitions against spec
Docker
docker build -t pubchem-mcp-server .
docker run --rm -p 3010:3010 pubchem-mcp-serverThe Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/pubchem-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.
Project structure
Directory | Purpose |
|
|
| Tool definitions ( |
| Resource definitions ( |
| PubChem API client — rate limiting, retry, and response/SDF parsing. |
| Build, clean, devcheck, and tree generation scripts. |
| Unit and integration tests. |
Development guide
See CLAUDE.md for development guidelines and architectural rules. The short version:
Handlers throw, framework catches — no
try/catchin tool logicUse
ctx.logfor request-scoped loggingWrap external API calls: validate the raw PubChem response → normalize to a domain type → return the output schema; never fabricate missing fields
Register new tools and resources in the
index.tsbarrel files
Contributing
Issues are welcome. Run checks before submitting:
bun run devcheck
bun run testLicense
Apache-2.0 — see LICENSE for details.
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.
Patent search, inventor search, patents-by-assignee and full patent detail as agent tools.
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.74 npmMIT