pymol-cursor-mcp
pymol-cursor-mcp
Model Context Protocol (MCP) を介して、Cursor から PyMOL を制御します。構造やスタイルを平易な言葉で記述すると、アシスタントがXML‑RPC (run_command, run_python, pymol_get) を通じてPyMOLを呼び出します。
このプロジェクトは、Cursorファーストなワークフローをパッケージ化し、ドキュメント化したものです。同じMCPサーバーは、CLIを好む場合は 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
deactivatePyMOL をインストールし (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: このフォルダーを開いた状態でチャット / エージェントを使用。
プロンプト: 例: “1hvrを取得して、タンパク質をカートゥーン表示、リガンドをスティック表示にして。”
アップストリーム(Claude Code専用)からの変更点まとめ
トピック | 本リポジトリ |
IDE | Cursor がメイン; |
RPC URL |
|
パス |
|
Windows |
|
検証 |
|
PyMOL起動 |
|
トラブルシューティング
MCPが切断される: Cursorの 出力 → MCPログ を確認してください。
venvを再作成し、リポジトリのルートをワークスペースとして再度開いてください。PyMOLエラー /
.dylibが見つからない: conda-forge から専用の環境にPyMOLをインストールしてください (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