Configuration¶
Detailed configuration options for Contree MCP.
Authentication¶
Config File (Recommended)¶
Store credentials in ~/.config/contree/mcp.ini:
[DEFAULT]
url = https://contree.dev
token = <TOKEN HERE>
This keeps tokens out of shell history and environment variable listings.
To use a custom config location, set CONTREE_MCP_CONFIG:
export CONTREE_MCP_CONFIG="/path/to/custom/config.ini"
Environment Variable (Not Recommended)¶
export CONTREE_MCP_TOKEN="your-token-here"
Tokens passed via environment variables may appear in process listings.
Server Options¶
Option |
Environment Variable |
Default |
Description |
|---|---|---|---|
- |
|
|
Config file path |
|
|
(required) |
API token |
|
|
|
Remote Contree API endpoint |
|
|
|
|
|
|
|
HTTP mode port |
|
|
|
HTTP mode bind address |
|
|
|
Logging level |
Cache Configuration¶
Option |
Environment Variable |
Default |
|---|---|---|
|
|
|
|
|
|
|
- |
|
Client Configuration Examples¶
With credentials stored in ~/.config/contree/mcp.ini, MCP client configs are minimal:
Claude Code¶
claude mcp add --transport stdio contree -- $(which uvx) contree-mcp
HTTP Mode¶
For network access from other machines:
contree-mcp --mode http --http-port 9452 --http-listen 0.0.0.0
Visit http://localhost:9452/ for interactive documentation with setup guides, tool reference, and best practices.
The HTTP interface showing Setup, Instructions, Tools, Resources, and Guides tabs.¶
Manual Installation¶
# Using uv
uv pip install contree-mcp
# Using pip
pip install contree-mcp
# Container environments (PEP 668)
pip install --break-system-packages contree-mcp