Skip to main content
Glama
PubChem MCP Server

PubChem MCP Server

by sssjiang

pubchem mcp server

the mcp is used to extract the drug basic chemical infomation from pubchem API.

Requirements

  • Python 3.10

  • python-dotenv

  • requests

  • mcp

  • uvicorn

Related MCP server: pubchem-mcp-server

Installation

Install the dependencies(local):

  • Install directly from the project directory

git clone [project repository URL]
cd [project directory]
pip install .

Configure servers(pypi):

The servers_config.json follows the same structure as Claude Desktop, allowing for easy integration of multiple servers. Here's an example:

{
  "mcpServers": {
    "pubchem": {
      "command": "uvx",
      "args": ["pubchem_mcp_server"]
    }
  }
}

the result of this MCP

{
  "Drug Name": "Aspirin",
  "CAS Number": "50-78-2",
  "Molecular Weight": 180.16,
  "Molecular Formula": "C9H8O4",
  "SMILES": "CC(=O)OC1=CC=CC=C1C(=O)O",
  "Synonyms": [
    "2-(Acetyloxy)benzoic Acid",
    "Acetylsalicylic Acid",
    "Acetysal",
    "Acylpyrin",
    "Aloxiprimum",
    "Aspirin",
    "Colfarit",
    "Dispril",
    "Easprin"
  ],
  "InchI Key": "BSYNRYMUTXBXSQ-UHFFFAOYSA-N",
  "IUPAC Name": "2-acetyloxybenzoic acid",
  "ATC Code": "N02BA01",
  "Details Link": "https://pubchem.ncbi.nlm.nih.gov/compound/2244"
}

Available Tools

3 tools
get_chemical_infoC

获取化学物质的详细信息

Args: name: 化学物质名称

Inputs: name (required). Returns: result

get_cid_by_nameB

根据化学物质名获得CID

Args: name: 化学物质名称

Inputs: name (required). Returns: result

search_chemical_by_casB

通过CAS号搜索化学物质信息

Args: cas_number: 化学物质的CAS号

Inputs: cas_number (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 3 tools

    Disambiguation4/5

    Tools have distinct purposes: get_chemical_info returns details by name, get_cid_by_name returns CID by name, and search_chemical_by_cas searches by CAS number. However, slight overlap exists between the first two since both accept a name parameter, but the outputs differ, so an agent can distinguish them with careful reading.

    Naming Consistency4/5

    All tools use snake_case and follow a verb_noun or verb_noun_by_param pattern (get_chemical_info, get_cid_by_name, search_chemical_by_cas). The verbs are mostly 'get' except one 'search', which is a minor inconsistency, but overall the pattern is clear and predictable.

    Tool Count3/5

    With only 3 tools, the server feels under-scoped for a domain like PubChem, which typically requires many lookup and search capabilities. The count is borderline but still within a reasonable minimum, though it likely limits usefulness.

    Completeness2/5

    The tool surface covers only name and CAS lookups, missing many common operations like searching by formula, structure, or synonyms, and does not support listing or multiple results. This leaves significant gaps for a comprehensive chemical information server.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Enables users to retrieve chemical safety information including compound properties, GHS safety classifications, and toxicity data from PubChem database using compound names or CIDs. Supports batch queries with caching for efficient chemical safety research and analysis.
      3
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents and applications to search, retrieve, and analyze chemical compounds, substances, and bioassays from PubChem's vast chemical information database through comprehensive tools for chemical research and discovery.
      10
      1,902 npm
      13
      Apache 2.0
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to search and retrieve chemical compound information, structures, and physical properties from the PubChem database. It supports querying via compound names, SMILES notation, or CIDs to provide detailed molecular data for chemical analysis.
      5
      -