/ Annuaire / Playground / Container Use
● Officiel dagger ⚡ Instantané

Container Use

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

Pourquoi l'utiliser

Fonctionnalités clés

Démo en direct

Aperçu en pratique

container-use-mcp.replay ▶ prêt
0/0

Installer

Choisissez votre client

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

Ouvrez Claude Desktop → Settings → Developer → Edit Config. Redémarrez après avoir enregistré.

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

Cursor utilise le même schéma mcpServers que Claude Desktop. La config projet l'emporte sur la globale.

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

Cliquez sur l'icône MCP Servers dans la barre latérale Cline, puis "Edit Configuration".

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

Même format que Claude Desktop. Redémarrez Windsurf pour appliquer.

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

Continue utilise un tableau d'objets serveur plutôt qu'une map.

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

Ajoutez dans context_servers. Zed recharge à chaud à la sauvegarde.

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

Une seule ligne. Vérifiez avec claude mcp list. Supprimez avec claude mcp remove.

Cas d'usage

Usages concrets : Container Use

Try three refactoring approaches in parallel, keep the best

👤 Engineers exploring design space ⏱ ~15 min intermediate

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

Prérequis
  • Server/skill installed and authenticated — See repo README
Déroulement
  1. Spin up three isolated envs
    Create three container-use environments named refactor-a/b/c, all on this repo at HEAD.✓ Copié
    → 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.✓ Copié
    → 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.✓ Copié
    → Patch applied locally

Résultat : Three real experiments evaluated side-by-side without ever breaking your host repo.

Pièges
  • Forgetting to discard old envs leaks disk — Forgetting to discard old envs leaks disk — cu environment list then cu environment discard <id> periodically.
Combiner avec : github · filesystem

Combinaisons

Associez-le à d'autres MCPs pour un effet X10

container-use-mcp + github

Pair with github for complementary capabilities

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

Pair with filesystem for complementary capabilities

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

Outils

Ce que ce MCP expose

OutilEntréesQuand appelerCoût
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

Coût et limites

Coût d'exécution

Quota d'API
See provider docs for rate limits
Tokens par appel
Varies by tool
Monétaire
See repo README for pricing details
Astuce
Cache tool results and avoid repeated identical calls.

Sécurité

Permissions, secrets, portée

Stockage des identifiants : Use environment variables; never commit secrets
Sortie de données : Tool calls go to the provider's API as documented

Dépannage

Erreurs courantes et correctifs

docker daemon not running

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

Vérifier : 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.

Vérifier : Check `docker system df`

Alternatives

Container Use vs autres

AlternativeQuand l'utiliserCompromis
Dagger CloudYou want hosted, multi-tenant agent envsPaid; container-use is local-first

Plus

Ressources

📖 Lire le README officiel sur GitHub

🐙 Voir les issues ouvertes

🔍 Parcourir les 400+ serveurs MCP et Skills