Query PubChem for Drug Data
PubChem MCP Server extracts drug basic chemical information from the PubChem API, providing structured data like molecular formula and synonyms.
Why it matters
Access comprehensive molecular and chemical data for drugs directly from the PubChem API. Retrieve essential information like formulas, weights, identifiers, and synonyms to enrich your research or applications.
Outcomes
What it gets done
Fetch drug CAS numbers and molecular weights
Retrieve molecular formulas and SMILES notation
Get drug synonyms, alternative names, and IUPAC names
Access InChI keys and ATC codes for classification
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/vb-pubchem | bash Capabilities
Tools your agent gets
Retrieve basic chemical information about drugs from PubChem API including formulas, weights, and identifiers.
Obtain CAS numbers for chemical compounds from PubChem.
Get molecular weights of drugs and chemical compounds.
Retrieve molecular formulas for chemical compounds.
Get SMILES notation for chemical structures.
Retrieve drug synonyms and alternative names from PubChem.
Access InChI keys for chemical compound identification.
Obtain IUPAC names for chemical compounds.
Overview
PubChem MCP Server
The PubChem MCP Server is a connector designed to extract basic chemical information about drugs from the PubChem API. It provides structured data points such as the drug name, CAS number, molecular weight, molecular formula, SMILES string, synonyms, InChI Key, IUPAC name, ATC code, and a direct link to the details on PubChem. This tool should be used when an AI client needs to access and process fundamental chemical properties of drugs available in the PubChem database. It is suitable for applications requiring structured chemical data for research, analysis, or integration into larger workflows.
What it does
As an AI client, I want to easily access and process detailed chemical information about drugs from PubChem, so that I can integrate this data into my applications for research or analysis.
The big job is to enable AI-driven drug discovery and analysis by providing structured access to PubChem's vast chemical database.
The small job is to retrieve specific chemical properties for a given drug, formatted in a machine-readable way.
Installation involves cloning the repository and installing dependencies:
git clone [project repository URL]
cd [project directory]
pip install .
Configuration for the MCP server is done via servers_config.json:
{
"mcpServers": {
"pubchem": {
"command": "uvx",
"args": ["pubchem_mcp_server"]
}
}
}
The output provides comprehensive drug details:
{
"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"
}
Source README
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"
}
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.