Connect an agent
An agent client such as Claude Code or Claude Desktop can use experimenter mcp. It can open, edit, validate, save and launch an Experiment. This page sets up the client. Agents and the MCP server lists the tools, the commands, the Settings switches and the confirmation rules.
Connect a client
- Add a server entry to the MCP configuration of the client. The command is
experimenter mcp. - In the macOS app bundle, use
Experimenter.app/Contents/MacOS/Experimenter mcp. - In a source install, run
pip install 'experimenter[agent]'first.
With no flag, the server picks the mode from the app. When an app window runs and lets agents connect, the server attaches to it. Otherwise it works on files, headless. Add --headless or --attach to fix the mode.
The examples below use the app bundle in /Applications. Use the absolute path of your copy.
Claude Code
Run this in a terminal:
claude mcp add experimenter -- /Applications/Experimenter.app/Contents/MacOS/Experimenter mcpThe words after -- are the server command. Add --scope user before the name to use the server in all your projects. The default scope is the current project only. claude mcp list shows whether the server connects, and /mcp shows it in a session.
Claude Desktop
- Open Settings in Claude Desktop, then the Developer tab, then Edit Config. This opens
~/Library/Application Support/Claude/claude_desktop_config.json. - Add the server under
mcpServers:
{
"mcpServers": {
"experimenter": {
"command": "/Applications/Experimenter.app/Contents/MacOS/Experimenter",
"args": ["mcp"]
}
}
}- Quit Claude Desktop fully and open it again.
Claude Desktop reads files on your computer only when its Filesystem extension is on. Turn it on in the extension settings of Claude Desktop. Without it the agent cannot read your models, data files or run outputs.
The extension file
A build of the app also writes Experimenter.mcpb, a Claude Desktop extension. It holds a manifest and a small launcher, not the server. The launcher starts the mcp command of the app that you installed.
- Open
Experimenter.mcpbin Claude Desktop. - In the extension settings, set Experimenter.app location to your copy of the app. The default is
/Applications/Experimenter.app. - Turn the extension on. It works on macOS only.
Another MCP client
The server talks MCP on standard input and output. Give the client the program /Applications/Experimenter.app/Contents/MacOS/Experimenter and the one argument mcp.
Modes
In headless mode the server opens and saves Experiment files in its own process, with no app window. document_open loads an Experiment. document_new starts a blank one, and document_save writes it. document_close drops it. Every command of level screen returns refused in headless mode.
Attached mode drives the open app window. Turn on Let agents connect first. The window owns its document, so document_open, document_new, document_close, document_revert and document_save_as return refused there. The person does these in the window.
A call returns busy while another call runs. It also returns busy while a dialog is open or a field holds text the person has not committed.
A call returns “app window closed” after the window quits. It returns the same after the person turns off Let agents connect or presses Disconnect in the banner. The server does not fall back to headless.
Clients that can confirm
In headless mode the client must declare the elicitation capability when it connects. Without it, the server returns refused with “this client cannot ask you to confirm” for a class whose switch is on. When the switch is off, the call runs. In attached mode the app window asks you, so any client can confirm.