Agentic Pymol logo

Agentic Pymol

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

PublisherArcadia-Science
Repositoryagentic-pymol
LanguagePython
Forks
21
Stars
104
Available tools
0
Transport typestdio
LicenseMIT
Links
  • Connect tools to AI workflows

    Agentic Pymol exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    104 stars and 21 forks from the linked 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},
}

Use Agentic Pymol MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Agentic Pymol is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Agentic Pymol as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Agentic Pymol MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "agentic-pymol": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Agentic Pymol MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Agentic Pymol MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Agentic Pymol to help me with this task?
Agentic Pymol
Sure. I read it.
Here is what I found using Agentic Pymol.

Frequently asked questions

What is the Agentic Pymol MCP server used for?

Agentic Pymol is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Agentic Pymol MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Agentic Pymol with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Agentic Pymol MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Agentic Pymol connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Agentic Pymol MCP to TypingMind?

Agentic Pymol runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Agentic Pymol MCP provide in TypingMind?

Agentic Pymol exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Agentic Pymol MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Agentic Pymol requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇