Get the FREE Ultimate OpenClaw Setup Guide →

pubchem_mcp_server

MCP server from sssjiang/pubchem_mcp_server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
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:

  1. Clone the repository and navigate into the project directory:
git clone [project repository URL]
cd [project directory]
  1. Install the Python package in editable mode (requirements are declared in setup or pyproject as dependencies):
pip install .
  1. 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
  1. 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"]
    }
  }
}
  1. 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

Sponsor this space

Reach thousands of developers