Logo di Agentic Pymol

Agentic Pymol

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

AutoreArcadia-Science
Repositoryagentic-pymol
LinguaPython
Fork
21
Stelle
104
Strumenti disponibili
0
Tipo di trasportostdio
LicenzaMIT
Link
  • Collega gli strumenti ai flussi di lavoro IA

    Agentic Pymol mette a disposizione funzionalità MCP utilizzabili da client e agenti IA compatibili.

  • 0 strumenti disponibili

    Esplora le azioni richiamabili qui sotto, con nomi e descrizioni quando forniti dal server.

  • Configurazione pronta da copiare

    Usa gli esempi di installazione per configurare questo server nel tuo client MCP preferito.

  • Indicatori di interesse open source

    104 stelle e 21 fork nel repository collegato.

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},
}

Usa MCP Agentic Pymol con più modelli IA

TypingMind collega gli strumenti MCP a livello di area di lavoro: una volta connesso Agentic Pymol, puoi usarlo con diversi modelli IA in TypingMind, senza configurarlo separatamente per ogni modello. Questa integrazione MCP viene eseguita localmente sul tuo dispositivo tramite il connettore MCP di TypingMind.

Guida alla configurazione del connettore locale

Usa questo metodo quando il server MCP deve accedere a file locali, app o risorse private sul tuo computer.

1

Apri le impostazioni MCP

In TypingMind, vai su Impostazioni, Impostazioni avanzate, poi su Model Context Protocol e scegli Configura MCP.

  1. Apri TypingMind nel tuo browser.
  2. Fai clic sull'icona Impostazioni.
  3. Vai a Impostazioni avanzate.
  4. Apri la sezione Model Context Protocol.
  5. Fai clic su Configura MCP e scegli Questo dispositivo.
Schermata di configurazione del connettore MCP di TypingMind con Questo dispositivo selezionato
2

Esegui il comando del connettore

Scegli Questo dispositivo, copia il comando da TypingMind ed eseguilo nel terminale. Lascia il processo in esecuzione mentre usi MCP.

  1. Copia il comando di configurazione mostrato da TypingMind.
  2. Apri Terminale su macOS o Windows Terminal su Windows.
  3. Incolla ed esegui il comando.
  4. Conferma l'installazione del pacchetto se il terminale ti chiede di procedere.
  5. Tieni aperta la finestra del terminale con il processo in esecuzione mentre usi gli strumenti MCP.
3

Aggiungi Agentic Pymol come server

Quando lo stato del connettore è Pronto, fai clic su Modifica server e incolla la configurazione del server MCP.

  1. Attendi che lo stato del connettore sia Pronto.
  2. Fai clic su Modifica server.
  3. Incolla la configurazione del server MCP di Agentic Pymol.
  4. Salva l'elenco dei server.
  5. Aggiorna per verificare che il connettore sia ancora pronto.
Impostazioni MCP di TypingMind con un server attivo e il pulsante Modifica server
{
  "mcpServers": {
    "agentic-pymol": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Usa la connessione con diversi modelli

Salva l'elenco dei server, apri Plugin, abilita gli strumenti MCP di Agentic Pymol, poi seleziona un modello IA supportato in TypingMind e usa gli strumenti in chat o assegnali a un agente IA.

  1. Apri la pagina Plugin in TypingMind.
  2. Abilita gli strumenti MCP di Agentic Pymol.
  3. Avvia una chat e scegli il modello IA che vuoi usare.
  4. Usa gli strumenti MCP in chat o assegnali a un agente IA.
  5. Passa a un altro modello IA quando serve, senza riconnettere MCP.
Chat di TypingMind che usa gli strumenti MCP abilitati con un modello IA selezionato
Puoi usare Agentic Pymol per aiutarmi con questa attività?
Agentic Pymol
Certo. Ho letto.
Ecco cosa ho trovato con Agentic Pymol.

Domande frequenti

A cosa serve il server MCP Agentic Pymol?

Agentic Pymol è un server MCP che consente ai client IA compatibili di accedere a strumenti e informazioni di contesto esterni. In TypingMind puoi aggiungere questo server MCP una sola volta e rendere disponibili i suoi strumenti nella tua area di lavoro IA.

Posso usare Agentic Pymol MCP con più modelli IA in TypingMind?

Sì. TypingMind collega gli strumenti MCP a livello di area di lavoro, quindi puoi usare Agentic Pymol con diversi modelli IA come Claude, ChatGPT, Gemini o altri modelli che hai configurato in TypingMind, senza dover configurare il server MCP separatamente per ogni modello.

Perché usare il connettore MCP Agentic Pymol con TypingMind?

TypingMind è una delle migliori interfacce per chattare con gli LLM perché riunisce più modelli IA, prompt, plugin, agenti IA, chiavi API e strumenti MCP in un'unica area di lavoro. Collegando Agentic Pymol, puoi usare i suoi strumenti MCP con i tuoi modelli preferiti e mantenere organizzato il tuo flusso di lavoro in chat su TypingMind.

Come collego Agentic Pymol MCP a TypingMind?

Agentic Pymol funziona tramite il connettore MCP locale di TypingMind. È la soluzione ideale quando il server MCP deve accedere a file locali, app desktop, strumenti da riga di comando o risorse private sul tuo computer.

Quali strumenti offre Agentic Pymol MCP in TypingMind?

Agentic Pymol mette a disposizione funzionalità MCP che puoi attivare dalla pagina Plugin di TypingMind e usare in chat o assegnare agli agenti IA.

Devo condividere le mie chiavi API con TypingMind per usare Agentic Pymol MCP?

No. TypingMind privilegia il funzionamento in locale e ti permette di mantenere il controllo su fornitori di modelli, chiavi API, prompt e configurazione MCP. Se Agentic Pymol richiede l'autenticazione, aggiungi le intestazioni, le impostazioni OAuth o la configurazione locale necessarie per quel server MCP quando crei la connessione.

Server MCP correlati

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇