container-use

container-use

Containerized environments for coding agents.

3,248
Stars
169
Forks
3,248
Watchers
63
Issues
container-use enables coding agents to operate in parallel, isolated container environments integrated with the Model Context Protocol (MCP). Agents work independently in designated git branches, ensuring safe experimentation and real-time monitoring. The tool supports direct terminal access, seamless workflow integration, and works with any MCP-compatible agent, including Claude Code and Cursor. Designed for flexibility and visibility, it is suitable for managing multiple coding agents concurrently.

Key Features

Isolated container environments per agent
Works as an MCP server with stdio interface
Real-time command and action visibility
Direct user intervention via embedded terminals
Seamless integration with git branching
Universal compatibility with MCP-compatible agents
Safe parallel operation of multiple agents
Rapid failure discard and environment reset
Command shortcut via alias (cu)
Comprehensive installation across platforms

Use Cases

Running multiple coding agents simultaneously without conflict
Experimenting with code changes in ephemeral containers
Monitoring and auditing agent actions in real-time
Debugging and intervening when an agent gets stuck
Testing code safely in parallel across agents
Collaborative agent-driven software development
Using with popular coding agents like Claude Code or Cursor
Sandboxing AI-driven automation commands
Automating repetitive coding tasks in isolated contexts
Reviewing and merging agent-generated code via git

README

Container Use lets coding agents do their work in parallel environments without getting in your way. Go from babysitting one agent at a time to enabling multiple agents to work safely and independently with your preferred stack. See the full documentation.

It's an open-source MCP server that works as a CLI tool with Claude Code, Cursor, and other MCP-compatible agents. Powered by Dagger.

  • 📦 Isolated Environments: Each agent gets a fresh container in its own git branch - run multiple agents without conflicts, experiment safely, discard failures instantly.
  • 👀 Real-time Visibility: See complete command history and logs of what agents actually did, not just what they claim.
  • 🚁 Direct Intervention: Drop into any agent's terminal to see their state and take control when they get stuck.
  • 🎮 Environment Control: Standard git workflow - just git checkout <branch_name> to review any agent's work.
  • 🌎 Universal Compatibility: Works with any agent, model, or infrastructure - no vendor lock-in.

🦺 This project is in early development and actively evolving. Submit issues and/or reach out to us on Discord in the #container-use channel.


Quick Start

Install

sh
# macOS (recommended)
brew install dagger/tap/container-use

# All platforms
curl -fsSL https://raw.githubusercontent.com/dagger/container-use/main/install.sh | bash

Setup with Your Agent

Container Use works with any MCP-compatible agent. The setup is always the same: add container-use stdio as an MCP server.

👉 Complete setup guide for all agents (Cursor, Goose, VSCode, etc.)

Example with Claude Code:

sh
# Add Container Use MCP server
cd /path/to/repository
claude mcp add container-use -- container-use stdio

# Add agent rules (optional)
curl https://raw.githubusercontent.com/dagger/container-use/main/rules/agent.md >> CLAUDE.md

The container-use command is also available as cu for convenience. Both commands work identically:

  • container-use stdio (used in documentation)
  • cu stdio (shortcut)

Try It

Ask your agent to create something:

Create a hello world app in python using flask

Your agent will work in an isolated environment and give you URLs to view the app and explore the code!

Star History

Star History Chart

Repository Owner

dagger
dagger

Organization

Repository Details

Language Go
Default Branch main
Size 3,123 KB
Contributors 29
License Apache License 2.0
MCP Verified Nov 11, 2025

Programming Languages

Go
96.78%
Shell
3.22%

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • mcp-code-runner

    mcp-code-runner

    A Docker-based code runner implementing the MCP protocol

    mcp-code-runner is a code execution service built on top of the Model Context Protocol (MCP). It enables users to execute code securely within Docker containers and retrieve the execution results. The tool is designed to support code execution use cases while adhering to the MCP standard for interoperability. A local Docker environment is required for operation.

    • 14
    • MCP
    • axliupore/mcp-code-runner
  • mcp-server-docker

    mcp-server-docker

    Natural language management of Docker containers via Model Context Protocol.

    mcp-server-docker enables users to manage Docker containers using natural language instructions through the Model Context Protocol. It allows composing, introspecting, and debugging containers, as well as managing persistent Docker volumes. The tool is suitable for server administrators, tinkerers, and AI enthusiasts looking to leverage LLM capabilities for Docker management. Integration with tools like Claude Desktop and Docker ensures flexible deployment and easy connectivity to Docker engines.

    • 648
    • MCP
    • ckreiling/mcp-server-docker
  • Code Assistant

    Code Assistant

    AI coding assistant with multi-modal tool execution and MCP integration

    Code Assistant is an AI-powered coding assistant written in Rust that provides both command-line and graphical user interfaces for autonomous code analysis and modification. It supports multi-modal tool invocation, real-time streaming, and session-based project management. The tool features full Model Context Protocol (MCP) compatibility, enabling seamless integration with MCP clients, and offers advanced project-level configuration and formatting capabilities.

    • 110
    • MCP
    • stippi/code-assistant
  • MCP Claude Code

    MCP Claude Code

    Claude Code-like functionality via the Model Context Protocol.

    Implements a server utilizing the Model Context Protocol to enable Claude Code functionality, allowing AI agents to perform advanced codebase analysis, modification, and command execution. Supports code understanding, file management, and integration with various LLM providers. Offers specialized tools for searching, editing, and delegating tasks, with robust support for Jupyter notebooks. Designed for seamless collaboration with MCP clients including Claude Desktop.

    • 281
    • MCP
    • SDGLBL/mcp-claude-code
  • codemcp

    codemcp

    Turn Claude into a hands-on pair programming assistant with direct code editing capabilities.

    codemcp integrates Claude with a user's local codebase, enabling the AI to directly implement features, fix bugs, refactor code, and run tests by making live edits to files. It emphasizes safety and auditability by forbidding unrestricted shell access and versioning all LLM-driven changes using Git. The tool is IDE agnostic and designed for use with Claude Pro, focusing on cost-efficient, high-autonomy agent workflows. Command usage is user-approved via configuration, enhancing security while allowing automated operations.

    • 1,572
    • MCP
    • ezyang/codemcp
  • docker-mcp

    docker-mcp

    A powerful MCP server for seamless Docker container and compose stack management.

    docker-mcp is a Model Context Protocol (MCP) server that enables robust Docker container and compose stack management via Claude AI. It offers easy installation through Smithery or manual setup, supporting container creation, Docker Compose stack deployment, log retrieval, and monitoring. Integration with the Claude Desktop app is straightforward, and the included MCP Inspector aids debugging. This tool simplifies Docker operations for automation and AI model interactions.

    • 419
    • MCP
    • QuantGeekDev/docker-mcp
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results