drio
Open app

PubChem MCP Server

Source

Enables large language models to correctly query molecular databases and generate structure files

Catalog onlyCatalog onlySTDIO

Overview

PubChem MCP Server is a Model Context Protocol (MCP) server designed to acquire and manage data from the PubChem molecular database, allowing users to query chemical compounds efficiently.

To use the PubChem MCP Server, install it via npm and configure it in your MCP configuration file. You can then use the provided tools to query compound data by name or CID.

  • Support for querying by compound name or CID - Multiple output formats: JSON, CSV, XYZ - 3D structure data acquisition and conversion - Local caching system to minimize API calls - Automatic retry mechanism for improved reliability
  1. Retrieving structural and property data for chemical compounds.
  2. Converting chemical data into various formats for analysis.
  3. Accessing 3D structure data for visualization in chemical software.

Add to your AI client

Use these steps to connect PubChem MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "pubchem-mcp-server-phelanshao": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-pubchem-mcp-server-phelanshao"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "pubchem-mcp-server-phelanshao": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-pubchem-mcp-server-phelanshao"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "pubchem-mcp-server-phelanshao": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-pubchem-mcp-server-phelanshao"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "pubchem-mcp-server-phelanshao": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-pubchem-mcp-server-phelanshao"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "pubchem-mcp-server-phelanshao": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-pubchem-mcp-server-phelanshao"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "pubchem-mcp-server-phelanshao": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-pubchem-mcp-server-phelanshao"
      ]
    }
  }
}

FAQ

What types of data can I retrieve?

You can retrieve structural and property data for various chemical compounds in different formats.

Is there a limit to the number of queries?

The server supports multiple queries, but be mindful of API rate limits.

How do I cache data?

The server automatically caches attribute data in memory and 3D structure data in a specified directory.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":2577,"uuid":"8dfa3c3c-4d28-42df-850a-06b65a930933","name":"pubchem-mcp-server","title":"PubChem MCP Server","description":"Enables large language models to correctly query molecular databases and generate structure files","avatar_url":"https://avatars.githubusercontent.com/u/77712581?v=4","created_at":"2025-03-13T08:55:06.283Z","updated_at":"2025-03-14T14:34:41.472Z","status":"created","author_name":"PhelanShao","author_avatar_url":"https://avatars.githubusercontent.com/u/77712581?v=4","tags":"[]","category":"research-and-data","is_featured":false,"sort":1,"url":"https://github.com/PhelanShao/pubchem-mcp-server","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"2\",\"license\":\"\",\"language\":\"Python\",\"is_official\":false,\"latest_commit_time\":\"2025-03-31 10:44:04\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]