
soo-jeongkim/co-pymol
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
PyMOL プラグイン - Claude コード、カーソル、または MCP クライアントから PyMOL をドライブします.
概要
Codex、Claude Code、Cursor、または電話からPyMOLをプレーン・イングリッシュで動かします。 PyMOL を MCP サーバーに変える PyMOL プラグインです。MCP クライアント (Codex, Claude Code, Cursor) から英語を操作できます。 スタートアップでは、公式の MCP Python SDK で構築された MCP サーバーを、PyMOL 独自の Python プロセス内で、pymol.cmd API をツールとして公開します。 - エージェントのウィンドウに、mmCIF を解析する gemmi-backed メトリクスレイヤーを経由して、エージェントのウィンドウで (pLDDT / ipTM / PAE) - エージェントをカスタム PyMOL プリセット/解析機能の .py に指し、それらを使用するように依頼 - 通常の - リモートセッションをサポートする MCP クライアントを介して Codex / Claude Code / Cursor のセッション例: - (通常のデスクトップインストール — プラグインは PyMOL のバンドルされた Python にインストールします。, お使いのシステム Python ではありません) - — Codex, Claude コード, または Cursor 3.12.17 以降.
概要(AI 翻訳)
Codex、Claude Code、Cursor、または電話からプレーン英語でPyMOLをドライブしてください。
**[[co-pymol**は、PyMOLをMCPサーバーに変えるPyMOLプラグインです。そのため、PyMOLコマンドを手動で入力する代わりに、MCPクライアント(Codex、Claude Code、Cursor)から英語に転送できます。 スタートアップでは、公式 MCP Python SDK で構築された MCP サーバーを、PyMOL 独自の Python プロセス内で、ツールとして [pymol.cmd API を公開します。
- 自動解析と視覚化を手作業で行なう代わりにエージェントで
-(pLDDT / ipTM / pTM / PAE) エージェントのウィンドウに mmCIF を解析する gemmi-backed メトリックレイヤーを経由して、自信値 (pLDDT / ipTM / pTM / PAE) を読み込みます
-独自のヘルパーでDrop - カスタムPyMOLプリセット/分析機能の[
.pyのエージェントを指し、それらを使用するように要求します -通常のSSHFS搭載クラスターパスで動作します -リモートセッションをサポートするMCPクライアントを介して電話からリモートコントロール
Codex デモ
[https://github.com/user-attachments/assets/bbbdbe32-bc59-4446-9bd1-3e4860af022e]
Codex / Claude Code / Cursor のセッション例:
要件
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
co-pymol
Drive PyMOL in plain English — from Codex, Claude Code, Cursor, or your phone.
co-pymol is a PyMOL plugin that turns PyMOL into an MCP server, so you can drive it in English from any MCP client (Codex, Claude Code, Cursor) instead of typing PyMOL commands by hand. On startup it spins up an MCP server — built on the official MCP Python SDK — inside PyMOL’s own Python process, exposing the pymol.cmd API as tools, so you can:
- Automate analysis and visualisation with an agent instead of doing it by hand
- Read confidence values (pLDDT / ipTM / pTM / PAE) on an agent’s window via a gemmi-backed metrics layer that parses mmCIF
- Drop in your own helpers — point the agent at a
.pyof custom PyMOL presets / analysis functions and ask it to use them - Work over SSHFS-mounted cluster paths as usual
- Remote-control from your phone through an MCP client that supports remote sessions
Codex demo
https://github.com/user-attachments/assets/bbbdbe32-bc59-4446-9bd1-3e4860af022e
An example session in Codex / Claude Code / Cursor:
> Load all the CIF files in /path/to/dir/w/predicted/structures/
[all the structures visible on PyMOL window]
Loaded all structures, sorted by mean pLDDT.
> Which one has the worst ipTM?
model_3 — ipTM 0.41 (others are 0.7+).
> Show me the low-confidence loops on structure_500.
[renders cartoon on PyMOL window, residues 142–168 highlighted, mean pLDDT 38]
Requirements
- PyMOL (a normal desktop install — the plugin installs into PyMOL’s bundled Python, not your system Python)
- An MCP client — Codex, Claude Code, or Cursor 3.12.17 or newer. Older Cursor versions may not refresh the tool list when PyMOL starts after Cursor.
- macOS — that’s all I’ve tested on :/ Linux / conda / non-standard installs should work in principle (the recipe is just “install into PyMOL’s bundled Python”) but these haven’t been tested.
Installing
If you prefer to have a coding agent (Claude Code, Cursor, Codex, etc.) do the install for you, point it at AGENTS.md — it’s the same recipe written for an agent to execute.
1. Clone and install
git clone https://github.com/soo-jeongkim/co-pymol.git
cd co-pymol
/Applications/PyMOL.app/Contents/bin/python -m pip install --user -e .
2. Set up the MCP client you use
Choose exactly one:
# Codex
/Applications/PyMOL.app/Contents/bin/python -m co_pymol setup codex
# Cursor
/Applications/PyMOL.app/Contents/bin/python -m co_pymol setup cursor
# Claude Code
/Applications/PyMOL.app/Contents/bin/python -m co_pymol setup claude
Each command installs the shared PyMOL startup hook and configures only the
selected client. The other clients do not need to be installed. The Codex and
Claude choices require their existing CLI on PATH; the Cursor choice writes
~/.cursor/mcp.json directly. These commands configure co-pymol for a client —
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →設定
{
"mcpServers": {
"pymol": {
"url": "http://127.0.0.1:8766/sse"
}
}
}