Overview
PubChem MCP (PhelanShao) connects MCP-capable AI clients to chemical compound information in the PubChem database. It is a separate repository implementation of an access layer, not the upstream database itself or a predictive chemistry model. Its documented role is to make compound properties, two-dimensional structures and three-dimensional molecular coordinates available through MCP tools.
The main retrieval tool, get_pubchem_data, accepts a compound name or PubChem CID. Documented property fields include IUPAC name, molecular formula, molecular weight, SMILES, InChI and InChIKey. Results can be requested as JSON, CSV or XYZ. The include_3d option applies only to XYZ output. A second tool, download_structure, takes a CID and downloads an SDF, MOL or SMI file, with an optional custom filename. These interfaces support workflows that move from an AI-assisted lookup to structured data or a local structure file.
The README describes in-memory API-response caching, disk caching for 3D data, automatic retries and fallback 3D generation when PubChem coordinates are unavailable. It lists Python 3.8+ and Requests as requirements, with RDKit optional for enhanced 3D handling. The supplied evidence does not establish retrieval accuracy, runtime performance or the scientific suitability of generated coordinates. Its installation example also contains a placeholder repository URL, so setup should be checked against the linked repository rather than copied without adjustment.
Key Features
- Looks up compounds by name or PubChem CID through `get_pubchem_data`.
- Retrieves IUPAC name, molecular formula, molecular weight, SMILES, InChI and InChIKey.
- Offers JSON, CSV and XYZ retrieval outputs; `include_3d` is valid only for XYZ.
- Downloads SDF, MOL or SMI structure files through `download_structure`, with an optional custom filename.
- Caches API responses in memory and 3D structure data in `~/.pubchem-mcp/cache/`, and includes an automatic retry mechanism.
- Describes fallback 3D structure generation when PubChem 3D data is unavailable, with optional RDKit support for enhanced 3D handling.
Use Cases
- Intended evaluation: connect an MCP-capable assistant to compound lookups and compare returned identifiers and properties for representative names and CIDs.
- Intended evaluation: retrieve CSV compound data or SDF, MOL and SMI files for inspection in a downstream cheminformatics workflow.
- Intended evaluation: request XYZ coordinates and assess how unavailable PubChem 3D data and fallback generation affect a structure-handling workflow.
How to Use
- Read the official README for requirements, tool parameters and configuration. Confirm that your intended workflow needs database retrieval rather than property prediction.
- Inspect the repository before installation. The README lists Python 3.8+, Requests and optional RDKit, but its clone example contains a placeholder owner; do not treat that URL as the project location.
- Follow the documented MCP configuration pattern, replacing the local path to
python_version/mcp_server.py. Check the example’s automatic tool approvals against your client’s permission preferences. - Evaluate
get_pubchem_datawith a representative name such asaspirinor a known CID. Choose JSON or CSV for properties, or XYZ for coordinates; useinclude_3donly with XYZ. Compare returned identifiers with the intended compound. - Evaluate
download_structureusing a CID and SDF, MOL or SMI output. Inspect the downloaded file and any fallback-generated coordinates before downstream scientific use; these checks are suggested evaluation steps, not reported test results.