pubchem_mcp_server
MCP server from sssjiang/pubchem_mcp_server
claude mcp add --transport stdio sssjiang-pubchem_mcp_server uvx pubchem_mcp_server
How to use
The pubchem_mcp_server is an MCP service that fetches and exposes basic chemical information for drugs by querying the PubChem API. It returns a structured JSON payload containing fields such as Drug Name, CAS Number, Molecular Weight, Molecular Formula, SMILES, synonyms, InChI Key, IUPAC Name, ATC Code, and a link to the PubChem detail page. This makes it easy to integrate PubChem-derived drug data into other MCP workflows or downstream applications that rely on standardized chemical metadata. You can run the server using the UVicorn-based wrapper and then send queries to retrieve data for specific compounds or drugs as needed.
How to install
Prerequisites:
- Python 3.10
- pip (Python package installer)
- network access to install dependencies from PyPI
Installation steps:
- Clone the repository and navigate into the project directory:
git clone [project repository URL]
cd [project directory]
- Install the Python package in editable mode (requirements are declared in setup or pyproject as dependencies):
pip install .
- Ensure dependencies are installed: python-dotenv, requests, mcp, and uvicorn are available via pip install during the previous step or separately if needed:
pip install python-dotenv requests mcp uvicorn
- Configure the MCP server as shown in the example (servers_config.json) and run the service with UVicorn through the uvx launcher as described in the configuration example:
{
"mcpServers": {
"pubchem": {
"command": "uvx",
"args": ["pubchem_mcp_server"]
}
}
}
- Start the server using your preferred method (depends on how uvx is installed in your environment) and verify it is listening on the expected port. You can then send queries to retrieve PubChem-based drug data.
Additional notes
Notes:
- The server relies on the PubChem API; if PubChem experiences downtime, responses may fail or be delayed.
- If you need to run multiple MCP servers, extend the mcpServers structure in servers_config.json accordingly.
- Environment variables (e.g., for dotenv-based configuration) can be added via a .env file and loaded by the application if supported by the project setup.
- No API key is typically required for basic PubChem lookups, but you may need to respect PubChem’s rate limits in high-volume scenarios.
- If you encounter import or dependency issues, ensure your Python environment matches the 3.10 specification and that you are using a compatible uvx launcher setup.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP