Skip to content
Official

Chemistry Research with Claude + PubChem

Resolve chemical names to PubChem identifiers and retrieve traceable compound properties from Claude Desktop through a locally installed PubChem MCP server.

Level: Intermediate Cost: Mixed Privacy: Cloud ~30 min
Start Setup

You'll be able to

  • Resolve names and identifiers to PubChem CIDs.
  • Retrieve compound details while preserving sources and missing values.

What you'll build

Scope

Use @cyanheads/pubchem-mcp-server 0.6.5 with Node.js >=24. The MCP process runs locally; it queries public PubChem PUG REST/PUG View APIs, and the conversation runs through Claude. No PubChem API key is required for this baseline. This is compound-information retrieval, not an experimentally validated property predictor. Record the server version and the retrieval date. PubChem XLogP must not be relabelled as RDKit Crippen logP.

PubChem MCP tools

PubChem MCP (cyanheads)

Compound data source

PubChem PUG REST

Stack Components

PubChem MCP (cyanheads)

PubChem MCP tools · 0.6.5

Pinned npm package; source commit 1b179c5043345b9029b269980ac4ad5c0dbad15b

See upstream licenses and client/service account terms.

View Resource

PubChem PUG REST

Compound data source · PUG REST / live API

Live data may change; record CID and retrieval date.

See upstream licenses and client/service account terms.

View Resource

Compatibility

ClientOSArchitectureVersion requirements
Claude Desktop macOSAnySee component requirements
Claude Desktop WindowsAnySee component requirements

Setup & Test

1. Prepare Node.js and Claude Desktop

All platforms

Install Node.js 24 or newer with npm and Claude Desktop. Confirm that local MCP is allowed and HTTPS access to the target database is available. Bun is not needed for this Node-based variant.

node --version
npm --version
Official source

Expected result

Node reports v24 or newer; npm is available.

2. Install the pinned MCP package locally

All platforms

Use a new writable working directory. This installs the server in .mcp-packages, rather than globally; keep its lockfile for verification. The upstream npx entry and the local dist/index.js entry use the same published package.

npm install --prefix .mcp-packages @cyanheads/[email protected]
npm ls --prefix .mcp-packages --depth=0
Official source

Expected result

The requested exact package version is installed.

3. Configure Claude Desktop on macOS

macOS

Open Settings > Developer > Edit Config and merge the server into mcpServers. Replace all placeholder paths with actual absolute paths, including the node executable. Keep existing server entries. No API keys are needed for the baseline query; optional keys/emails belong in private configuration.

{
  "mcpServers": {
    "pubchem-mcp-server": {
      "command": "/ABSOLUTE/PATH/TO/node",
      "args": [
        "/ABSOLUTE/PATH/.mcp-packages/node_modules/@cyanheads/pubchem-mcp-server/dist/index.js"
      ],
      "env": {
        "MCP_TRANSPORT_TYPE": "stdio"
      }
    }
  }
}
Official source

Expected result

Valid JSON starts the installed package with the Node 24+ executable and stdio.

4. Configure Claude Desktop on Windows

Windows

Open Settings > Developer > Edit Config and merge the server into mcpServers. Replace all placeholder paths with actual absolute paths, including the node executable. Keep existing server entries. No API keys are needed for the baseline query; optional keys/emails belong in private configuration.

{
  "mcpServers": {
    "pubchem-mcp-server": {
      "command": "C:\\ABSOLUTE\\PATH\\TO\\node.exe",
      "args": [
        "C:\\ABSOLUTE\\PATH\\.mcp-packages\\node_modules\\@cyanheads\\pubchem-mcp-server\\dist\\index.js"
      ],
      "env": {
        "MCP_TRANSPORT_TYPE": "stdio"
      }
    }
  }
}
Official source

Expected result

Valid JSON starts the installed package with the Node 24+ executable and stdio.

5. Restart and inspect the tools

All platforms

Completely quit and restart Claude Desktop. Inspect Developer status and the connector tool list. Required tools: pubchem_search_compounds, pubchem_get_compound_details.

Official source

Expected result

Connection succeeds and the listed tools are available.

6. Resolve and inspect aspirin

All platforms

Paste into a new chat and inspect both tool calls.

Use pubchem_search_compounds to resolve the name aspirin, then pubchem_get_compound_details for the returned CID. Report the CID, formula, molecular weight, TPSA and XLogP when returned, the original PubChem link and retrieval date. Check whether aspirin resolves to CID 2244. Separate computed properties from experimental evidence; preserve missing fields. Do not infer toxicity or treatment recommendations.
Official source

Expected result

Expected baseline: aspirin CID 2244, formula C9H8O4, weight about 180.16 g/mol. Other fields must come from returned data, with units and source URL https://pubchem.ncbi.nlm.nih.gov/compound/2244 . These are expected checks, not session measurements.

7. Check a missing identifier

All platforms

Repeat with an intentionally nonexistent name.

Search the compound name ChemAIAtlas-no-such-compound-20261007. Report no match or the actual API error; do not fabricate a CID.
Official source

Expected result

No fabricated identifier or property is returned.

Troubleshooting

  • Startup failure: check Node 24+, the absolute node/module paths, JSON syntax and the local install lockfile.
  • Tools missing: restart the desktop client and inspect Developer logs.
  • HTTP 429 or timeout: reduce request volume, use pagination and retry with backoff; preserve partial results.
  • Missing database fields: show them as unavailable, not inferred values.
  • Ambiguous name: compare returned structures/CIDs before selecting.
  • Invalid SMILES: correct the input instead of repeatedly retrying.
  • Safety or bioactivity fields absent: consult original records; absence is not evidence of safety.
Still not working

Alternatives

Use the PubChem website or PUG REST directly for the same CID; local RDKit calculations are a separate alternative and use different descriptor definitions.