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:
~/.config/contree/auth.ini (mode 0600). The MCP server
picks it up automatically.
If you prefer to write the file by hand:
contree.dev), use:
contree auth switch <name>, or
pass --profile <name> / CONTREE_PROFILE=<name> to contree-mcp.
Step 2: Configure Your MCP Client
- Claude Code
- Claude Desktop
- OpenAI Codex CLI
/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
Step 2: Run a Command
Step 3: Run with Local Files
First, sync your 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.