AI agents & MCP
Gantry is built to be driven by agents — it ships a Model Context Protocol server and macOS App Intents.
The MCP server
Gantry bundles a gantry-mcp binary. Register it with Claude in one command:
claude mcp add gantry -- /Applications/Gantry.app/Contents/Resources/gantry-mcp
The server gives an agent the same reach as the GUI. Call list_hosts first for host ids, then the other tools. Coverage includes:
- Containers — list, start/stop/restart/kill/pause/remove, create, rename, commit, set restart policy, list processes, inspect, logs, a single stats sample, run a command (exec), read/write files, and prune.
- Images — pull, build (from a local context), tag, remove, history, inspect and prune.
- Volumes & networks — create, remove, inspect, prune, and connect/disconnect a container to a network.
- System — disk usage and build-cache prune.
- apple/container — machines (list/create/start/stop/delete/inspect/set default/set resources), the background services, and local DNS domains.
- Compose — bring a project up from a local compose file.
- Public sharing — expose a container port over a Cloudflare Tunnel (quick or named) or an SSH port forward, and list/stop them.
Streaming work (pull, build, compose) runs to completion and returns its log; tunnels and forwards live as long as the MCP server process. SSH hosts are reachable headlessly only if their key was already trusted in the app and any secret is in the Keychain.
Copy as Prompt
On any container, Copy as Prompt (⌥⌘P) puts a paste-ready prompt on your clipboard: the host and how to reach it, the MCP host_id and the tools to call, the container's current state, and a task matched to the symptom. An unhealthy container asks the agent to fix the failing health check; a crash-looping one, to find the crash. Paste it into Claude Code and let it dig in.
Shortcuts & Spotlight
Gantry exposes App Intents, so you can build Shortcuts and trigger common actions from Siri and Spotlight. See Settings → Agents for examples.