配体MPNN MCP
通过Docker使用Ligand MPNN进行配体感知蛋白质序列设计
用于蛋白质设计的MCP(模型上下文协议)服务器,具有7个核心工具:
- 利用配体上下文感知设计蛋白质序列
- 对蛋白质序列的可能性进行评分
- 具有固定/重新设计残留物的约束设计
- 仅使用骨干坐标的CA设计
- 提交具有异步作业跟踪功能的大规模批处理设计作业
- 监控和检索设计结果
- 列出可用的示例结构
Docker快速入门
方法1:从GitHub中提取预构建映像
最快的开始方式。每次发布时,预构建的Docker镜像都会自动发布到GitHub容器注册表。
# Pull the latest image
docker pull ghcr.io/macromnex/ligandmpnn_mcp:latest
# Register with Claude Code (runs as current user to avoid permission issues)
claude mcp add ligandmpnn -- docker run -i --rm --user `id -u`:`id -g` --gpus all --ipc=host -v `pwd`:`pwd` ghcr.io/macromnex/ligandmpnn_mcp:latest注: 从项目目录运行。 ` pwd ` 展开到当前工作目录。
要求:
- 支持GPU的Docker(
nvidia-docker或带有NVIDIA运行时的Docker) - 已安装克劳德代码
就是这样!LigandMPN-MCP服务器现在可以在Claude Code中使用。
______________________________________________________________________
方法2:在本地构建Docker镜像
自己构建映像并将其安装到Claude Code中。适用于自定义或离线环境。
# Clone the repository
git clone https://github.com/MacromNex/ligandmpnn_mcp.git
cd ligandmpnn_mcp
# Build the Docker image
docker build -t ligandmpnn_mcp:latest .
# Register with Claude Code (runs as current user to avoid permission issues)
claude mcp add ligandmpnn -- docker run -i --rm --user `id -u`:`id -g` --gpus all --ipc=host -v `pwd`:`pwd` ligandmpnn_mcp:latest注: 从项目目录运行。 ` pwd ` 展开到当前工作目录。
要求:
- 支持GPU的Docker
- 已安装克劳德代码
- Git(克隆存储库)
关于Docker标志:
-i--Claude Code的交互模式--rm--退出后自动移除容器- `
--userid -u:id -g` --以当前用户身份运行容器,因此输出文件归您所有(不是root) --gpus all--授予对所有可用GPU的访问权限--ipc=host--将主机IPC命名空间用于PyTorch共享内存-v--装载您的项目目录,以便容器可以访问您的数据
______________________________________________________________________
验证安装
添加MCP服务器后,您可以验证它是否正常工作:
# List registered MCP servers
claude mcp list
# You should see 'ligandmpnn' in the output在Claude Code中,您现在可以使用所有7个LigandMPNN工具:
simple_designsequence_scoringconstrained_designca_only_designsubmit_batch_designget_job_statusget_job_result
______________________________________________________________________
后续步骤
- 详细文件:参见 detail.md 有关以下内容的全面指南:
- 可用的MCP工具和参数 - 本地Python环境设置(Docker的替代方案) - 示例工作流和用例 - 配置文件选项 - 故障排除
______________________________________________________________________
使用示例
注册后,您可以直接在Claude Code中使用LigandMPNN工具。以下是一些常见的工作流程:
示例1:配体感知蛋白设计
I have a protein-ligand complex at /path/to/1BC8.pdb. Can you use simple_design to generate 5 sequences that are optimized for the ligand binding context and save results to /path/to/results/?示例2:具有固定残留物的约束设计
I want to redesign /path/to/protein.pdb while keeping the N-terminal residues fixed at positions 1, 2, 3. Can you use constrained_design with fixed_positions "1 2 3" and generate 3 sequences, saving to /path/to/results/?示例3:批量设计作业
I have many PDB files in /path/to/structures/ directory. Can you submit a batch design job using submit_batch_design for all .pdb files, generate 10 sequences each, and save results to /path/to/results/? Monitor the job until it finishes.______________________________________________________________________
故障排除
找不到Docker?
docker --version # Install Docker if missingGPU无法访问?
- 确保安装了NVIDIA Docker运行时
- 请检查:
docker run --gpus all ubuntu nvidia-smi
未找到克劳德代码?
# Install Claude Code
npm install -g @anthropic-ai/claude-code______________________________________________________________________
许可证
麻省理工学院——基于 配体MPNN Dauparas等人。
