Skip to main content
Glama
truong128

pymol-cursor-mcp

by truong128

pymol-cursor-mcp

Steuern Sie PyMOL aus Cursor über das Model Context Protocol (MCP). Beschreiben Sie Strukturen und Stile in einfacher Sprache; der Assistent ruft PyMOL über XML‑RPC auf (run_command, run_python, pymol_get).

Dieses Projekt bündelt und dokumentiert einen Cursor-First-Workflow. Der gleiche MCP-Server funktioniert auch mit Claude Code, falls Sie dieses CLI bevorzugen.

Inspiration durch das Original: nagarh/pymol-claude-code (PyMOL + MCP für Claude Code). Dieses Repository erweitert diesen Ansatz um eine portable Cursor-Konfiguration, Prüfungen, Skripte und Installationsanleitungen.


Architektur (animiert)

Der gleiche Diagrammstil wie beim ursprünglichen flow.svg, aktualisiert für Cursor (cyanfarbener Knoten). Verwendet SVG/CSS-Animation (animateMotion, Keyframes). Falls Ihre Markdown-Vorschau statisch aussieht, öffnen Sie flow.svg direkt auf GitHub, um die vollständige Animation zu sehen.

Was Sie erhalten

Komponente

Zweck

pymol_mcp_server.py

MCP-Server (stdio) → PyMOL XML‑RPC

.cursor/mcp.json

Registriert den pymol MCP-Server unter Verwendung von ${workspaceFolder}

.cursor/rules/*.mdc

Agenten-Hinweise für die Nutzung von PyMOL-Tools

scripts/start_pymol_for_mcp.sh

Startet PyMOL mit -R (macOS/Linux)

verify_stack.py

Integritätsprüfung: venv + MCP-Import + RPC zu PyMOL

examples/restore_pocket_labels.pml

Beispiel-PyMOL-Skript (Beschriftungen / Tasche)

flow.svg

Animiertes Architekturdiagramm (gleicher Stil wie im ursprünglichen Repository)


Schnellinstallation

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

Installieren Sie PyMOL (conda‑forge empfohlen) und starten Sie dann RPC:

conda activate pymol_mcp          # your env with pymol-open-source
pymol -R

Oder: ./scripts/start_pymol_for_mcp.sh (nach chmod +x).

In Cursor: Ordner öffnen → dieses Repository → Einstellungen → MCP → bestätigen, dass pymol verbunden ist → Cursor bei Bedarf neu starten.

python3 verify_stack.py

Sollte Folgendes ausgeben: OK: MCP import + PyMOL RPC at http://localhost:9123

Vollständige Schritt-für-Schritt-Anleitung: INSTALL.md


Tägliche Nutzung

  1. Terminal: pymol -R oder VS Code/Cursor Task: „PyMOL: start with XML-RPC“.

  2. Cursor: Chat / Agent mit geöffnetem Ordner verwenden.

  3. Prompt: z. B. „Fetch 1hvr, cartoon on protein, sticks on ligand.“


Zusammenfassung der Änderungen gegenüber dem „Claude Code only“-Original

Thema

Hier

IDE

Cursor primär; .cursor/mcp.json, Regeln, Tasks

RPC URL

PYMOL_RPC_URL Umgebungsvariable (Standard http://localhost:9123)

Pfade

${workspaceFolder} — überall klonbar

Windows

.cursor/mcp.json.windows.example

Überprüfung

verify_stack.py

PyMOL-Start

scripts/start_pymol_for_mcp.sh + Task ausführen


Fehlerbehebung

  • MCP getrennt: Siehe Cursor Ausgabe → MCP-Protokolle; venv neu erstellen; Repository-Wurzel als Arbeitsbereich erneut öffnen.

  • PyMOL-Fehler / fehlende .dylib: Installieren Sie PyMOL von conda-forge in eine dedizierte Umgebung (siehe INSTALL.md).

  • Remote/HPC: Führen Sie MCP dort aus, wo Ihr Editor läuft; tunneln Sie RPC (PYMOL_RPC_URL, SSH -R) — Details in INSTALL.md.


Credits

  • PyMOL MCP-Idee und ursprünglicher Server: pymol-claude-code — Hemant Nagar.

  • Paketierung und Cursor-fokussierte Dokumentation: truong128.

Lizenz

MIT — siehe LICENSE.

F
license - not found
-
quality - not tested
C
maintenance

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/truong128/pymol-cursor-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server