Add it to Claude Code
claude mcp add pubchem -- uvx pubchem_mcp_serverMake your agent remember this setup
pubchem's config, env vars, and the gotchas you hit — recalled in every future Claude Code, Cursor, and Codex session.
npx conare@latestFree · one command · indexes the sessions already on disk. Set up in the browser instead →
What it does
- 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
Tools 1
get_compound_infoRetrieves basic chemical information and drug data for a specific compound name.Try it
Original README from sssjiang/pubchem_mcp_server
pubchem mcp server
the mcp is used to extract the drug basic chemical infomation from pubchem API.
Requirements
- Python 3.10
python-dotenvrequestsmcpuvicorn
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"
}