How MCP works in Comis
- Comis connects to enabled servers when the daemon starts. One failed server does not prevent the daemon or other MCP servers from starting.
- Tools are discovered from each connected server. Comis tracks them as
mcp:server-name/tool-nameand exposes the LLM-safe callable namemcp__server-name--tool-nameto agents. - Only tools from currently connected servers enter the agent tool set. They disappear while a server reconnects and return after discovery succeeds.
- An involuntary disconnect, keepalive failure, or repeated client error starts automatic reconnection. The default is up to five attempts with jittered exponential backoff; an explicit disconnect is not retried.
Configure a server
1
Store any required credential
Secret names must start with an uppercase letter and otherwise use only
uppercase letters, digits, and underscores. This command opens a hidden
prompt and stores the value in the configured credential backend, which is
encrypted by default:See Secrets Management for non-interactive input and
storage modes.
2
Add an array entry to config.yaml
integrations.mcp.servers is an array. Every entry needs a unique name
and the fields required by its transport.${MCP_SERVICE_TOKEN} through its secret manager when loading
the configuration; the secret value does not need to appear in the YAML.3
Restart and verify
Configuration-file entries are loaded at daemon startup.You can also inspect servers in the web UI under MCP Servers.
Transports
maxConcurrency overrides the transport default. For stdio, keep the default
unless the server explicitly supports parallel tool calls. Comis can infer
stdio from command or http from url when transport is omitted, but
setting it explicitly makes shared configuration easier to review.
Remote server example
Usehttp for current remote servers. Custom headers are supported by http
and sse; they are ignored for stdio.
sse only when the server requires the legacy transport:
Secret references
Use${UPPERCASE_NAME} anywhere an MCP env or headers string needs a
stored value. The same syntax can be embedded in a larger string, such as the
Authorization header above. A missing reference is reported instead of
starting the server with an unresolved placeholder.
For stdio servers, Comis passes a scrubbed baseline environment plus the
explicit env entries in the server configuration. It does not copy every
daemon environment variable into the child process.
Operate connections
The CLI exposes the live MCP connection state:
Agents with admin trust can use
mcp_manage for list, status, connect,
disconnect, and reconnect. Connection-changing actions pass through the
approval gate. A newly connected server’s tools become callable on the next
message because the active tool set is fixed for the current turn.
See the configuration reference for MCP’s place in
the broader Comis configuration.
Config Reference
MCP configuration structure and core fields
Secrets Management
Store and reference credentials
Tool Policy
Control which tools agents may use
