home / mcp / pubchem mcp server
Provides access to PubChem data via MCP, enabling compound searches, details, bioassays, and properties through MCP clients.
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.
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.
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.txtOption 2 is to install the published package once it is available:
pip install pubchem-mcpRun the server as a standalone process after installation:
# From source
python -m mcp_server
# If installed via pip
pubchem-mcpOptional 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.
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"
]
}
}
}Search for compounds by name or identifier to locate PubChem records.
Retrieve detailed information about a specific compound, including identifiers, synonyms, and structural data.
Obtain physical and chemical properties for a given compound.
Search PubChem bioassays to find assay-related data.
Get detailed information about PubChem substances.