Overview

PyPI Tests License

Isolated cloud container execution for AI agents.

Contree MCP is a Model Context Protocol server that gives AI agents secure sandboxed environments with full root access, network, and persistent images. Experiment fearlessly—every container is isolated, every image is immutable, mistakes are free.

Quickstart

Run your first container in 5 minutes.

Quickstart
Concepts

Understand execution model, images, file sync.

Concepts
Tools

All 15 tools with parameters and examples.

Tools Reference
Patterns

Common workflows and mistakes to avoid.

Patterns
Prompts

10 MCP prompts for common workflows.

Prompts Reference

Why Contree?

  • Safe sandbox: Run rm -rf /, kernel exploits—nothing escapes

  • Immutable images: Every UUID is a snapshot, branching is cheap

  • Instant rollback: Revert to any previous image at zero cost

Quick Example

{"tool": "list_images", "args": {"tag_prefix": "python"}}

{"tool": "rsync", "args": {"source": "/project", "destination": "/app"}}

{"tool": "run", "args": {
  "command": "python /app/main.py",
  "image": "img-uuid",
  "directory_state_id": "ds-uuid"
}}

HTTP Mode

Run the MCP server with built-in interactive documentation:

contree-mcp --mode http --http-port 9452

Visit http://localhost:9452/ for setup guides, tool reference, and best practices.

Contree MCP Server HTTP interface

The HTTP interface with Setup, Instructions, Tools, Resources, and Guides.

Security

To report security issues, see Security.

License

Licensed under the Apache License, Version 2.0. See LICENSE for details.