MCP server that connects Claude Code to a live PyMOL session over XML-RPC
MCPpedia last refreshed this data
Pymol Claude MCP is an MCP server that MCP server that connects Claude Code to a live PyMOL session over XML-RPC. Its tool list has not been published yet over stdio, requires no API key, and scores 81/100 on MCPpedia's security, maintenance and efficiency rubric.
Config is the same across clients - only the file and path differ.
{
"mcpServers": {
"pymol-claude-mcp": {
"args": [
"-y",
"@anthropic-ai/claude-code"
],
"command": "npx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
An MCP server that lets Claude Code drive a live PyMOL session — fetch structures, build selections, adjust representations and coloring, measure distances — by talking to PyMOL's built-in XML-RPC server.
Run this in your terminal to verify the server starts. Then let us know if it worked - your result helps other developers.
npx -y '@anthropic-ai/claude-code' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories - click any category to see the underlying evidence.
Claude Code: TOCTOU Race in Edit Tool Allows File Writes Outside the Workspace
Claude Code validated Edit tool targets using point-in-time pathname and symlink resolution that was not bound to the underlying directory inodes or file descriptors. On macOS, a process running inside Claude Code's Bash sandbox could exploit the resulting time-of-check to time-of-use window by atomically swapping an in-workspace parent directory with a symlink after validation completed, causing the unsandboxed Edit implementation to overwrite an attacker-selected user-writable file outside the
Claude Code: Plugin Hash Pin Bypass Allows Bypass of Hash Pinning
The plugin install flow in Claude Code and Claude Desktop checked out a marketplace's pinned commit SHA using `git checkout` without verifying that the resulting HEAD matched the pinned SHA. An attacker controlling a plugin's upstream repository could create a branch named identically to the pinned 40-character SHA, causing the checkout to silently resolve to the attacker's branch tip instead of the reviewed commit, resulting in attacker-controlled code being installed bypassing the pinned hash.
Claude Code: Sandbox Escape via Git Worktree Path Confusion Allows Unsandboxed Code Execution
Claude Code's worktree handling allowed creation of worktrees named ".git" and navigation to worktrees outside the sandbox context, enabling git directory confusion attacks. By exploiting symlink manipulation and git fsmonitor execution during worktree operations, an attacker could overwrite files in the user's home directory (such as .zshenv), leading to code execution outside of seatbelt sandbox restrictions. Reliably exploiting this required the user to clone a malicious repository containing
@anthropic-ai/claude-code has an Insecure Temporary File in /copy Command that Enables Response Disclosure and Symlink-Based File Write
The Claude Code `/copy` command wrote responses to a hardcoded, predictable path (`/tmp/claude/response.md`) without UID isolation, randomness, or symlink protection. The file was created world-readable (0644) in a world-traversable directory (0755), allowing any local user to read a privileged user's Claude response, which could contain secrets or credentials. Additionally, because the path was static and predictable, a local attacker could pre-create the directory and plant a symlink at the ex
Claude Code: Out-of-Band Data Exfiltration via Pre-Approved HuggingFace Domain in WebFetch
Because the hostname huggingface.co was pre-approved as a bare hostname for the WebFetch tool, any path on that domain—including attacker-controlled model repositories—was auto-approved without a permission prompt or being subject to --allowedTools restrictions. An attacker able to inject untrusted content into a Claude Code context could direct it to issue WebFetch requests against attacker-controlled repository files (e.g. /resolve/main/config.json), which HuggingFace counts as downloads serve
Be the first to review
Have you used this server?
Share your experience - it helps other developers decide.
Sign in to write a review.
Others in ai-ml
🛡️ BLA (Blind LLM Agents) — Adversarial defense shield that protects binaries, Electron apps, JS bundles, Python, and WebAssembly against AI reverse-engineering agents like REA. Poison -> Exhaust -> Hallucinate.
The official MCP server implementation for the Perplexity API Platform
Unified real-time search engine skill for AI agents.
Study screens, flows and paywalls from top-earning iOS apps, then build from what wins.
MCP Security Weekly
Get CVE alerts and security updates for Pymol Claude MCP and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
An MCP server that lets Claude Code drive a live PyMOL session — fetch structures, build selections, adjust representations and coloring, measure distances — by talking to PyMOL's built-in XML-RPC server.
PyMOL ships with an XML-RPC server (enabled via pymol -R) that exposes its command API on localhost:9123. pymol_server.py wraps that in three MCP tools so Claude can call them like any other tool:
| Tool | Purpose |
|---|---|
pymol_command | Run one PyMOL command, exactly as you'd type it at the PyMOL prompt |
pymol_script | Run a block of Python inside PyMOL's embedded interpreter (loops, cmd.* calls, etc.) |
pymol_query | Call any PyMOL XML-RPC method directly and get the return value back (for read-only lookups like atom counts or chain lists) |
Claude decides which tool fits the request and supplies the PyMOL command or code itself — this server is just the transport layer.
npm install -g @anthropic-ai/claude-code1. Clone this repo and install dependencies
git clone https://github.com/<your-username>/Pymol-Claude-MCP
cd Pymol-Claude-MCP
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
2. Make PyMOL start its RPC server automatically (optional but recommended)
By default you'd need to launch PyMOL from a terminal with pymol -R every time. Instead, symlink autostart/pymolrc.py to ~/.pymolrc.py — a script PyMOL runs on every launch — so RPC starts silently whether you open PyMOL from the command line, Spotlight, or the Dock:
ln -sf "$(pwd)/autostart/pymolrc.py" ~/.pymolrc.py
From now on, just open PyMOL normally. It listens for the MCP server on port 9123 (override with PYMOL_RPC_PORT).
If you'd rather not touch ~/.pymolrc.py, start it manually instead each time: pymol -R.
3. Register the server with Claude Code
claude mcp add pymol $(pwd)/venv/bin/python3 $(pwd)/pymol_server.py
claude mcp list
You should see:
pymol: .../venv/bin/python3 .../pymol_server.py - ✓ Connected
4. Launch Claude Code
claude
PyMOL must already be running (with RPC active — automatic if you did step 2, otherwise via pymol -R) before Claude Code starts, or the server will fail to connect.
If 9123 is taken, start PyMOL's RPC server on another port and point the MCP server at it:
pymol -cq -d "rpc_launch(port=49123)"
claude mcp add pymol $(pwd)/venv/bin/python3 $(pwd)/pymol_server.py -- --port 49123
(or set PYMOL_RPC_PORT=49123 in the environment instead of passing --port)
If PyMOL runs on your own machine but Claude Code runs elsewhere (e.g. an HPC login node), open an SSH reverse tunnel so the remote host can reach your local PyMOL's RPC port:
ssh -R 9123:localhost:9123 <user>@<remote-host>
Then follow the same setup steps on the remote host, pointing claude mcp add at a Python environment there.
By default, Claude Code confirms before each PyMOL tool call. To skip that, add to ~/.claude/settings.json:
{
"permissions": {
"allow": ["mcp__pymol__*"]
}
}
Note that pymol_script executes arbitrary Python inside the PyMOL process — treat auto-approval the same way you would for any tool that runs unrestricted code locally.
zsh: command not found: pymol
.app build of PyMO