MCP Directory

How to add Container Use to Claude Desktop

Isolated, containerized dev environments for coding agents — each agent works in its own git branch. Paste the config into ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop.

Last updated June 14, 2026 · 3.9k · stdio · no auth · official

Claude Desktop config for Container Use

brew install dagger/tap/container-use
{
  "mcpServers": {
    "container-use": {
      "command": "container-use",
      "args": [
        "stdio"
      ]
    }
  }
}

Setup steps

  1. 1Open Claude Desktop → Settings → Developer → Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
  2. 2Paste the Container Use config below under the top-level "mcpServers" key.
  3. 3Fill in any placeholder secrets (API keys, paths) in the snippet.
  4. 4Save the file, then fully quit and reopen Claude Desktop.
  5. 5Open a chat and confirm Container Use's tools appear under the 🔌 tools menu.

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

What Container Use can do in Claude Desktop

environment_create

Creates a new development environment — the result of the setup commands run on top of the base image.

environment_open

Opens an existing environment. Return format is the same as environment_create.

environment_list

List available environments.

environment_update_metadata

Update environment metadata such as the title describing what work is being done in the environment.

environment_config

Make environment config changes such as base image and setup commands.

environment_run_cmd

Run a terminal command inside a new container within the environment.

environment_file_read

Read the contents of a file, specifying a line range or the entire file.

environment_file_list

List the contents of a directory.

Security

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 + Claude Desktop FAQ

Where is the Claude Desktop config file?

Claude Desktop reads MCP servers from ~/Library/Application Support/Claude/claude_desktop_config.json. Paste the Container Use config there under the "mcpServers" key and restart the client.

Is Container Use safe to use with Claude Desktop?

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.

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`.

View repo Full Container Use page