Logo van Agentic Pymol

Agentic Pymol

Organisatie
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)

UitgeverArcadia-Science
Repositoryagentic-pymol
TaalPython
Forks
21
Sterren
104
Beschikbare tools
0
Transporttypestdio
LicentieMIT
Links
  • Koppel tools aan AI-workflows

    Agentic Pymol biedt MCP-functionaliteit die compatibele AI-clients en agenten kunnen gebruiken.

  • 0 beschikbare tools

    Bekijk hieronder de aanroepbare acties, inclusief namen en beschrijvingen als de server die beschikbaar stelt.

  • Configuratie om direct te kopiëren

    Gebruik de installatievoorbeelden om deze server in je favoriete MCP-client te configureren.

  • Indicatoren van opensource-interesse

    104 sterren en 21 forks in de gekoppelde 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},
}

Gebruik Agentic Pymol MCP met meerdere AI-modellen

TypingMind koppelt MCP-tools aan de werkruimte. Zodra Agentic Pymol is verbonden, kun je deze dus met verschillende AI-modellen in TypingMind gebruiken, zonder de verbinding voor elk model apart in te stellen. Deze MCP-integratie draait lokaal via de TypingMind MCP-connector op je apparaat.

Installatiehandleiding voor de lokale connector

Gebruik dit als de MCP-server toegang nodig heeft tot lokale bestanden, apps of privébronnen op je computer.

1

Open de MCP-instellingen

Ga in TypingMind naar Instellingen, Geavanceerde instellingen en vervolgens Model Context Protocol. Kies daar Connector instellen.

  1. Open TypingMind in je browser.
  2. Klik op het pictogram Instellingen.
  3. Ga naar Geavanceerde instellingen.
  4. Open het gedeelte Model Context Protocol.
  5. Klik op Connector instellen en kies Dit apparaat.
Instelscherm voor de TypingMind MCP-connector met Dit apparaat geselecteerd
2

Voer de connectoropdracht uit

Kies Dit apparaat, kopieer de opdracht uit TypingMind en voer deze uit in Terminal. Laat het proces draaien zolang je MCP gebruikt.

  1. Kopieer de installatieopdracht die TypingMind toont.
  2. Open Terminal op macOS of Windows Terminal op Windows.
  3. Plak de opdracht en voer deze uit.
  4. Keur de pakketinstallatie goed als Terminal vraagt of je wilt doorgaan.
  5. Laat het proces in het Terminal-venster draaien zolang je MCP-tools gebruikt.
3

Voeg Agentic Pymol toe als server

Klik op Servers bewerken zodra de connectorstatus Gereed is en plak de MCP-serverconfiguratie.

  1. Wacht tot de connectorstatus Gereed aangeeft.
  2. Klik op Servers bewerken.
  3. Plak de MCP-serverconfiguratie van Agentic Pymol.
  4. Sla de serverlijst op.
  5. Vernieuw om te controleren of de connector nog steeds klaar is voor gebruik.
MCP-instellingen van TypingMind met een actieve server en de knop Servers bewerken
{
  "mcpServers": {
    "agentic-pymol": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Gebruik de verbinding met verschillende modellen

Sla de serverlijst op, open Plug-ins en schakel de MCP-tools van Agentic Pymol in. Selecteer vervolgens een ondersteund AI-model in TypingMind en gebruik de tools in de chat of wijs ze toe aan een AI-agent.

  1. Open de pagina Plug-ins in TypingMind.
  2. Schakel de MCP-tools van Agentic Pymol in.
  3. Start een chat en kies het AI-model dat je wilt gebruiken.
  4. Gebruik de MCP-tools in een chat of wijs ze toe aan een AI-agent.
  5. Schakel wanneer nodig over naar een ander AI-model zonder opnieuw verbinding te maken met MCP.
TypingMind-chat met ingeschakelde MCP-tools en een geselecteerd AI-model
Kun je Agentic Pymol gebruiken om me hiermee te helpen?
Agentic Pymol
Zeker. Ik heb het gelezen.
Dit vond ik met Agentic Pymol.

Veelgestelde vragen

Waarvoor wordt de MCP-server Agentic Pymol gebruikt?

Agentic Pymol is een MCP-server waarmee compatibele AI-clients verbinding kunnen maken met externe tools en context. In TypingMind hoef je deze MCP-server maar één keer toe te voegen om de tools beschikbaar te maken in je AI-werkruimte.

Kan ik Agentic Pymol MCP met meerdere AI-modellen in TypingMind gebruiken?

Ja. TypingMind verbindt MCP-tools op werkruimteniveau. Daardoor kun je Agentic Pymol gebruiken met verschillende AI-modellen, zoals Claude, ChatGPT, Gemini of andere modellen die je in TypingMind hebt ingesteld, zonder de MCP-server voor elk model afzonderlijk in te stellen.

Waarom Agentic Pymol MCP gebruiken met TypingMind?

TypingMind is een van de beste interfaces voor chats met LLM's, omdat het meerdere AI-modellen, prompts, plug-ins, AI-agenten, API-sleutels en MCP-tools samenbrengt in één werkruimte. Als Agentic Pymol verbonden is, kun je de MCP-tools ervan gebruiken met je favoriete modellen en je chatworkflow overzichtelijk houden in TypingMind.

Hoe verbind ik Agentic Pymol MCP met TypingMind?

Agentic Pymol werkt via de lokale MCP-connector van TypingMind. Dit is de beste optie als de MCP-server toegang nodig heeft tot lokale bestanden, desktopapps, opdrachtregeltools of privébronnen op je computer.

Welke tools biedt Agentic Pymol MCP in TypingMind?

Agentic Pymol biedt MCP-functies die je kunt inschakelen via de pagina Plug-ins in TypingMind. Je kunt ze gebruiken in chats of toewijzen aan AI-agenten.

Moet ik mijn API-sleutels delen met TypingMind om Agentic Pymol MCP te gebruiken?

Nee. TypingMind werkt in de eerste plaats lokaal en laat je de controle houden over je modelaanbieders, API-sleutels, prompts en MCP-configuratie. Als Agentic Pymol authenticatie vereist, voeg je bij het maken van de verbinding de vereiste headers, OAuth-instellingen of lokale configuratie voor die MCP-server toe.

Gerelateerde MCP-servers

Toon alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇