by sssjiang
A Python-based MCP (Multi-Cloud Platform) server to extract drug information from the PubChem API.
pubchem_mcp_server is a Python-based Multi-Cloud Platform (MCP) server designed to extract basic chemical information about drugs directly from the PubChem API. It acts as an intermediary, simplifying access to a vast database of chemical compounds.
To use pubchem_mcp_server, you first need to install the required dependencies, including python-dotenv
, requests
, mcp
, and uvicorn
. You can install it directly from the project directory by cloning the repository and running pip install .
. After installation, you configure the server using a servers_config.json
file, similar to Claude Desktop's structure. This file specifies the command and arguments to run the pubchem_mcp_server
.
Q: What kind of information can I extract using this MCP? A: You can extract basic chemical information including Drug Name, CAS Number, Molecular Weight, Molecular Formula, SMILES, Synonyms, InchI Key, IUPAC Name, ATC Code, and a direct link to the PubChem compound page.
Q: What are the Python version requirements? A: The project requires Python 3.10.
Q: How do I configure the server?
A: The server is configured via a servers_config.json
file, which defines the command and arguments for running the pubchem_mcp_server
within an MCP environment.
the mcp is used to extract the drug basic chemical infomation from pubchem API.
python-dotenv
requests
mcp
uvicorn
Install the dependencies(local):
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"]
}
}
}
{
"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"
}
Reviews feature coming soon
Stay tuned for community discussions and feedback