← Back to directory
P

PubChem MCP Server

Community
Search the PubChem chemical database for compounds, properties, safety data, bioactivity, and cross-references via MCP. STDIO or Streamable HTTP.
GitHub source repository ↗
★ 9 Stars Category · Database Popular Source revision 9e160e4daf9c
59FMRS · C

This is a feature-rich and well-documented server for users wanting to integrate PubChem data into AI workflows. It offers a comprehensive set of tools and resources with easy setup. Note that it is not an official PubChem project, and the public endpoint is community-hosted.

Reliability
10/20
Security and permissions
12/20
Maintenance
10/20
Documentation
14/20
Setup experience
13/20
Read the FMRS scoring method →

PubChem MCP Server is a community-maintained server that enables AI assistants to query the PubChem chemical database. It provides tools for searching compounds by name, structure, etc., fetching detailed information, images, 3D structures, external cross-references, safety data, bioactivity, interactions, and entity summaries. It also exposes resources for direct access to compound and assay data. It supports Streamable HTTP and can be used via a public hosted instance or self-hosted locally over stdio or HTTP. No API keys are required, and all tools are read-only.

Tools

pubchem_search_compounds
Search for compounds by name, SMILES, InChIKey, formula, substructure, superstructure, or 2D similarity.
pubchem_get_compound_details
Get detailed information for compounds by CID: properties, descriptions, synonyms, drug-likeness, and classification.
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.
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.

Setup

Install Bun v1.3.0 or higher (or Node.js v24+). Then add a configuration to your MCP client (e.g., claude_desktop_config.json) with type 'stdio', command 'bunx', and args ['@cyanheads/pubchem-mcp-server@latest']. No API keys are required.

claude_desktop_config.json
{
  "mcpServers": {
    "pubchem-mcp-server": {
      "type": "stdio",
      "command": "bunx",
      "args": [
        "@cyanheads/pubchem-mcp-server@latest"
      ],
      "env": {
        "MCP_TRANSPORT_TYPE": "stdio"
      }
    }
  }
}

Fit and risk

Best for

  • Researchers and developers integrating chemical database queries into LLM-driven tools.
  • Those preferring a public hosted endpoint or self-hosting their own MCP server.

Not for

  • Clinical applications requiring rich drug interaction coverage (the report covers mostly approved drugs).
  • Use cases needing write access or data ingestion (the server is read-only).

Required permissions

  • Reads PubChem public APIs; no authentication required.
  • Optional environment variables for logging/HTTP configuration.

Risks and side effects

  • The public hosted instance's availability may vary (not officially affiliated).
  • Deep pagination may incur additional upstream requests and potential rate limits.
  • Error handling depends on remote service reliability.

Troubleshooting

  1. Ensure you have a compatible version of Bun or Node.js installed.
  2. Check network connectivity and firewall settings if using a remote endpoint.
  3. Avoid excessive concurrent requests to prevent rate-limiting.

Use cases

Drug discovery and chemical research: search analogues, examine structure-activity relationships.
Safety assessment: obtain GHS hazard classifications and safety data.
Bioinformatics: connect compounds to assays, genes, and proteins.

Supported clients

Claude DesktopFull support
CursorFull support
VS CodeFull support