Skip to main content

Windsurf

Install MCP Server

In ~/.codeium/windsurf/mcp_config.json, add the following configuration:
{
  "mcpServers": {
    "container-use": {
      "command": "cu",
      "args": ["stdio"],
      "env": {}
    }
  }
}

Add Agent Rules

Add the rules file to your project or home directory:
curl --create-dirs -o .windsurf/rules/container-use.mdc https://raw.githubusercontent.com/dagger/container-use/main/rules/windsurf.mdc

OpenCode

Configure the Container Use MCP server in a opencode.json file.
Note: Provide the absolute path to your systems cu executable:
{
  "$schema": "http://opencode.ai/config.json",
  "mcp": {
    "container-use": {
      "type": "local",
      "command": ["/path/to/cu", "stdio"],
      "enabled": true
    }
  }
}
Add the AGENTS.md file using this command (this is optional but usually provides the best results):
curl https://raw.githubusercontent.com/dagger/container-use/main/rules/agent.md >> AGENTS.md
Run opencode and dispatch your agents to complete your tasks!

Goose

Method 1: Configuration File

Add to ~/.config/goose/config.yaml:
extensions:
  container-use:
    name: container-use
    type: stdio
    enabled: true
    cmd: cu
    args:
      - stdio
    envs: {}

Method 2: Interactive Setup

goose configure
Then add a command line extension with cu stdio as the command.

Method 3: Goose Desktop

Paste this URL into your browser:
goose://extension?cmd=cu&arg=stdio&id=container-use&name=container%20use&description=use%20containers%20with%20dagger%20and%20git%20for%20isolated%20environments

Cline

Add MCP Configuration

Add to your Cline MCP server configuration JSON:
{
  "mcpServers": {
    "container-use": {
      "disabled": false,
      "timeout": 60000,
      "type": "stdio",
      "command": "cu",
      "args": ["stdio"],
      "env": {},
      "autoApprove": []
    }
  }
}

Add Agent Rules

curl --create-dirs -o .clinerules/container-use.md https://raw.githubusercontent.com/dagger/container-use/main/rules/agent.md

Qodo Gen

Setup Steps

  1. Open Qodo Gen chat panel in VSCode or IntelliJ
  2. Click “Connect more tools”
  3. Click ”+ Add new MCP”
  4. Add this configuration:
{
  "mcpServers": {
    "container-use": {
      "command": "cu",
      "args": ["stdio"]
    }
  }
}

Kilo Code

Add MCP Configuration

Add at global or project level:
{
  "mcpServers": {
    "container-use": {
      "command": "replace with pathname of cu",
      "args": ["stdio"],
      "env": {},
      "alwaysAllow": [],
      "disabled": false
    }
  }
}
Kilo Code allows setting MCP servers at the global or project level. Learn more: Kilo Code MCP Documentation

OpenAI Codex

Add MCP Configuration

Add to ~/.codex/config.toml:
[mcp_servers.container-use]
command = "cu"
args = ["stdio"]
env = {}

Warp

Add MCP Configuration

In the Warp sidebar, under Personal → MCP Servers → New:
{
  "container-use": {
    "command": "cu",
    "args": ["stdio"],
    "env": {},
    "working_directory": null,
    "start_on_launch": true
  }
}
Warp 2.0 introduces coding agents with MCP support.

Gemini CLI

Add MCP Configuration

Add to ~/.gemini/settings.json or .gemini/settings.json:
{
  "coreTools": [],
  "mcpServers": {
    "container-use": {
      "command": "cu",
      "args": ["stdio"],
      "timeout": 60000,
      "trust": true
    }
  }
}

General Troubleshooting

  • Verify the cu command is in your PATH: which cu
  • Check MCP configuration syntax
  • Restart your agent after configuration changes
  • Ensure Docker is running and accessible
  • Check file permissions for configuration files
  • Verify cu stdio command works: echo '{}' | cu stdio
  • Some agents require explicit tool trust/approval
  • Check your agent’s MCP server logs
  • Verify Container Use tools are enabled in agent settings

Next Steps

I