Logo vun Pymol Claude MCP

Pymol Claude MCP

Communautéit
stavasol96-arch

MCP server that connects Claude Code to a live PyMOL session over XML-RPC

Editeurstavasol96-arch
RepositoryPymol-Claude-MCP
SproochPython
Forks
12
Stären
65
Disponibel Tools
0
Transporttypstdio
Linken
  • Tools mat KI-Workflows verbannen

    Pymol Claude MCP stellt MCP-Funktioune bereit, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • 0 disponibel Tools

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an Ärem bevorzugte MCP-Client ze konfiguréieren.

  • Indicateure fir Open Source

    65 Stären an 12 Forks aus dem verlinkte Repository.

Pymol-Claude-MCP

An MCP server that lets Claude Code drive a live PyMOL session — fetch structures, build selections, adjust representations and coloring, measure distances — by talking to PyMOL's built-in XML-RPC server.

How it works

PyMOL ships with an XML-RPC server (enabled via pymol -R) that exposes its command API on localhost:9123. pymol_server.py wraps that in three MCP tools so Claude can call them like any other tool:

ToolPurpose
pymol_commandRun one PyMOL command, exactly as you'd type it at the PyMOL prompt
pymol_scriptRun a block of Python inside PyMOL's embedded interpreter (loops, cmd.* calls, etc.)
pymol_queryCall any PyMOL XML-RPC method directly and get the return value back (for read-only lookups like atom counts or chain lists)

Claude decides which tool fits the request and supplies the PyMOL command or code itself — this server is just the transport layer.

Prerequisites

  • PyMOL (with XML-RPC support — the open-source build includes it)
  • Claude Code: npm install -g @anthropic-ai/claude-code
  • Python 3.10+

Setup

1. Clone this repo and install dependencies

bash
git clone https://github.com/<your-username>/Pymol-Claude-MCP
cd Pymol-Claude-MCP
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

2. Make PyMOL start its RPC server automatically (optional but recommended)

By default you'd need to launch PyMOL from a terminal with pymol -R every time. Instead, symlink autostart/pymolrc.py to ~/.pymolrc.py — a script PyMOL runs on every launch — so RPC starts silently whether you open PyMOL from the command line, Spotlight, or the Dock:

bash
ln -sf "$(pwd)/autostart/pymolrc.py" ~/.pymolrc.py

From now on, just open PyMOL normally. It listens for the MCP server on port 9123 (override with PYMOL_RPC_PORT).

If you'd rather not touch ~/.pymolrc.py, start it manually instead each time: pymol -R.

3. Register the server with Claude Code

bash
claude mcp add pymol $(pwd)/venv/bin/python3 $(pwd)/pymol_server.py
claude mcp list

You should see:

pymol: .../venv/bin/python3 .../pymol_server.py - ✓ Connected

4. Launch Claude Code

bash
claude

PyMOL must already be running (with RPC active — automatic if you did step 2, otherwise via pymol -R) before Claude Code starts, or the server will fail to connect.

Using a different port

If 9123 is taken, start PyMOL's RPC server on another port and point the MCP server at it:

bash
pymol -cq -d "rpc_launch(port=49123)"
bash
claude mcp add pymol $(pwd)/venv/bin/python3 $(pwd)/pymol_server.py -- --port 49123

(or set PYMOL_RPC_PORT=49123 in the environment instead of passing --port)

Remote setup (PyMOL local, Claude Code on a remote host)

If PyMOL runs on your own machine but Claude Code runs elsewhere (e.g. an HPC login node), open an SSH reverse tunnel so the remote host can reach your local PyMOL's RPC port:

bash
ssh -R 9123:localhost:9123 <user>@<remote-host>

Then follow the same setup steps on the remote host, pointing claude mcp add at a Python environment there.

Example prompts

  • "Fetch 1hho and show it as a cartoon"
  • "Remove waters and switch to surface representation"
  • "Select everything within 4 Å of the ligand"
  • "Color helices salmon and the ligand yellow"
  • "How many chains are in this structure?"

Auto-approving tool calls

By default, Claude Code confirms before each PyMOL tool call. To skip that, add to ~/.claude/settings.json:

json
{
  "permissions": {
    "allow": ["mcp__pymol__*"]
  }
}

Note that pymol_script executes arbitrary Python inside the PyMOL process — treat auto-approval the same way you would for any tool that runs unrestricted code locally.

Troubleshooting

zsh: command not found: pymol

  • The macOS .app build of PyMOL doesn't put pymol on your PATH. Either use the full path — /Applications/PyMOL.app/Contents/bin/pymol -R — or add that directory to your PATH.

MCP server shows failed

  • Confirm PyMOL is running with RPC active (automatic with autostart/pymolrc.py, or via -R)
  • Confirm the port matches between PyMOL and the --port/PYMOL_RPC_PORT value
  • Restart Claude Code after changing the port

Connection refused

  • PyMOL must be started before Claude Code connects to the MCP server
  • If using the SSH tunnel setup, confirm the tunnel is still open (Ctrl+C closes it)

Pymol Claude MCP MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal Pymol Claude MCP verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector mat „Dësen Apparat“ ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Pescht de Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

Pymol Claude MCP als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a pescht d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Pescht d'MCP-Serverkonfiguratioun vu Pymol Claude MCP an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "pymol-claude-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vu Pymol Claude MCP. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vu Pymol Claude MCP.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat Pymol Claude MCP?
Pymol Claude MCP
Jo. Ech hunn et gelies.
Dat hunn ech mat Pymol Claude MCP fonnt.

Heefeg gestallte Froen

Fir wat gëtt de MCP-Server Pymol Claude MCP benotzt?

Pymol Claude MCP ass e MCP-Server, deen et kompatibele KI-Clienten erlaabt, sech mat externen Tools a Kontext ze verbannen. An TypingMind kënnt Dir dëse MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech Pymol Claude MCP MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir Pymol Claude MCP mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni de MCP-Server fir all Modell separat anzeriichten.

Firwat Pymol Claude MCP MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann Pymol Claude MCP verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Är Chataarbecht an TypingMind organiséieren.

Wéi verbannen ech Pymol Claude MCP MCP mat TypingMind?

Pymol Claude MCP leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann de MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt Pymol Claude MCP MCP an TypingMind zur Verfügung?

Pymol Claude MCP stellt MCP-Funktiounen zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agenten zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir Pymol Claude MCP MCP ze benotzen?

Nee. TypingMind setzt op lokal Veraarbechtung a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann Pymol Claude MCP eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir dee MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇