> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tokenfactory.nebius.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

[![PyPI](https://img.shields.io/pypi/v/contree-mcp.svg)](https://pypi.org/project/contree-mcp/)
[![Tests](https://github.com/nebius/contree-mcp/actions/workflows/tests.yml/badge.svg)](https://github.com/nebius/contree-mcp/actions/workflows/tests.yml)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/nebius/contree-mcp/blob/master/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.

<Columns cols={2}>
  <Card title="Quickstart" href="./quickstart" icon="rocket">
    Run your first container in 5 minutes.
  </Card>

  <Card title="Concepts" href="./concepts/index" icon="lightbulb">
    Understand execution model, images, file sync.
  </Card>

  <Card title="Tools" href="./tools/index" icon="screwdriver-wrench">
    All 15 tools with parameters and examples.
  </Card>

  <Card title="Patterns" href="./patterns" icon="shapes">
    Common workflows and mistakes to avoid.
  </Card>

  <Card title="Prompts" href="./prompts/index" icon="comments">
    10 MCP prompts for common workflows.
  </Card>
</Columns>

## 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

```json theme={null}
{"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:

```bash theme={null}
contree-mcp --mode http --http-port 9452
```

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

<Frame caption="The HTTP interface with Setup, Instructions, Tools, Resources, and Guides.">
  <img src="https://mintcdn.com/nebius-723e8b65/n3mUJ3z-imV4W5D-/sandboxes/mcp/images/http-index-page-screenshot.png?fit=max&auto=format&n=n3mUJ3z-imV4W5D-&q=85&s=5712af3d123e528f6a597e5d0613f448" alt="Contree MCP Server HTTP interface" width="100%" data-path="sandboxes/mcp/images/http-index-page-screenshot.png" />
</Frame>

## Security

To report security issues, see [Security](./security).

## License

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