coot
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
cootmcp
An MCP (Model Context Protocol) server that lets Claude control Coot — the macromolecular graphics program — interactively.
Claude can load structures and maps, navigate the view, run refinement, validate geometry, and see the live Coot window via screenshots, creating a feedback loop between Claude's reasoning and what you see on screen.

How it works
Claude (MCP client)
│ stdio JSON-RPC
▼
server.py (MCP server)
│ │
│ XML-RPC │ screencapture
│ port 40000 │
▼ ▼
Coot 1.x macOS window
(coot-1) → PNG → Claude sees itserver.pyruns as an MCP serverIt connects to a running Coot session via Coot's built-in XML-RPC interface (enabled by
coot_startup.py)The
screenshot_coottool captures the native Coot window and returns it as an inline image Claude can see
Related MCP server: freecad-mcp
Requirements
macOS (uses
screencaptureand AppleScript for window capture)CCP4 9 with Coot 1.x installed at
/Applications/ccp4-9/Python 3.9+
Install Python dependencies:
pip install -r requirements.txtSetup
1. Register the MCP server with Claude
Tip: If you have any trouble with the following steps, ask Claude Code for help!
Add to your Claude Desktop config at ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"coot": {
"command": "python",
"args": ["/Users/yourname/Claude/cootmcp/server.py"]
}
}
}Or for the claude CLI, add to ~/.config/claude/mcp.json:
{
"coot": {
"command": "python",
"args": ["/Users/yourname/Claude/cootmcp/server.py"]
}
}2. Restart Claude Desktop (or reload the CLI)
The coot MCP server will appear in your tools list.
Usage
Tip: I have found running the tool through Claude Code to be the most reliable method for getting started as opposed to Claude Chat. This also permits editing cootmcp if bugs are encountered along the way!
Once registered, Claude has access to tools such as:
Tool | What it does |
| Start Coot 1.x and enable XML-RPC; run this first |
| Capture the live Coot window — Claude sees the image |
| Check connection and list loaded molecules |
| Load a PDB or mmCIF file |
| Load an MTZ map (specify F and PHI column labels) |
| List all loaded molecules and maps with their numbers |
| Navigate to a specific chain/residue |
| Adjust map contour level (in sigma units) |
| Run real-space refinement on residues |
| Check Ramachandran and rotamer scores |
| Load accumulated tips and lessons from past sessions |
| Save a new lesson or finding for future sessions |
| Execute arbitrary Python in Coot (escape hatch) |
Example conversation
You: Load 1abc.pdb and show me what it looks like.
Claude: [calls launch_coot, load_structure, screenshot_coot]
Here's the structure loaded in Coot — I can see a well-ordered
protein chain. The map appears...
You: Navigate to residue A45 and check the fit.
Claude: [calls go_to_residue, screenshot_coot]
Residue A45 (Lys) looks like it may have a rotamer issue —
the sidechain is reaching outside the density. Want me to refine it?How Coot's XML-RPC server works
coot_startup.py is passed to Coot at launch via --script. It starts a Python SimpleXMLRPCServer on port 40000 (localhost only), polled via a GLib timer on Coot's main thread. The server dispatches method calls directly to Coot's Python API, so almost every coot.* function is callable remotely. A special eval method handles arbitrary Python expressions and multi-statement blocks.
To start Coot manually with XML-RPC enabled:
/Applications/ccp4-9/libexec/coot-1 --script /path/to/cootmcp/coot_startup.pyConfiguration
Environment variable | Default | Description |
|
| Port for Coot XML-RPC server |
|
| Path to the |
Project structure
cootmcp/
├── server.py # MCP server — all tool definitions and handlers
├── coot_client.py # XML-RPC client wrapper and Coot launcher
├── coot_startup.py # Script passed to Coot to enable XML-RPC
├── screenshot.py # macOS window capture (screencapture + AppleScript)
├── coot_memory.json # Persistent lessons accumulated across sessions
├── requirements.txt # Python dependencies
└── README.mdPersistent memory
The server maintains a coot_memory.json file that accumulates lessons across sessions, such as Coot API quirks, map loading gotchas, and refinement workflows that work well.
Think of it like a real crystallographer, it gets better with experience! (but less tired)
At the start of a session, call get_lessons (optionally filtered by category) to load relevant context. When something non-obvious is discovered during a session, call save_lesson to persist it. Available categories: maps, refinement, validation, file-formats, rotamers, api.
This memory is shared across all clients using the same server install, therefore any crystallographer using the tool benefits from lessons learned by others.
Notes & limitations
macOS only — screenshot capture uses
screencaptureandosascriptCoot must be visible for window-specific capture; the tool falls back to a full-screen capture if the window ID can't be determined
XML-RPC method availability depends on what Coot's internal Python exposes; the
run_coot_pythontool provides a fallback for anything not directly supportedScreenshots are resized to max 1280px wide to keep token usage reasonable (requires Pillow)
License
MIT
Work Cited
@Article{emsley2010:coot, author = {Paul Emsley and Bernhard Lohkamp and William G. Scott and Kevin Cowtan}, title = {Features and Development of Coot}, journal = {Acta Crystallographica Section D - Biological Crystallography}, year = 2010, volume = 66, pages = 486-501 }
Citation
@misc{cootmcp, author = {Kody A. Klupt}, title = {cootmcp: An MCP server for controlling Coot}, year = {2026}, url = {https://github.com/kodyklupt/cootmcp}, }
Use of AI
This project was developed with the assistance of Claude Code, an AI coding agent, and is intended to be used as a tool for crystallographers to assist in their work! Enjoy and make it your own!
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Render and edit design images in Claude, then create interactive pages and PDF decks.
Deploy sims to any screen. Control your displays with Claude.
Deploy sims to any screen. Control your displays with Claude.
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables Claude to control PyMOL for molecular visualization and structural biology analysis. It uniquely features screenshot capture capabilities that provide a visual feedback loop, allowing the AI to see and verify the results of its commands.1MIT
- AlicenseAqualityDmaintenanceEnables to control FreeCAD from Claude Desktop through MCP, allowing CAD operations like creating and editing objects, taking screenshots, and executing Python code.111MIT
- AlicenseNot gradedqualityDmaintenanceEnables Claude to control the local desktop via screenshot, mouse, keyboard, and clipboard operations.MIT
- FlicenseAqualityCmaintenanceConnects Claude Desktop to a running FreeCAD instance, enabling document management, part creation and editing, direct Python execution, parts library insertion, FEM analysis, and 3D view screenshots.14-