
Container Use
OfficialIsolated, containerized dev environments for coding agents — each agent works in its own git branch.
Add to your client
Copy the config for your MCP client and paste it into its config file.
brew install dagger/tap/container-usePaste into ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"container-use": {
"command": "container-use",
"args": [
"stdio"
]
}
}
}Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf
Before you start
- Docker (or a compatible container runtime) for Dagger to run containers
- Git repository (run inside the repo you want agents to work in)
- An MCP-compatible agent (Claude Code, Cursor, VSCode, Goose, etc.)
- container-use binary installed via Homebrew or the install script
About Container Use
Container Use gives coding agents isolated, containerized development environments. Add container-use stdio as an MCP server to your agent and each agent works in a fresh container on its own git branch, letting multiple agents run in parallel safely. Powered by Dagger, it provides real-time visibility into agent actions and lets you intervene directly or review work via standard git. Install with Homebrew (brew install dagger/tap/container-use) or the install script, then register it with your agent (e.g. claude mcp add container-use -- container-use stdio).
Tools & capabilities (13)
environment_createCreates a new development environment — the result of the setup commands run on top of the base image.
environment_openOpens an existing environment. Return format is the same as environment_create.
environment_listList available environments.
environment_update_metadataUpdate environment metadata such as the title describing what work is being done in the environment.
environment_configMake environment config changes such as base image and setup commands.
environment_run_cmdRun a terminal command inside a new container within the environment.
environment_file_readRead the contents of a file, specifying a line range or the entire file.
environment_file_listList the contents of a directory.
environment_file_editFind and replace text in a file.
environment_file_writeWrite the contents of a file.
environment_file_deleteDeletes a file at the specified path.
environment_checkpointCheckpoints an environment in its current state as a container.
environment_add_serviceAdd a service to the environment (e.g. database, cache, etc.).
When to use it
- Running multiple coding agents in parallel without their changes conflicting
- Letting an agent experiment safely in a disposable container, then discarding failures instantly
- Reviewing exactly what an agent did via complete command history and logs
- Dropping into an agent's terminal to take over when it gets stuck
- Reviewing agent work with a standard git workflow (git checkout the agent's branch)
- Spinning up backing services (databases, caches) for an agent's environment
Security notes
Early development / experimental (stability badge: experimental). Agents execute arbitrary commands inside containers; each environment is isolated in its own container and git branch. No authentication is required for the local stdio MCP server.
Container Use FAQ
How do I add Container Use to Claude Code?
From inside your repository run: `claude mcp add container-use -- container-use stdio`. Optionally append the agent rules with `curl https://raw.githubusercontent.com/dagger/container-use/main/rules/agent.md >> CLAUDE.md`.
Does it work with agents other than Claude Code?
Yes. It works with any MCP-compatible agent (Cursor, VSCode, Goose, and others). The setup is always the same: add `container-use stdio` as an MCP server. See the quickstart and agent-integrations docs at container-use.com.
Is there a command shortcut?
Yes — the `container-use` command is also available as `cu`. Both work identically, e.g. `cu stdio`.
Is it production-ready?
No. The project is in early development and marked experimental; it is actively evolving. The maintainers (Dagger) invite issues and discussion in the #container-use channel on their Discord.
Alternatives to Container Use
Compare all alternatives →Microsoft's official browser-automation MCP using Playwright's accessibility tree (no vision model).
Up-to-date, version-specific library documentation injected into your coding agent.
LSP-powered coding agent toolkit: semantic symbol search, references and structural edits.
Compare Container Use with: