home / mcp / molmim mcp server

MolMIM MCP Server

MCP for molMIM model

Installation
Add the following to your MCP client configuration file.

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.

How to use

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.

How to install

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 provided

Configuration and usage notes

Set 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.

Troubleshooting tips

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).

Examples of typical workflow

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).

Available tools

molmim_embedding

Get embeddings for MolMIM SMILES strings or sequences.

molmim_hidden

Get hidden state representations for MolMIM sequences.

molmim_decode

Decode hidden states back to SMILES strings.

molmim_sampling

Sample latent space around seed molecules to generate related structures.

molmim_generate

Generate novel molecules with property optimization (QED or plogP).

molmim_interpolate

Interpolate between two molecules by manipulating MolMIM hidden states to generate intermediates.