PubChem

Bridges MCP clients with PubChem, enabling compound searches, CID lookups, and advanced queries.
  • python

4

GitHub Stars

python

Language

5 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "jackkuo666-pubchem-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@smithery/cli@latest",
        "install",
        "@JackKuo666/pubchem-mcp-server",
        "--client",
        "claude",
        "--config",
        "{}"
      ]
    }
  }
}

PubChem MCP Server creates a bridge between AI assistants and PubChem’s chemical data using the Model Context Protocol (MCP). It lets you search for compounds, view structures and properties, and run advanced queries in a programmatic, shareable way.

How to use

You connect your MCP client to the PubChem MCP Server to perform four core actions: search by name or SMILES, fetch details by CID, and run advanced searches that combine multiple parameters. Start by initiating a request through your MCP client to one of the available tools, then read back structured results that include compound names, identifiers, formulas, and key properties. You can also request visualization or property comparisons if your client supports those capabilities.

How to install

Prerequisites: You need Python 3.10 or later to run the server locally. You may optionally use a virtual environment to keep dependencies isolated.

uv tool install pubchem-mcp-server

# Optional: clone the project for development
git clone https://github.com/JackKuo666/PubChem-MCP-Server.git
cd PubChem-MCP-Server

# Set up a virtual environment for development
uv venv
source .venv/bin/activate
uv pip install -r requirements.txt

Additional setup and running the server

After installation, start the MCP server so your MCP clients can send requests. The server runs as a Python process and listens for MCP tool invocations from your clients.

python pubchem_server.py

Configuration and connection methods

Connect your MCP clients using one of the supported local deployment methods. In this server, you can run the server directly from your environment, or install it via command-line tools. The available connection methods shown below are provided as separate, explicit options for your setup.

Troubleshooting and notes

If the server does not start, check that Python 3.10+ is installed and that you have activated your virtual environment (if you used one). Ensure that your working directory contains the server script pubchem_server.py and that all required dependencies are installed from requirements.txt.

Tools and capabilities

The server exposes four main tools you can call from your MCP client to interact with PubChem data.

Tool overview

• search_pubchem_by_name — Find compounds by a name query and return matching results with identifiers and basic properties.

• search_pubchem_by_smiles — Search by SMILES string to locate matching compounds and retrieve essential data.

• get_pubchem_compound_by_cid — Retrieve detailed information for a specific compound using its PubChem CID.

• search_pubchem_advanced — Perform an advanced search combining name, SMILES, formula, or CID for precise results.

Project structure

Key files include pubchem_server.py, the main MCP server implementation, and pubchem_search.py for example search functionality.

Dependencies

Python 3.10+, FastMCP framework, asyncio, and dependencies such as pubchempy and pandas for data handling.

Available tools

search_pubchem_by_name

Search PubChem by a compound name and return a list of matching compounds with key identifiers and basic properties.

search_pubchem_by_smiles

Search PubChem using a SMILES string to find matching compounds and return essential data.

get_pubchem_compound_by_cid

Fetch detailed information for a compound using its PubChem CID, including identifiers and properties.

search_pubchem_advanced

Perform an advanced, multi-parameter search to refine results based on name, SMILES, formula, or CID.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational