# PubChem Finder

PubChem Finder — an MCP server for chemical structure searches across PubChem, offline RDKit molecular profiling, and toxicity lookups without API rate limits.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 11 repo stars
- Author: MysterionRise
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/MysterionRise/pubchem-finder
- Updated: 2026-10-29
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/pubchem-finder

## What it does

The server blends live PubChem endpoints with local chemical analysis. It queries PubChem for GHS hazard labels, pharmacology, and bioassay data while citing references. Offline RDKit utilities calculate Lipinski descriptors, strip salts, render compound structures, and flag PAINS or Brenk alerts.

Similarity and substructure queries use a local FPSim2 fingerprint index stored in two data files. Without a generated local index, similarity and substructure search calls will fail to return matches.

Running the tool requires `uv`. It communicates via stdio or streamable HTTP at `127.0.0.1:8000/mcp`. Because HTTP transport provides no native authentication, binding it beyond localhost creates exposure risks.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `PUBCHEM_FINDER_HOME` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env PUBCHEM_FINDER_HOME=<PUBCHEM_FINDER_HOME> --transport stdio pubchem-finder -- uvx pubchem-finder
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from pubchem-finder <command>

### Codex

**Platform CLI**
```bash
codex mcp add pubchem-finder --env PUBCHEM_FINDER_HOME=<PUBCHEM_FINDER_HOME> -- uvx pubchem-finder
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from pubchem-finder <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "pubchem-finder": {
            "command": "uvx",
            "args": [
                "pubchem-finder"
            ],
            "env": {
                "PUBCHEM_FINDER_HOME": "<PUBCHEM_FINDER_HOME>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from pubchem-finder <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "pubchem-finder": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "pubchem-finder"
            ],
            "env": {
                "PUBCHEM_FINDER_HOME": "<PUBCHEM_FINDER_HOME>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from pubchem-finder <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e PUBCHEM_FINDER_HOME=<PUBCHEM_FINDER_HOME> pubchem-finder uvx pubchem-finder
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from pubchem-finder <command>

## When to use it
- Screen compounds against PAINS, Brenk, and Lipinski filters offline
- Run substructure searches with SMARTS without API query throttling
- Fetch PubChem toxicity records and GHS safety classifications
- Render comparative chemical structures with highlighted matching fragments

## Example prompts
- Check if caffeine satisfies Lipinski rules and look up its molecular weight
- Retrieve the GHS hazard classifications and cited toxicity details for ibuprofen
- Compare `smiles_a` and `smiles_b` using ECFP4 fingerprints

## Similar
- [pubchem-database](https://affpapa.org/en/nevibecode/skills/pubchem-database.md) — skill · 2400 installs
- [pubchem-mcp-server](https://affpapa.org/en/nevibecode/mcp/pubchem-mcp-server.md) — MCP server · ★ 13 repo stars
- [pubchem-pug-skill](https://affpapa.org/en/nevibecode/skills/pubchem-pug-skill.md) — skill · 14 installs
- [rdkit](https://affpapa.org/en/nevibecode/skills/rdkit.md) — skill · 2100 installs
- [tooluniverse-chemical-compound-retrieval](https://affpapa.org/en/nevibecode/skills/tooluniverse-chemical-compound-retrieval.md) — skill · 424 installs
- [datamol](https://affpapa.org/en/nevibecode/skills/datamol.md) — skill · 2100 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
