container-use
container-use is an MCP server that adds container capabilities to your AI agent. Installation is straightforward, requiring the addition of configuration files for agent integration. It supports usage in various environments and is particularly designed for developers.
GitHub Stars
2
User Rating
Not Rated
Forks
0
Issues
0
Views
1
Favorites
0
README
container-use
MCP server to add container superpowers to your AI agent
Installing
go build ./cmd/container-use
Make sure to put container-use
in your $PATH
Agent Integration
Enabling container-use
requires 2 steps:
- Adding an MCP configuration for
container-use
- (Optional) Adding a rule so the agent uses containarized environments.
Claude Code
# Add the container-use MCP
npx @anthropic-ai/claude-code mcp add container-use -- <path to container-use> stdio
# Save the CLAUDE.md file at the root of the repository. Alternatively, merge the instructions into your own CLAUDE.md.
curl -o CLAUDE.md https://raw.githubusercontent.com/dagger/container-use/main/rules/agent.md
Goose
Add this to ~/.config/goose/config.yaml
:
extensions:
container-use:
name: container-use
type: stdio
enabled: true
cmd: container-use
args:
- stdio
envs: []
Cursor
curl --create-dirs -o .cursor/rules/container-use.mdc https://raw.githubusercontent.com/dagger/container-use/main/rules/cursor.mdc
VSCode / GitHub Copilot
curl --create-dirs -o .github/copilot-instructions.md https://raw.githubusercontent.com/dagger/container-use/main/rules/agent.md
Examples
Example | Description |
---|---|
hello_world.md | Creates a simple app and runs it, accessible via localhost HTTP URL |
history.md | Demonstrates container snapshotting by making changes to an app and showing history/diffs of the modifications |
parallel.md | Creates and serves two variations of a hello world app (Flask and FastAPI) on different URLs |
multibuild.md | Builds the current project using the 3 most recent Go versions |
security.md | Security scanning example that checks for updates/vulnerabilities in the repository, applies updates, verifies builds still work, and generates patch file |
Run with goose:
goose run -i ./examples/security.md -s
Watching your agents work
Your agents will automatically commit to a container-use remote on your local filesystem. You can watch the progress of your agents in real time by running:
container-use watch