MCP Directory

How to add Container Use to Cursor

Isolated, containerized dev environments for coding agents — each agent works in its own git branch. Paste the config into ~/.cursor/mcp.json and restart Cursor.

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

Cursor config for Container Use

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

Setup steps

  1. 1Open Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
  2. 2Paste the Container Use config below into the "mcpServers" object.
  3. 3Fill in placeholder secrets, then save.
  4. 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
  5. 5Ask Cursor to use one of Container Use's tools to confirm it's connected.

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 Cursor

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 + Cursor FAQ

Where is the Cursor config file?

Cursor reads MCP servers from ~/.cursor/mcp.json. Paste the Container Use config there under the "mcpServers" key and restart the client.

Is Container Use safe to use with Cursor?

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