pubchem-mcp-server

@cyanheads Claim

Basic information

Transport
stdio
Runtime
TypeScript
Version
1.0.0
Author
cyanheads
Quality
35
Views
1.2K

About pubchem-mcp-server

Access PubChem chemical database via MCP: search compounds, get properties, safety data, bioactivity, and cross-references for chemistry research.

pubchem-mcp-server is a MCP server in the Browser Automation category listed in the AddMCP.net directory, published by cyanheads. It exposes 8 tools, including pubchem_search_compounds, pubchem_get_compound_details, pubchem_get_compound_image, pubchem_get_compound_safety and more. Supported transport: stdio. Runtime: TypeScript. License: Apache-2.0. The repository has 8 GitHub stars. Source code is hosted on github.com. Related topics: browser-automation, community.

Connection details

https://pubchem.caseyjhand.com/mcp

Setup

claude mcp add pubchem-mcp-server --transport http https://pubchem.caseyjhand.com/mcp

pubchem-mcp-server config

Add this server to your MCP-compatible client using the configuration below.

{
    "mcpServers": {
        "pubchem": {
            "command": "bunx",
            "args": [
                "@cyanheads/pubchem-mcp-server@latest"
            ]
        }
    }
}

pubchem-mcp-server tools

  • 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_safety — Get GHS hazard classification and safety data for a compound
  • pubchem_get_compound_xrefs — Get external database cross-references (PubMed, patents, genes, proteins, etc.)
  • pubchem_get_bioactivity — Get a compound's bioactivity profile: assay results, targets, and activity values
  • 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

Overview

What is pubchem-mcp-server?

PubChem MCP Server is a Python implementation of a Model Context Protocol (MCP) server that allows AI models to query chemical compound information from the PubChem database. It provides easy access to compound properties, 2D structures, and 3D molecular coordinates through a standard MCP interface.

How to use pubchem-mcp-server?

Install from source with pip install -e . (optionally pip install -e ".[rdkit]" for enhanced 3D handling). Configure the server in your MCP settings file by providing the path to mcp_server.py and listing the tools get_pubchem_data and download_structure under autoApprove. Then invoke the tools by passing a compound name or PubChem CID as the query parameter.

Key features of pubchem-mcp-server

  • Query compounds by name or PubChem CID
  • Retrieve IUPAC name, molecular formula, weight, SMILES, InChI, InChIKey
  • Output in JSON (default), CSV, or XYZ (3D) format
  • Built-in in-memory caching for API responses
  • Automatic retry mechanism for API reliability
  • Fallback 3D structure generation if PubChem 3D unavailable

Use cases of pubchem-mcp-server

  • Query chemical compound properties directly from an AI assistant
  • Retrieve standard identifiers (SMILES, InChI, InChIKey) for cheminformatics workflows
  • Download structure files (SDF, MOL, SMI) for a given PubChem CID
  • Obtain 3D molecular coordinates for visualization or modeling
  • Integrate chemical data lookup into automated research pipelines

Frequently asked questions

1 What are the runtime requirements?

Python 3.8+ and the Requests library are required. RDKit is optional but recommended for enhanced 3D structure handling.

2 What output formats are supported?

The get_pubchem_data tool supports JSON, CSV, and XYZ (3D) output. The download_structure tool supports SDF, MOL, and SMI file formats.

3 How does caching work?

API responses are cached in memory for faster repeat queries. 3D structure data is persisted on disk in ~/.pubchem-mcp/cache/.

4 How do I configure the server for use with an AI model?

Add an entry to your MCP configuration file with command: "python3", args: ["/path/to/mcp_server.py"], and list get_pubchem_data and download_structure under autoApprove.

5 What happens if 3D structure data is not available from PubChem?

The server includes a fallback that generates a 3D structure locally when PubChem itself does not provide one.

Comments

No comments yet

Be the first to share feedback about this listing. Sign in to leave a comment.

Sign In

Feedback 💬