Logo vun Agentic Pymol

Agentic Pymol

Organisatioun
Arcadia-Science

A Model Context Protocol (MCP) server that exposes PyMOL as a typed tool surface to your agent (Claude Code/Desktop, Codex, or any MCP-compatible client)

EditeurArcadia-Science
Repositoryagentic-pymol
SproochPython
Forks
21
Stären
104
Disponibel Tools
0
Transporttypstdio
LizenzMIT
Linken
  • Tools mat KI-Workflows verbannen

    Agentic Pymol 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

    104 Stären an 21 Forks aus dem verlinkte Repository.

Agentic PyMOL

https://github.com/user-attachments/assets/43524828-0fcc-44e5-bcd6-c912e7f865b1

Description

A lightweight Model Context Protocol (MCP) server that exposes PyMOL as a typed tool surface for general-purpose agents.

Use it with Claude Code, Claude Desktop, Codex, or any MCP-compatible client to let your agent control an open PyMOL session, inspect molecular structures, run PyMOL-native analyses, and render what it sees.

Agentic PyMOL is not an embedded chatbot and not a molecular workbench. It is a small bridge between a capable agent and the PyMOL session you already use.

What you can do

Ask your agent to use PyMOL directly:

text
* Fetch ubiquitin, show it as cartoon, color by secondary structure, and render a PNG.
* Create a table of residues that are in contact with DNA in the DNA-binding protein 6EDC.
* Load these two structures, align chain A, report the RMSD, and show the regions that moved the most.
* Which of these 10 binders trigger a conformational shift in the target activation loop?

For a brief showcase of abilities, see this 6-minute demonstration of how you can use Agentic PyMOL to conduct meaningful structural analysis with natural language:

Agentic PyMOL demonstration

Design goals

  • Use the PyMOL you already have. Works with your existing PyMOL installation; PyMOL 2.6+ is supported.
  • No insular chatbot. PyMOL is exposed to your general-purpose agent rather than wrapping PyMOL in its own chat interface.
  • Two-way communication. The agent can manipulate the live PyMOL session and read structured information back out for reasoning, answers, and downstream work.
  • Typed over textual. Return objects, chains, coordinates, distances, RMSDs, views, sequences, and errors as data -- not just “succeeded.”
  • PyMOL-native first. Stay focused on visualization, selection logic, geometry, alignments, rendering, and session inspection.
  • Lightweight and composable. Do not bundle docking, sequence search, conservation analysis, prediction services, or external biology APIs; let other tools handle those jobs.

Install

For a video walkthrough of the setup, watch this explanation:

Agentic PyMOL setup walkthrough

Requires:

  • PyMOL 2.6+
  • uv
  • an MCP client, such as Claude Code or Claude Desktop

1. Clone and sync

bash
git clone https://github.com/Arcadia-Science/agentic-pymol.git
cd agentic-pymol
uv sync

uv sync installs the agentic-pymol console script into .venv/bin/agentic-pymol.

2. Install the PyMOL plugin

In PyMOL:

  1. Open Plugin → Plugin Manager → Install New Plugin → Choose file…
  2. Select pymol_plugin/__init__.py from this repo.
  3. Open Plugin → agentic-pymol plugin → Start Listening.

[!WARNING] PyMOL 3.1.0 built against PyQt6 (e.g. the current Homebrew pymol 3.1.0 on macOS) crashes during the installation above. This is an upstream PyMOL bug. If you encounter this issue, there is a simple workaround here: https://github.com/Arcadia-Science/agentic-pymol/issues/3#issuecomment-4673331480.

3. Register the MCP server

Claude Code:

bash
claude mcp add --scope user pymol /absolute/path/to/agentic-pymol/.venv/bin/agentic-pymol

Verify the MCP server is registered:

bash
claude mcp list

Codex CLI:

bash
codex mcp add pymol -- /absolute/path/to/agentic-pymol/.venv/bin/agentic-pymol

Verify the MCP server is registered:

bash
codex mcp list

VS Code Copilot:

Add the following to your User mcp.json (MCP: Open User Configuration)

    "agentic-pymol": {
      "type": "stdio",
      "command": "/absolute/path/to/agentic-pymol/.venv/bin/agentic-pymol"
    },

[!NOTE] Using a different MCP client? Please open a GitHub issue, or even better, send a pull request adding the registration instructions for your client.

You've successfully installed Agentic PyMOL. See the next section for how to use it.

How to use

Before your agent can control PyMOL, you must tell the plugin to start listening. You have to do this each PyMOL session. In PyMOL, open Plugin → agentic-pymol plugin → Start Listening. This opens the socket that the MCP server connects to.

Agentic PyMOL plugin

You can also start it from PyMOL's prompt instead of the dialog, which is useful for scripted or headless sessions:

python
from pymol_plugin import start_listening, stop_listening
start_listening(9877)

start_listening returns once the accept thread is up; if the port turns out to be in use, that is reported in the log rather than through the return value.

[!NOTE] Currently Agentic PyMOL supports one PyMOL session bridged to one MCP server. Multiple agent conversations can talk to that single PyMOL concurrently, but a single MCP server doesn't currently see more than one PyMOL session at a time. Multi-session support is a candidate future feature. Please open an issue if it would help your workflow.

The plugin defaults to port 9877. You can choose a different port during the "start listening" dialog box in the PyMOL plugin, and setting the MCP server's PYMOL_MCP_PORT env var to match. For example, using Claude Code:

bash
$ export PYMOL_MCP_PORT=9870
$ claude

You can now communicate with PyMOL through your LLM. Test it out:

text
Fetch ubiquitin and color by secondary structure

Similar projects

Agentic PyMOL is not the first PyMOL/LLM integration. Agentic PyMOL is intentionally narrow: a lightweight, typed MCP bridge to the PyMOL installation you already use. These projects explore nearby ideas with different emphases.

  • vrtejus/pymol-mcp - Early demonstrator of the core value of connecting PyMOL to LLM agents through MCP. Agentic PyMOL builds on that idea with typed tool outputs, structured session readback, and shared-secret authentication.
  • MCPymol - a PyMOL MCP server that leverages the MCP as a thin command tunnel to carry out specific visualization-oriented workflows. In comparison, Agentic PyMOL is focused on supporting a lightweight and unopinionated tool surface that returns structured data to the LLM.
  • nagarh/pymol-claude-code - a compact Claude Code-only MCP that controls PyMOL through its XML-RPC mode (pymol -R) that requires launching PyMOL from the command line. This shares the goal of giving agents live access to PyMOL, but opts for just three MCP tools (run_command, run_python, pymol_get). In contrast, Agentic PyMOL surfaces discoverable tools with structured readback.
  • ChatMol - a broader molecular-design assistant with a PyMOL plugin, PyMOL skill, Streamlit interface, Python package, and copilot-style workflows. It is closer to a molecular-agent environment than a bridge between your existing LLM agent and PyMOL. Creates an insular environment.
  • ravishar313/PyMolAI - an AI-oriented fork of open-source PyMOL with a Qt chat panel, internal PyMOL tools, model-provider integration, and optional OpenBio tools. Creates an insular environment.
  • pymol-agent-bridge - an interesting MCP-less socket bridge that lets terminal-capable agents send Python/PyMOL commands to a live PyMOL session. pymol-agent-bridge is a CLI/library bridge.

How to cite

If you use/reference this tool in your research, please cite the following work:

Agentic PyMOL: Structural analysis in PyMOL through natural language

bib
@article{Golden2026Agentic,
	author = {Golden, James R. and Kiefl, Evan},
	journal = {The Stacks},
	doi = {10.57844/arcadia-gsbx-phd2},
	year = {2026},
	month = {jun 3},
	publisher = {Radial},
	title = {Agentic {PyMOL}: Structural analysis in {PyMOL} through natural language},
	url = {https://thestacks.org/publications/resource-agentic-pymol/v1},
}

Agentic Pymol MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal Agentic Pymol 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

Agentic Pymol 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 Agentic Pymol 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": {
    "agentic-pymol": {
      "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 Agentic Pymol. 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 Agentic Pymol.
  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 Agentic Pymol?
Agentic Pymol
Jo. Ech hunn et gelies.
Dat hunn ech mat Agentic Pymol fonnt.

Heefeg gestallte Froen

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

Agentic Pymol 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 Agentic Pymol MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir Agentic Pymol 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 Agentic Pymol 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 Agentic Pymol 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 Agentic Pymol MCP mat TypingMind?

Agentic Pymol 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 Agentic Pymol MCP an TypingMind zur Verfügung?

Agentic Pymol 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 Agentic Pymol 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 Agentic Pymol 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 👇