A headless PyMOL MCP server for molecular visualization, GROMACS/LAMMPS MD workflows, and clathrate-hydrate cage analysis.
pymol-mcp has 8 well-defined tools with consistent naming (verb-first: load_, fetch_, list_, get_, reset_, render_, run_), clear descriptions (average ~150 chars), and proper parameter schemas. However, several critical issues prevent a higher score: (1) Missing output schema documentation, the return types are inferred from code but not formally documented in tool descriptions, (2) Insufficient error guidance, most error paths lack recovery instructions for LLMs, (3) Parameters lack explicit constraints for numeric ranges and enum values in descriptions, (4) No mention of parameter relationships or dependencies, (5) The opt-in code execution tools (run_pml, run_python) lack proper permissions/scope documentation despite being extremely sensitive. Tool naming is solid (load_structure, fetch_pdb, list_objects, render_image follow verb_noun patterns), and descriptions clearly state purpose and prerequisites. Parameters have types but many lack detailed format/constraint guidance in descriptions.
Fetch a structure from the RCSB PDB (requires network) and load it.
Return atom count, state count, and chains for a loaded object.
List all loaded object names in the current PyMOL session, including CGO overlays.
Load a molecular structure or single-frame coordinate file into PyMOL. Returns the created object name and its atom/state counts.
Ray-trace the current scene to a PNG and return it inline.
Reinitialize PyMOL, clearing all objects, selections, and settings.
[opt-in] Execute raw PyMOL command-language statements. Requires PYMOL_MCP_ALLOW_CODE_EXEC=1.
Missing output schema documentation: Tools return typed objects (dicts, lists, Images) but descriptions do not document return types or field names. LLMs cannot plan downstream tool calls or extract required data without knowing response structure.
Code execution tools (run_pml, run_python) lack permission/scope declarations. These are arbitrary code execution capabilities and must declare required permissions, risk level, and scope (e.g., 'exec:pymol', 'admin-only'). No audit trail guidance.
Error handling lacks recovery guidance. When tools fail (file not found, PDB code invalid, object not found), descriptions do not tell the LLM what to do next. E.g., get_object_info should say 'call list_objects() first if unsure' when name not found.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 57 | 2026-07-28+ | v2 |
[opt-in] Execute a Python snippet with PyMOL `cmd` in scope. Requires PYMOL_MCP_ALLOW_CODE_EXEC=1.
Parameter constraint descriptions are incomplete. Numeric bounds (width 16-2000, height 16-2000) are enforced in schema but not restated in descriptions. Code constraints for file paths and PDB codes are enforced but not mentioned in descriptions where LLMs read them.
Code execution tools (run_pml, run_python) mention prompt injection risk in README but descriptions do not warn about it or document sanitization. Descriptions should note that file headers/names can inject code.
reset_session lacks irreversibility warning and confirmation guidance. Description does not flag this as destructive (per risk annotation DESTRUCTIVE) or suggest a dry-run pattern.
render_image ray_style enum values lack usage guidance. Description lists 4 enum values but does not explain when to use 'pymolwiki_outline' vs 'pymolwiki_bw' vs 'pymolwiki_color'. LLMs will guess.