Skip to content

PubChem MCP (PhelanShao)

PubChem MCP (PhelanShao) is a Python MCP server that lets AI clients retrieve PubChem compound properties and structures by name or CID, with JSON, CSV, XYZ and downloadable structure-file outputs.

Catalog updated ·

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

  1. Read the official README for requirements, tool parameters and configuration. Confirm that your intended workflow needs database retrieval rather than property prediction.
  2. 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.
  3. 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.
  4. Evaluate get_pubchem_data with a representative name such as aspirin or a known CID. Choose JSON or CSV for properties, or XYZ for coordinates; use include_3d only with XYZ. Compare returned identifiers with the intended compound.
  5. Evaluate download_structure using 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.

Related resources

PubChem MCP (cyanheads) connects MCP clients to PubChem compound and bioassay data, with identifier and structure searches, property retrieval, safety records, cross-references and 3D conformers.

Open sourceTypeScript

Cheminformatics · Scientific Data

PubChem PUG REST is an HTTP API for retrieving selected chemical records, properties and assay information, with documented identifier inputs, structure searches and operation-specific output formats.

Cheminformatics · Scientific Data

PubChemPy

Open Source

PubChemPy is a Python wrapper for the PubChem PUG REST API, supporting chemical searches, compound-property retrieval, standardization, file-format conversion and depiction.

Open sourcePython

Cheminformatics · Scientific Data

Scientific Agent Skills provides procedural guidance for AI agents working with scientific packages, databases and research workflows, including cheminformatics, spectroscopy and materials analysis.

Open sourcePython

Cheminformatics · Scientific Data

Benchling MCP (longevity-genie) is a Python MCP server that connects AI clients to Benchling notebook entries, biological sequences, projects, and entity search using API credentials.

Open sourcePython

Lab Automation · Scientific Data

ChEMBL MCP (cyanheads) connects MCP clients to ChEMBL compound, target, bioactivity and drug records, with structure searches and optional DuckDB analysis of larger activity sets.

Open sourceTypeScript

Drug Discovery · Scientific Data

Related guides