Skip to main content

Configuration

colabhive-mcp is configured via environment variables, CLI flags, or a config file. Precedence: CLI flag > env var > config file > default.


Required​

SettingEnv varCLI flagDefaultNotes
API keyCOLABHIVE_API_KEY--api-key—Required unless you've run colabhive-mcp login (F2)

Common​

SettingEnv varCLI flagDefaultNotes
API base URLCOLABHIVE_API_URL--api-urlhttps://api.colabhive.comUse staging: https://api.staging.colabhive.com
Account IDCOLABHIVE_ACCOUNT_ID--account-idauto-detect from keyOverride only if your key has multiple account contexts
Log levelCOLABHIVE_LOG_LEVEL--log-levelinfodebug / info / warning / error
Log formatCOLABHIVE_LOG_FORMAT--log-formatjsonjson (structured) or text (human)
Request timeoutCOLABHIVE_HTTP_TIMEOUT—60 (s)Per-HTTP call to ColabHive API (env or config file)
Sync timeoutCOLABHIVE_SYNC_TIMEOUT--sync-timeout30 (s)Max wait for sync invocation before falling back to poll
Poll intervalCOLABHIVE_POLL_INTERVAL--poll-interval2 (s)Between async polls
Poll max waitCOLABHIVE_POLL_MAX_WAIT--poll-max-wait300 (s)Total time before timing out a cold-path call

Tool filtering​

Limit which tools the agent sees — useful for cost control and reducing context bloat.

SettingEnv varCLI flagDefaultNotes
Allow listCOLABHIVE_ALLOW_TOOLS--allow-tools(all visible)Comma-separated slugs or globs: qwen-*,web-*
Deny listCOLABHIVE_DENY_TOOLS--deny-tools(none)Applied after allow list
Allowed kindsCOLABHIVE_ALLOW_KINDS--allow-kindsallComma list: llm,specialist,tool,trained_model,generative,model,operation
Deny side-effectsCOLABHIVE_DENY_SIDE_EFFECTS--deny-side-effects(none)Hide any tool whose manifest sideEffects include a listed value (e.g. network)
Stability floorCOLABHIVE_STABILITY--stabilitybetaexperimental ≥ all; beta ≥ beta+stable; stable ≥ stable only

Example — only let the agent use LLMs and your own trained models, never tools that hit the network:

export COLABHIVE_ALLOW_KINDS="llm,trained_model"

Example — only stable models, exclude expensive generative:

export COLABHIVE_STABILITY=stable
export COLABHIVE_ALLOW_KINDS="llm,specialist,tool" # excludes generative

Transport​

SettingEnv varCLI flagDefaultNotes
Transport—sub-commandstdiostdio (default if no sub-command), serve (HTTP/SSE), sdk-stdio / sdk-serve (official MCP SDK: strict stdio / stateless Streamable HTTP)
HTTP host—--host127.0.0.1Bind address for serve / sdk-serve
HTTP port—--port8765Listen port for serve / sdk-serve
SSE path—--sse-path/mcpURL path of the MCP endpoint

Browser origins (CORS)​

Not in the published package yet

COLABHIVE_CORS_ORIGINS ships in colabhive-mcp 0.4.0, which is not published on PyPI yet. The published release, colabhive-mcp==0.3.4, does not include it.

Until then --cors does not exist and COLABHIVE_CORS_ORIGINS has no effect.

SettingEnv varCLI flagDefaultNotes
CORS originsCOLABHIVE_CORS_ORIGINS--cors(none)Comma list of exact browser origins allowed to call serve / sdk-serve, e.g. https://app.example.com

Unset, the HTTP server adds no CORS headers, so a web page on another origin cannot read its responses. Set, each listed origin gets CORS headers for the MCP endpoint, and a request whose Origin header is not in the list is refused with 403 before it is authenticated. Requests without an Origin header (desktop and CLI clients) are unaffected. * is refused at startup, as is anything that is not scheme://host[:port]. The server never allows credentials: the API key travels in a header, not a cookie.

If a reverse proxy in front of the server already adds CORS headers, configure origins in one place only: two Access-Control-Allow-Origin headers make browsers reject the response.


Caching​

The server caches the manifest in memory to avoid hammering /mcp/manifest on every tools/list.

SettingEnv varCLI flagDefaultNotes
Manifest TTLCOLABHIVE_MANIFEST_TTL--manifest-ttl300 (s)Refreshes on tools/list if TTL expired
Honor ETagCOLABHIVE_USE_ETAG--no-etag (turns it off)trueIf-None-Match to avoid re-downloading unchanged manifests

Config file​

Instead of env vars, you can put settings in ~/.config/colabhive-mcp/config.toml (Linux/macOS) or %APPDATA%\colabhive-mcp\config.toml (Windows):

# ~/.config/colabhive-mcp/config.toml
api_key = "hive_xxx"
api_url = "https://api.colabhive.com"
log_level = "info"

[filter]
allow_kinds = ["llm", "specialist", "trained_model"]
deny_tools = ["z-image-turbo"]
stability = "stable"

[transport]
sync_timeout = 45
poll_max_wait = 600
manifest_ttl = 600

Validate it:

colabhive-mcp config --check

Multiple profiles​

If you use ColabHive across staging + prod or multiple accounts:

# Profile 'prod'
colabhive-mcp --profile prod serve

# Profile 'staging'
colabhive-mcp --profile staging serve

Profiles live in ~/.config/colabhive-mcp/profiles/{name}.toml with the same shape as the main config file.


Reading current config​

colabhive-mcp config --show

Prints the resolved configuration (with the API key redacted), showing where each value came from (env / flag / file / default).


Next​

→ Manifests reference