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.

Related MCP server: vmd-mcp

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.

Related MCP Connectors

  • Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.

  • Remote data science agents for Snowflake, Databricks & BigQuery in Claude/Cursor via MCP

  • 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