Skip to main content
Run your first container in 5 minutes.

Prerequisites

  • An MCP-compatible client (Claude Code, Claude Desktop, or OpenAI Codex CLI)
  • A Contree API token

Getting an API Token

Contree is in Early Access. To get an API token, fill out the request form at contree.dev.

Installation

Step 1: Authenticate

contree-mcp reads the same auth.ini that contree-cli writes, so a single login covers both tools. Recommended: install contree-cli and run contree auth:
This writes ~/.config/contree/auth.ini (mode 0600). The MCP server picks it up automatically. If you prefer to write the file by hand:
For the legacy JWT flow (contree.dev), use:
To switch between profiles later: contree auth switch <name>, or pass --profile <name> / CONTREE_PROFILE=<name> to contree-mcp.

Step 2: Configure Your MCP Client

Restart Claude Code or run /mcp to verify.
You can also pass credentials via environment variables (CONTREE_TOKEN, CONTREE_URL, CONTREE_PROJECT, CONTREE_PROFILE) or CLI flags (--token, --url, --project, --profile). These are useful for ephemeral overrides — but tokens passed via env may show up in process listings, so for routine use prefer the auth.ini profile written by contree auth.

Your First Container

Step 1: Check Available Images

If you don’t have any Python images, import one:
Response:

Step 2: Run a Command

Response:

Step 3: Run with Local Files

First, sync your files:
Response:
Then run with the synced files:

What’s Next?

Concepts

Understand images, lineage, and async execution.

Patterns

Common workflows and best practices.

Tool Reference

Detailed parameters for all 15 tools.

Resources

MCP resources and guide sections.