pymol-cursor-mcp
pymol-cursor-mcp
通过 模型上下文协议 (MCP) 从 Cursor 控制 PyMOL。用通俗语言描述结构和样式;助手通过 XML‑RPC (run_command, run_python, pymol_get) 调用 PyMOL。
本项目封装并记录了一个 以 Cursor 为中心 的工作流。如果你更喜欢 CLI,同一个 MCP 服务器也适用于 Claude Code。
上游灵感: nagarh/pymol-claude-code (用于 Claude Code 的 PyMOL + MCP)。本仓库通过便携式 Cursor 配置、检查、脚本和安装文档扩展了该理念。
架构 (动画)
与 上游 flow.svg 相同的图表样式,针对 Cursor (青色节点) 进行了更新。使用 SVG/CSS 动画 (animateMotion, keyframes)。如果你的 Markdown 预览看起来是静态的,请直接在 GitHub 上打开 flow.svg 查看完整动画。
Related MCP server: MikroTik Cursor MCP
你将获得
组件 | 用途 |
| MCP 服务器 (stdio) → PyMOL XML‑RPC |
| 使用 |
| 针对 PyMOL 工具使用的智能体提示词 |
| 启动带有 |
| 健康检查:venv + MCP 导入 + 到 PyMOL 的 RPC |
| PyMOL 脚本示例 (标签 / 口袋) |
| 动画架构图 (与上游仓库样式相同) |
快速安装
git clone https://github.com/truong128/pymol-cursor-mcp.git
cd pymol-cursor-mcp
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -U pip
pip install -r requirements.txt
deactivate安装 PyMOL (推荐使用 conda‑forge),然后启动 RPC:
conda activate pymol_mcp # your env with pymol-open-source
pymol -R或者:./scripts/start_pymol_for_mcp.sh (执行 chmod +x 后)。
在 Cursor 中:打开文件夹 → 本仓库 → 设置 → MCP → 确认 pymol 已连接 → 如有必要,重启 Cursor。
python3 verify_stack.py应该打印:OK: MCP import + PyMOL RPC at http://localhost:9123
完整分步指南: INSTALL.md
日常使用
终端:
pymol -R或 VS Code/Cursor 任务: “PyMOL: start with XML-RPC”。Cursor: 在打开此文件夹的情况下使用聊天 / 智能体。
提示词: 例如 “Fetch 1hvr, cartoon on protein, sticks on ligand.”
与“仅限 Claude Code”上游相比的变更摘要
主题 | 本项目 |
IDE | 以 Cursor 为主;包含 |
RPC URL |
|
路径 |
|
Windows |
|
验证 |
|
PyMOL 启动 |
|
故障排除
MCP 已断开: 查看 Cursor 输出 → MCP 日志;重新创建
venv;将仓库根目录重新打开为工作区。PyMOL 错误 / 缺少
.dylib: 将 PyMOL 从 conda-forge 安装到专用环境中 (参见 INSTALL.md)。远程/HPC: 在编辑器运行的地方运行 MCP;隧道转发 RPC (
PYMOL_RPC_URL, SSH-R) — 详情见 INSTALL.md。
致谢
PyMOL MCP 构思及原始服务器:pymol-claude-code — Hemant Nagar。
封装及以 Cursor 为中心的文档:truong128。
许可证
MIT — 参见 LICENSE。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Connect ChatGPT, Claude, Cursor or VS Code to your Windows PC: files, terminal, browser, apps.
Run, debug, and triage tests from your IDE using natural language, no dashboard switching, no manual data transfers. The TestMu AI (formerly LambdaTest) MCP Server is a single remote server exposing four tool suites: HyperExecute — analyze your project, generate YAML configs and test runner commands, then monitor jobs and sessions. Automation — pull a TestID's details plus command, network, and console logs into one chat for instant root-cause analysis. Includes mobile app upload. SmartUI — explain pixel, layout, DOM, and perceptual changes in a visual regression run, with context-aware React/HTML/CSS fixes. Accessibility — audit any public URL or a local React app against WCAG and get ready-to-apply remediation steps. Connects over https://mcp.lambdatest.com/mcp using OAuth 2.1 — no API keys in your config. One-click install in Cursor; works with Claude, GitHub Copilot, Cline, and any MCP client. Tests execute on the TestMu AI cloud: 3,000+ browsers and 10,000+ real devices.
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables control of VMD2 for molecular dynamics analysis through natural language, allowing users to load structures, set representations, measure distances, compute RMSD, and render images without Tcl scripting.8-
- AlicenseNot gradedqualityCmaintenanceEnables natural language management of MikroTik routers through Cursor IDE by translating requests into RouterOS commands via API or SSH.4MIT
- AlicenseAqualityDmaintenanceEnables natural language control of UCSF ChimeraX for protein structure visualization, editing, and analysis through MCP clients.393MIT
- AlicenseCqualityBmaintenanceA Model Context Protocol server that lets you drive PyMOL with natural language, enabling structure loading, analytical views, measurements, and protein exploration through AI assistants.13517MIT