PubChem MCP Server

Extract drug basic chemical information from the PubChem API.

README.md

pubchem mcp server

the mcp is used to extract the drug basic chemical infomation from pubchem API.

Requirements

  • Python 3.10
  • python-dotenv
  • requests
  • mcp
  • uvicorn

Installation

Install the dependencies(local):

  • Install directly from the project directory
git clone [project repository URL]
cd [project directory]
pip install .

Configure servers(pypi):

The servers_config.json follows the same structure as Claude Desktop, allowing for easy integration of multiple servers. Here's an example:

{
  "mcpServers": {
    "pubchem": {
      "command": "uvx",
      "args": ["pubchem_mcp_server"]
    }
  }
}

the result of this MCP

{
  "Drug Name": "Aspirin",
  "CAS Number": "50-78-2",
  "Molecular Weight": 180.16,
  "Molecular Formula": "C9H8O4",
  "SMILES": "CC(=O)OC1=CC=CC=C1C(=O)O",
  "Synonyms": [
    "2-(Acetyloxy)benzoic Acid",
    "Acetylsalicylic Acid",
    "Acetysal",
    "Acylpyrin",
    "Aloxiprimum",
    "Aspirin",
    "Colfarit",
    "Dispril",
    "Easprin"
  ],
  "InchI Key": "BSYNRYMUTXBXSQ-UHFFFAOYSA-N",
  "IUPAC Name": "2-acetyloxybenzoic acid",
  "ATC Code": "N02BA01",
  "Details Link": "https://pubchem.ncbi.nlm.nih.gov/compound/2244"
}

Tools 1

get_compound_infoRetrieves basic chemical information and drug data for a specific compound name.

Try it

Get the chemical details for Aspirin.
What is the molecular formula and SMILES string for Caffeine?
Find the IUPAC name and CAS number for Ibuprofen.
List the synonyms for Paracetamol using the PubChem server.

Frequently Asked Questions

What are the key features of PubChem?

Retrieves molecular weight and chemical formulas. Provides IUPAC names and CAS numbers. Fetches SMILES strings for chemical structures. Lists common synonyms for drugs and compounds. Links to detailed PubChem compound pages.

What can I use PubChem for?

Researchers looking up chemical properties for drug discovery. Students verifying molecular data for chemistry assignments. Developers building tools that require standardized chemical identifiers. Pharmacists checking synonyms and ATC codes for medications.

How do I install PubChem?

Install PubChem by running: git clone https://github.com/sssjiang/pubchem_mcp_server && cd pubchem_mcp_server && pip install .

What MCP clients work with PubChem?

PubChem works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep PubChem docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Open Conare