Agent access
ContainerMesh 0.2.0 and later include a Model Context Protocol (MCP) server. AI agents on the same Mac can use it to read the state, edit container and stack names and settings, and pause or resume networking. Claude Code, Claude Desktop, and any other client that launches stdio MCP servers can connect. The server speaks MCP over standard input and output: it never opens a listening port and never asks for credentials.
Turn it on
Agent access is off by default. Open Settings, General, and switch on Agent access. The server checks that switch every time an agent asks for a change. While it is off, read-only tools still work, and every edit, apply, pause, or resume returns an explicit error. Switching it off again removes the agent status file and makes the next change fail.
Register the server
The server is part of the containermesh command inside the app bundle: /Applications/ContainerMesh.app/Contents/Resources/containermesh, run with the single argument mcp.
Claude Code
claude mcp add containermesh -- \
/Applications/ContainerMesh.app/Contents/Resources/containermesh mcp
Claude Desktop
Add the server to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"containermesh": {
"command": "/Applications/ContainerMesh.app/Contents/Resources/containermesh",
"args": ["mcp"]
}
}
}
Any other MCP client that starts stdio servers uses the same command and argument: the containermesh binary with the mcp subcommand and nothing else.
What agents can do
Read
read_state— whether the app is running, whether agent access is on, and the latest engine status the app writes for agents.discover_containers— running containers with the DNS hostnames ContainerMesh would publish, including disabled containers and ports.read_preferences— Docker context, DNS zone, per-container and per-stack name rules, stack inclusion, and disabled containers.
Edit
rename_containerandrename_stack— the custom hostname label and per-rule domain under the mesh zone.set_stack_includedandset_container_dns— stack inclusion and per-container DNS publishing.set_domain,set_compose_subdomain, andset_docker_context.
Control
apply_changes— asks the running app to reload and apply the saved configuration. Changes also apply at the next launch when the app is closed.pauseandresume— stop or start the engine through the running app.
What stays protected
- The desktop app owns the engine. An agent never starts or reconfigures it directly: changes go through the same saved settings the app reads, and the running app applies them.
- Every edit is validated by the same rules the engine enforces, so an agent cannot save a configuration the engine would reject.
- A running connection restarts only when the saved configuration actually changes.
- Compose files stay as they are, and agent edits never touch ports or add port mappings.
Questions about agent access belong in GitHub Issues. Security reports stay private.