Cover image
Try Now
2025-03-19

3 years

Works with Finder

3

Github Watches

1

Github Forks

9

Github Stars

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

  1. Open Claude Desktop
  2. Go to Claude > Settings > Developer > Edit Config
  3. This will open the claude_desktop_config.json file
  4. 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

  1. Open PyMOL
  2. Go to Plugin → Plugin Manager
  3. Click on "Install New Plugin" tab
  4. Select "Choose file..." and navigate to the cloned repository
  5. Select the pymol-mcp-socket-plugin/__init__.py file
  6. Click "Open" and follow the prompts to install the plugin

Usage

Starting the Connection

  1. In PyMOL:

    • Go to Plugin → PyMOL MCP Socket Plugin
    • Click "Start Listening"
    • The status should change to "Listening on port 9876"
  2. 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

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.

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • INFOLAB OPERATIONS 2
  • A medical specialist offering assistance grounded in clinical guidelines. Disclaimer: This is intended for research and is NOT safe for clinical use!

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • Yasir Eryilmaz
  • AI scriptwriting assistant for short, engaging video content.

  • Daren White
  • A supportive coach for mastering all Spanish tenses.

  • J. DE HARO OLLE
  • Especialista en juegos de palabras en varios idiomas.

  • apappascs
  • Descubra la colección más completa y actualizada de servidores MCP en el mercado. Este repositorio sirve como un centro centralizado, que ofrece un extenso catálogo de servidores MCP de código abierto y propietarios, completos con características, enlaces de documentación y colaboradores.

  • ShrimpingIt
  • Manipulación basada en Micrypthon I2C del expansor GPIO de la serie MCP, derivada de AdaFruit_MCP230xx

  • huahuayu
  • Una puerta de enlace de API unificada para integrar múltiples API de explorador de blockchain similar a Esterscan con soporte de protocolo de contexto modelo (MCP) para asistentes de IA.

  • deemkeen
  • Controle su MBOT2 con un combo de potencia: MQTT+MCP+LLM

  • zhaoyunxing92
  • 本项目是一个钉钉 MCP (Protocolo del conector de mensajes )服务 , 提供了与钉钉企业应用交互的 API 接口。项目基于 Go 语言开发 支持员工信息查询和消息发送等功能。 支持员工信息查询和消息发送等功能。

  • pontusab
  • La comunidad de cursor y windsurf, encontrar reglas y MCP

    Reviews

    1 (1)
    Avatar
    user_abYzW9ms
    2025-04-15

    As a dedicated MCP user, I highly recommend FridayAI by VedantRGosavi. This innovative product is incredibly efficient and user-friendly, enhancing productivity with seamless AI integration. The effortless accessibility through https://mcp.so/server/fridayAI/VedantRGosavi streamlines tasks and optimizes workflow. Whether you're a novice or a tech-savvy individual, FridayAI is a must-have tool that impressively supports diverse needs.