Opened 31 minutes ago
Last modified 28 minutes ago
#19477 assigned enhancement
Improvements to mcp_server bundle that allows Claude AI agent to control ChimeraX
| Reported by: | Tom Goddard | Owned by: | Tom Goddard |
|---|---|---|---|
| Priority: | moderate | Milestone: | |
| Component: | UI | Version: | |
| Keywords: | Cc: | a.rohou@…, Zach Pearson | |
| Blocked By: | Blocking: | ||
| Notify when closed: | Platform: | all | |
| Project: | ChimeraX |
Description
This ticket is to make miscellaneous usability improvements to the ChimeraX MCP server that allows Claude AI to send commands to ChimeraX.
We have an MCP (Model Context Protocol) bundle mcp_server that allows the Claude AI agent to execute commands in ChimeraX. Alexis Rohou and Zach Pearson made initial versions. Currently the code includes an mcp start/stop/info ChimeraX commands Zach added (written by Claude Code) and a chimerax_mcp_bridge.py file that implements the MCP server that Claude starts to send commands to ChimeraX that was mostly created by Alexis Rohou (also I think generated by Claude Code).
Here are some problems with the current mcp_server.
1) Add an mcp setup command to create the Claude MCP configuration file. Currently the mcp info command suggests the user paste some JSON into a Claude configuration file without being told where the file is, or how to insert it into a possibly already existing JSON file. The mcp info command is giving the wrong paths on Mac and on Windows for the configuration.
2) Simplify and fix bugs in bridge code. The current chimerax_mcp_bridge.py is behaving worse than the early October version in several ways. It attempts to use the save_image() method giving absolute paths on the Claude server instead of the local machine. It tries to look up the ChimeraX documentation for commands and the bridge code fails to find the docs on Mac or Windows due to incorrect code in get_docs_path(). The run_command() method gives an error when attempt to run show/hide commands trying to force Claude to use show_hide_objects() but instead it seems to often use run_command() spewing lots of errors in the Claude output. The extensive comments in methods in the bridge code seem to be causing Claude to try all kinds of misguided commands, that it did not try in October versions. While the comments are intended to help Claude, and in some cases probably do, the current bridge code has been working much worse in my simple test prompts, for example, "Show a conotoxin structure in ChimeraX."
I added an "mcp setup" command to write the Claude Desktop configuration file for the ChimeraX MCP server on Mac and Windows. There is no official Claude Desktop app on Linux. I also replaced the vague instructions given by the "mcp info" command about pasting into the Claude config file with instructions to run "mcp setup".