PubChem MCP Server
About
Enables large language models to correctly query molecular databases and generate structure files
Details
- Author
- PhelanShao
- GitHub stars
- 7
- Downloads
- 365
- Categories
- Other
Jump to
- 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
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.
PubChem MCP Server
A Model Context Protocol (MCP) server for retrieving chemical compound data from PubChem database.
Overview
PubChem MCP Server is a Python implementation of an 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.
Features
- Query compounds by name or PubChem CID
- Retrieve comprehensive compound data including:
- IUPAC name
- Molecular formula
- Molecular weight
- SMILES notation
- InChI and InChIKey
- Support for multiple output formats:
- JSON (default)
- CSV
- XYZ (3D structure)
- Built-in caching system to improve performance
- Automatic retry mechanism for API reliability
- Fallback 3D structure generation if PubChem 3D is unavailable
Requirements
- Python 3.8+
- Requests library
- RDKit (optional, for enhanced 3D structure handling)
Installation
From Source
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



