home / mcp / pubchem mcp server

PubChem MCP Server

Provides access to PubChem data via MCP, enabling compound searches, details, bioassays, and properties through MCP clients.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "biocontext-pubchem-mcp": {
      "command": "python",
      "args": [
        "-m",
        "mcp_server"
      ]
    }
  }
}

PubChem MCP provides a server you can query using the MCP protocol to access PubChem data, including compounds, substances, bioassays, and related information. It enables you to perform searches, retrieve detailed records, and access molecular properties through any MCP client.

How to use

You run the PubChem MCP server locally and connect your MCP client to it. With an MCP client, you can search for compounds by name, structure, or identifier, retrieve detailed information about compounds and substances, access bioassay data, and query classifications and cross-references. Use the client’s standard MCP endpoints to invoke the available tools such as searching for compounds, getting compound details, and obtaining properties. You can combine multiple queries in your workflow to build compound-centric analyses or validation pipelines.

How to install

Prerequisites you need before installation: Python is required to run the server. You also need a working shell or terminal to execute commands.

# Option 1: From source
# Clone the repository
git clone https://github.com/BioContext/PubChem-MCP.git
cd PubChem-MCP

# Create a virtual environment
uv venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

Option 2 is to install the published package once it is available:

pip install pubchem-mcp

Run the server as a standalone process after installation:

# From source
python -m mcp_server

# If installed via pip
pubchem-mcp

Optional configuration for Claude for Desktop is shown here. You configure the client to start the server using Python and the mcp_server module, then Claude for Desktop can connect to it once Claude is restarted.

Additional configuration and notes

If you want to use Claude for Desktop, configure the MCP server as follows. The configuration snippet tells Claude to start the server by running Python with the mcp_server module.

{
  "mcpServers": {
    "pubchem": {
      "command": "python",
      "args": [
        "-m",
        "mcp_server"
      ]
    }
  }
}

Available tools

search_compound

Search for compounds by name or identifier to locate PubChem records.

get_compound_details

Retrieve detailed information about a specific compound, including identifiers, synonyms, and structural data.

get_compound_properties

Obtain physical and chemical properties for a given compound.

search_bioassay

Search PubChem bioassays to find assay-related data.

get_substance_details

Get detailed information about PubChem substances.