home / mcp / molmim mcp server
MCP for molMIM model
Configuration
View docs{
"mcpServers": {
"siarhei-fedziukovich-mcp-molmim": {
"command": "molmim-mcp",
"args": [],
"env": {
"MOLMIM_BASE_URL": "http://your-molmim-server:8000"
}
}
}
}You can run MolMIMโs MCP server to access all MolMIM endpoints through the Model Context Protocol. This server acts as a bridge between your MolMIM instance and an MCP client, enabling you to generate, embed, interpolate, and manipulate molecules with flexible transports and property optimization.
You will run the MCP server locally or in your deployment and then connect an MCP client to the server. Start the MCP server using the standard command, ensure your MolMIM instance is reachable, and choose a transport that fits your environment (stdio for local development, SSE or HTTP Streamable for web apps and production). Once running, you can execute the available MolMIM tools to generate molecules, obtain embeddings, sample latent space, interpolate between molecules, and decode hidden representations.
Prerequisites: you need Python and pip installed on your system. If you plan to run Docker, you also need Docker and Docker Compose. You should have access to a MolMIM server URL (if you use a remote MolMIM instance) or run MolMIM locally with the proper weights and infrastructure.
From Source or via pip:
- Install the MCP package and dependencies
- Run the MCP server
- Point the MCP client to the MolMIM base URL you providedSet the MolMIM server URL for MCP to access MolMIM endpoints by providing an environment variable. The MCP server expects this value so it can reach MolMIM at runtime.
If you want to run the MCP server in different transports, configure the transport option accordingly (stdio, SSE, or HTTP Streamable). Ensure the chosen transport is compatible with your deployment scenario and client capabilities.
Common issues include connection errors between the MCP server and MolMIM, missing dependencies, or permission problems. Verify that the MolMIM server is reachable from the MCP server, check that all Python dependencies are installed, and ensure the server scripts have execute permissions. If you encounter headless visualization errors in containers, use the provided headless configuration (X11 libraries and xvfb are included in the container image).
1) Start the MCP server and ensure MolMIM_BASE_URL is set to your MolMIM server. 2) Use the embedding, generation, or interpolation tools to perform common tasks such as generating drug-like molecules or exploring chemical space around seed structures. 3) Retrieve results via the MCP client in the transport you chose (stdio, SSE, or HTTP Streamable).
Get embeddings for MolMIM SMILES strings or sequences.
Get hidden state representations for MolMIM sequences.
Decode hidden states back to SMILES strings.
Sample latent space around seed molecules to generate related structures.
Generate novel molecules with property optimization (QED or plogP).
Interpolate between two molecules by manipulating MolMIM hidden states to generate intermediates.