Discover PubChem MCP Server for easy chemical data retrieval via Python and MCP protocol
PubChem MCP Server is an advanced Python implementation of a Model Context Protocol (MCP) server that acts as a bridge, enabling AI applications to query chemical compound data efficiently. By adhering strictly to the MCP protocol, this server ensures seamless integration with various AI tools like Claude Desktop, Continue, Cursor, and more, providing them easy access to PubChem's vast repository of molecular information.
PubChem MCP Server offers a range of powerful features that enhance AI application capabilities:
The architecture of PubChem MCP Server is built around a robust MCP protocol implementation, ensuring seamless communication between AI applications and external tools. The server uses Python to execute queries and retrieves data from the PubChem database via standardized APIs. The core components include:
To deploy and use PubChem MCP Server, follow these steps:
Clone the Repository:
git clone https://github.com/yourusername/pubchem-mcp-server.git
cd pubchem-mcp-server/python_version
Install the Package: To install the primary package without RDKit dependencies:
pip install -e .
For enhanced 3D structure handling, also install with RDKit dependencies:
pip install -e ".[rdkit]"
In the field of drug discovery, researchers can use PubChem MCP Server to query compound structures and properties. For instance, a researcher might want to gather detailed information about aspirin (CID: 2244), including its structure and possible interactions:
<use_mcp_tool>
<server_name>pubchem</server_name>
<tool_name>get_pubchem_data</tool_name>
<arguments>
{
"query": "aspirin",
"format": "JSON"
}
</arguments>
</use_mcp_tool>
Material scientists can leverage PubChem MCP Server to access 3D molecular structures for analyzing new materials. For example, downloading the structure data of a specific compound:
<use_mcp_tool>
<server_name>pubchem</server_name>
<tool_name>download_structure</tool_name>
<arguments>
{
"cid": "2244",
"format": "sdf"
}
</arguments>
</use_mcp_tool>
To integrate PubChem MCP Server with specific AI applications, add the following to your MCP configuration file:
{
"mcpServers": {
"pubchem": {
"command": "python3",
"args": ["/path/to/pubchem-mcp-server/python_version/mcp_server.py"],
"env": {
"PYTHONUNBUFFERED": "1"
},
"disabled": false,
"autoApprove": [
"get_pubchem_data",
"download_structure"
]
}
}
}
MCP Client Compatibility Matrix:
MCP Client | Resources | Tools | Prompts | Status |
---|---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ | Full Support |
Continue | ✅ | ✅ | ✅ | Full Support |
Cursor | ❌ | ✅ | ❌ | Tools Only |
PubChem MCP Server ensures optimal performance and compatibility across various platforms and environments:
{
"mcpServers": {
"pubchem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-pubchem"],
"env": {
"API_KEY": "your-api-key"
}
}
}
}
Contributions to the PubChem MCP Server are welcome! To get started, ensure you follow these guidelines:
Explore more about MCP and its applications:
By integrating the PubChem MCP Server, developers can streamline data access for their AI applications while ensuring compatibility with a wide range of MCP clients.
RuinedFooocus is a local AI image generator and chatbot image server for seamless creative control
Simplify MySQL queries with Java-based MysqlMcpServer for easy standard input-output communication
Learn to set up MCP Airflow Database server for efficient database interactions and querying airflow data
Build stunning one-page websites track engagement create QR codes monetize content easily with Acalytica
Explore CoRT MCP server for advanced self-arguing AI with multi-LLM inference and enhanced evaluation methods
Access NASA APIs for space data, images, asteroids, weather, and exoplanets via MCP integration