PyMOL-MCP

by vrtejus

Not rated
GitHub

About

Enables conversational structural biology, molecular visualization, and analysis in PyMOL through natural language.

Details

Author
vrtejus
Categories
Developer Tools, Other

Setup

Install PyMOL-MCP in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/vrtejus/pymol-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

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

- 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

- PyMOL installed on your system
- Claude for Desktop
- Python 3.10 or newer
- Git

powershell -c "irm https://astral.sh/uv/install.ps1 | iex" set Path=C:\Users\[YourUsername]\.local\bin;%Path%

For other platforms, visit theUV installation guide.

git clone https://github.com/vrtejus/pymol-mcp cd pymol-mcp

Create and activate a Python virtual environment:
- Open Claude Desktop
- Go to Claude > Settings > Developer > Edit Config
- This will open theclaude_desktop_config.jsonfile
- Add the MCP server configuration:

{ "mcpServers": { "pymol": { "command": "[Full path to your venv python]", "args": ["[Full path to pymol_mcp_server.py]"] } } }
{ "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.
- Open PyMOL
- Go to Plugin → Plugin Manager
- Click on "Install New Plugin" tab
- Select "Choose file..." and navigate to the cloned repository
- Select thepymol-mcp-socket-plugin/__init__.pyfile
- Click "Open" and follow the prompts to install the plugin

- Go to Plugin → PyMOL MCP Socket Plugin
- Click "Start Listening"
- The status should change to "Listening on port 9876"

- You should see a hammer icon in the tools section when chatting
- Click it to access the PyMOL tools

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"

- 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

- 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-MCPShttps://join.slack.com/t/bio-mcpslack/shared_invite/zt-31z4pho39-K5tb6sZ1hUvrFyoPmKihAA</p>
<p>Contributions are welcome! Please feel free to submit a Pull Request.</p>
<p>This project is licensed under the MIT License - see the LICENSE file for details.</p>
<p>This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.</p>
<p>Performs gene set enrichment analysis using the Enrichr API, supporting all available gene set libraries.</p>
<p>An MCP server for the gget bioinformatics library, enabling standardized access to genomics tools and databases.</p>
<p>A unified framework for bioinformatics research, integrating multiple specialized MCP servers for longevity and bioinformatics.</p>
<p>Infer Copy Number Variations (CNVs) from single-cell RNA-Seq data using a natural language interface.</p>
<p>A natural language interface for cell-cell communication analysis using the Liana framework.</p>
<p>A natural language interface for single-cell RNA sequencing (scRNA-Seq) analysis using the Scanpy library.</p>
<p>Control anaerobic digestion modeling (ADM1) using natural language.</p>
<p>Bioinformatics data for AI agents — gene search, protein structures, clinical variants, PubMed literature, and DNA sequences via NCBI and UniProt. No API key required.</p>
<p>Interact with Omics AI Explorer networks for genomics research and data analysis.</p>
<p>Access the Protein Data Bank (PDB) for 3D structures of proteins and nucleic acids, with tools for structural analysis and comparison.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.