/ Diretório / Playground / Container Use
● Oficial dagger ⚡ Instantâneo

Container Use

por dagger · dagger/container-use

Isolated, parallel containerized environments for coding agents.

Container Use gives every coding agent its own ephemeral container — so multiple Claude sessions can build, test, and run the same repo at the same time without stepping on each other. Built on Dagger; each environment has its own filesystem, branch, and process tree.

Por que usar

Principais recursos

Demo ao vivo

Como fica na prática

container-use-mcp.replay ▶ pronto
0/0

Instalar

Escolha seu cliente

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "container-use-mcp": {
      "command": "cu",
      "args": [
        "mcp"
      ]
    }
  }
}

Abra Claude Desktop → Settings → Developer → Edit Config. Reinicie após salvar.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "container-use-mcp": {
      "command": "cu",
      "args": [
        "mcp"
      ]
    }
  }
}

Cursor usa o mesmo esquema mcpServers que o Claude Desktop. Config de projeto vence a global.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "container-use-mcp": {
      "command": "cu",
      "args": [
        "mcp"
      ]
    }
  }
}

Clique no ícone MCP Servers na barra lateral do Cline, depois "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "container-use-mcp": {
      "command": "cu",
      "args": [
        "mcp"
      ]
    }
  }
}

Mesmo formato do Claude Desktop. Reinicie o Windsurf para aplicar.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "container-use-mcp",
      "command": "cu",
      "args": [
        "mcp"
      ]
    }
  ]
}

O Continue usa um array de objetos de servidor em vez de um map.

~/.config/zed/settings.json
{
  "context_servers": {
    "container-use-mcp": {
      "command": {
        "path": "cu",
        "args": [
          "mcp"
        ]
      }
    }
  }
}

Adicione em context_servers. Zed recarrega automaticamente ao salvar.

claude mcp add container-use-mcp -- cu mcp

Uma linha só. Verifique com claude mcp list. Remova com claude mcp remove.

Casos de uso

Usos do mundo real: Container Use

Try three refactoring approaches in parallel, keep the best

👤 Engineers exploring design space ⏱ ~15 min intermediate

Quando usar: You have 3 different ideas for a refactor and want to see all of them run/pass tests before picking one.

Pré-requisitos
  • Server/skill installed and authenticated — See repo README
Fluxo
  1. Spin up three isolated envs
    Create three container-use environments named refactor-a/b/c, all on this repo at HEAD.✓ Copiado
    → Three env_ids printed
  2. Apply each approach in its own env
    In refactor-a do the strategy-pattern version; in -b inline everything; in -c extract a service object. Run the full test suite in each. Report pass/fail and diff size.✓ Copiado
    → Per-env test summary and diff stats
  3. Pick the winner and merge
    Apply the diff from refactor-b to my working copy. Discard the other two environments.✓ Copiado
    → Patch applied locally

Resultado: Three real experiments evaluated side-by-side without ever breaking your host repo.

Armadilhas
  • Forgetting to discard old envs leaks disk — Forgetting to discard old envs leaks disk — cu environment list then cu environment discard <id> periodically.
Combine com: github · filesystem

Combinações

Combine com outros MCPs para 10× de alavancagem

container-use-mcp + github

Pair with github for complementary capabilities

Use this server together with github to complete a multi-step task.✓ Copiado
container-use-mcp + filesystem

Pair with filesystem for complementary capabilities

Use this server together with filesystem to complete a multi-step task.✓ Copiado

Ferramentas

O que este MCP expõe

FerramentaEntradasQuando chamarCusto
environment_create name: str, image: str Start a fresh sandbox for the next task Local CPU/disk
environment_run_cmd env_id, cmd Execute build/test commands inside the sandbox free
environment_file_write env_id, path, contents Apply edits without touching the host free
environment_diff env_id Review the agent's work before merging back free

Custo e limites

O que custa rodar

Cota de API
See provider docs for rate limits
Tokens por chamada
Varies by tool
Monetário
See repo README for pricing details
Dica
Cache tool results and avoid repeated identical calls.

Segurança

Permissões, segredos, alcance

Armazenamento de credenciais: Use environment variables; never commit secrets
Saída de dados: Tool calls go to the provider's API as documented

Solução de problemas

Erros comuns e correções

docker daemon not running

Container Use requires a local Docker or compatible runtime. Start Docker Desktop or colima.

Verificar: Run `docker ps` successfully
out of disk

Old environments aren't auto-pruned. Run cu environment list then cu environment discard <id> for anything older than a day.

Verificar: Check `docker system df`

Alternativas

Container Use vs. outros

AlternativaQuando usarTroca
Dagger CloudYou want hosted, multi-tenant agent envsPaid; container-use is local-first

Mais

Recursos

📖 Leia o README oficial no GitHub

🐙 Ver issues abertas

🔍 Ver todos os 400+ servidores MCP e Skills