
vrtejus/pymol-mcp 是从 https://github.com/vrtejus/pymol-mcp. 导入的 MCP 服务器候选。
概览
vrtejus/pymol-mcp 是从 https://github.com/vrtejus/pymol-mcp. 导入的 MCP 服务器候选。
概述(AI 翻译)
PyMOL-MCP 通过模型上下文协议(MCP)将 PyMOL 与 Claude AI 连接,使 Claude 能够直接与 PyMOL 交互和控制。这一强大的集成支持了对话式结构生物学、分子可视化和自然语言分析。
https://github.com/user-attachments/assets/687f43dc-d45e-477e-ac2b-7438e175cb36
特色
- 双向通信:通过基于套接字的服务器将Claude AI连接到PyMOL
- 智能命令解析:PyMOL命令的自然语言处理
- 分子可视化控制:操作表示、颜色和视图
- 结构分析:进行测量、比对及其他分析
- 代码执行:在Claude中运行任意Python代码
安装指南
先决条件
- 安装在你系统上的PyMOL
- 桌面版 Claude
- Python 3.10 或更新版本
- 走
步骤1:安装UV包管理器
在macOS上:
在Windows上:
其他平台请访问紫外线安装指南。
第二步:克隆仓库
第三步:环境搭建
创建并激活Python虚拟环境:
在macOS/Linux上:
在Windows上:
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 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.jsonfile - 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__.pyfile - 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:
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"pymol": {
"command": "[Full path to your venv python]",
"args": ["[Full path to pymol_mcp_server.py]"]
}
}
}