
PyMOL-MCP
Connects PyMOL to Claude AI through the Model Context Protocol, allowing for conversational structural biology and molecular visualization through natural language commands.
vrtejus
README
PyMOL-MCP: Integrating PyMOL with Claude AI
PyMOL-MCP connects PyMOL to Claude AI through the Model Context Protocol (MCP), enabling Claude to directly interact with and control PyMOL. This powerful integration allows for conversational structural biology, molecular visualization, and analysis through natural language.
https://github.com/user-attachments/assets/687f43dc-d45e-477e-ac2b-7438e175cb36
Features
- Two-way communication: Connect Claude AI to PyMOL through a socket-based server
- Intelligent command parsing: Natural language processing for PyMOL commands
- Molecular visualization control: Manipulate representations, colors, and views
- Structural analysis: Perform measurements, alignments, and other analyses
- Code execution: Run arbitrary Python code in PyMOL from Claude
Installation Guide
Prerequisites
- PyMOL installed on your system
- Claude for Desktop
- Python 3.10 or newer
- Git
Step 1: Install the UV Package Manager
On macOS:
brew install uv
On Windows:
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
set Path=C:\Users\[YourUsername]\.local\bin;%Path%
For other platforms, visit the UV installation guide.
Step 2: Clone the Repository
git clone https://github.com/vrtejus/pymol-mcp
cd pymol-mcp
Step 3: Set Up the Environment
Create and activate a Python virtual environment:
python -m venv venv
On macOS/Linux:
source venv/bin/activate
On Windows:
venv\Scripts\activate
Step 4: Install Dependencies
With the virtual environment activated:
pip install mcp
Step 5: Configure Claude Desktop
- Open Claude Desktop
- Go to Claude > Settings > Developer > Edit Config
- This will open the
claude_desktop_config.json
file - Add the MCP server configuration:
{
"mcpServers": {
"pymol": {
"command": "[Full path to your venv python]",
"args": ["[Full path to pymol_mcp_server.py]"]
}
}
}
For example:
{
"mcpServers": {
"pymol": {
"command": "/Users/username/pymol-mcp/venv/bin/python",
"args": ["/Users/username/pymol-mcp/pymol_mcp_server.py"]
}
}
}
Note: Use the actual full paths on your system. On Windows, use forward slashes (/) instead of backslashes.
Step 6: Install the PyMOL Plugin
- Open PyMOL
- Go to Plugin → Plugin Manager
- Click on "Install New Plugin" tab
- Select "Choose file..." and navigate to the cloned repository
- Select the
pymol-mcp-socket-plugin/__init__.py
file - Click "Open" and follow the prompts to install the plugin
Usage
Starting the Connection
-
In PyMOL:
- Go to Plugin → PyMOL MCP Socket Plugin
- Click "Start Listening"
- The status should change to "Listening on port 9876"
-
In Claude Desktop:
- You should see a hammer icon in the tools section when chatting
- Click it to access the PyMOL tools
Example Commands
Here are some examples of what you can ask Claude to do:
- "Load PDB 1UBQ and display it as cartoon"
- "Color the protein by secondary structure"
- "Highlight the active site residues with sticks representation"
- "Align two structures and show their differences"
- "Calculate the distance between these two residues"
- "Save this view as a high-resolution image"
Troubleshooting
- Connection issues: Make sure the PyMOL plugin is listening before attempting to connect from Claude
- Command errors: Check the PyMOL output window for any error messages
- Plugin not appearing: Restart PyMOL and check that the plugin was correctly installed
- Claude not connecting: Verify the paths in your Claude configuration file are correct
Limitations & Notes
- The socket connection requires both PyMOL and Claude to be running on the same machine
- Some complex operations may need to be broken down into simpler steps
- Always save your work before using experimental features
- Join our Bio-MCP Community to troubleshoot, provide feedback & improve Bio-MCPS! https://join.slack.com/t/bio-mcpslack/shared_invite/zt-31z4pho39-K5tb6sZ1hUvrFyoPmKihAA
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Recommended Servers
Crypto Price & Market Analysis MCP Server
A Model Context Protocol (MCP) server that provides comprehensive cryptocurrency analysis using the CoinCap API. This server offers real-time price data, market analysis, and historical trends through an easy-to-use interface.
MCP PubMed Search
Server to search PubMed (PubMed is a free, online database that allows users to search for biomedical and life sciences literature). I have created on a day MCP came out but was on vacation, I saw someone post similar server in your DB, but figured to post mine.
dbt Semantic Layer MCP Server
A server that enables querying the dbt Semantic Layer through natural language conversations with Claude Desktop and other AI assistants, allowing users to discover metrics, create queries, analyze data, and visualize results.
mixpanel
Connect to your Mixpanel data. Query events, retention, and funnel data from Mixpanel analytics.

Sequential Thinking MCP Server
This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.

Nefino MCP Server
Provides large language models with access to news and information about renewable energy projects in Germany, allowing filtering by location, topic (solar, wind, hydrogen), and date range.
Vectorize
Vectorize MCP server for advanced retrieval, Private Deep Research, Anything-to-Markdown file extraction and text chunking.
Mathematica Documentation MCP server
A server that provides access to Mathematica documentation through FastMCP, enabling users to retrieve function documentation and list package symbols from Wolfram Mathematica.
kb-mcp-server
An MCP server aimed to be portable, local, easy and convenient to support semantic/graph based retrieval of txtai "all in one" embeddings database. Any txtai embeddings db in tar.gz form can be loaded
Research MCP Server
The server functions as an MCP server to interact with Notion for retrieving and creating survey data, integrating with the Claude Desktop Client for conducting and reviewing surveys.