Get the FREE Ultimate OpenClaw Setup Guide →

PubChem

A comprehensive Model Context Protocol (MCP) server for accessing the PubChem chemical database. This server provides access to over 110 million chemical compounds with extensive molecular properties, bioassay data, and chemical informatics tools.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio augmented-nature-pubchem-mcp-server node dist/server.js \
  --env PORT="3000" \
  --env LOG_LEVEL="info" \
  --env PUBCHEM_API_BASE="https://pubchem.ncbi.nlm.nih.gov/rest"

How to use

This MCP server provides programmatic access to PubChem data via a structured MCP interface. It exposes tools for chemical search, structure analysis, property descriptors, bioassay data, safety/toxicity, and cross-database references, enabling workflows from target discovery to compound evaluation. After starting the server, clients can invoke the predefined tools (for example search_compounds, get_compound_info, search_similar_compounds, get_compound_properties, get_safety_data, batch_compound_lookup, etc.) using MCP messages that specify the tool name and a set of arguments. The server is designed to work in a modular fashion, allowing pipelines that chain compound lookup with property calculations, bioassay retrieval, and safety profiling as part of an end-to-end discovery workflow.

How to install

Prerequisites:

  • Node.js (14.x or newer) and npm installed on your system
  • Git (optional, for cloning the repo)

Install and run:

  1. Clone or download the server repository
  2. Navigate to the server directory
  3. Install dependencies npm install
  4. Build the server (if a build step exists in this project) npm run build
  5. Start the server npm start

Notes:

  • If the project uses a different build or start script (for example, npm run start:prod or node dist/server.js), adjust the commands accordingly.
  • Ensure network access to PubChem data sources if not using a fully offline mode.

Additional notes

Tips and common considerations:

  • Environment variables: You can tune PORT, PUBCHEM_API_BASE, and LOG_LEVEL to suit deployment needs. Consider setting API rate limit controls if you proxy PubChem requests under heavy load.
  • Data sources: The server relies on PubChem REST endpoints; ensure outbound network access and respect PubChem usage guidelines.
  • Error handling: If you encounter invalid IDs or malformed tool arguments, the MCP server should return structured error messages. Validate inputs on the client side before sending tool invocations.
  • Performance: For batch operations (e.g., batch_compound_lookup), use appropriate max_records limits to prevent large, slow queries. Consider enabling caching if supported by your deployment.
  • Versioning: Keep dependencies updated and align MCP tool definitions with the server’s current tool registry to avoid tool-name mismatches.

Related MCP Servers

Sponsor this space

Reach thousands of developers