Configuration
Configure the KubeMQ MCP connector — enabled by default, tool timeout, trusted origins, and the disable env var, with TOML, environment variables, and Docker.
The MCP connector runs on KubeMQ's shared HTTP server and is enabled by default. Configuration is minimal: a tool-execution timeout and an origin-validation allow-list. This page lists every McpConfig field with its verified default and shows how to set each one through TOML, environment variables, and Docker.
Configuration fields
These are the McpConfig fields and their defaults, taken verbatim from kubemq-server. All three connectors share the HTTP server's CORS, auth, traffic-gate, and TLS settings — those live in Shared HTTP server and Auth & security, not here.
| Field | Type | Default | Description |
|---|---|---|---|
Enable | bool | true | Whether the MCP connector is mounted. Enabled by default — set to false to turn it off. |
ToolTimeoutSeconds | int | 300 | Server-side timeout applied to each tool execution. A tool that exceeds this window returns a tool error (isError: true). Must be positive when the connector is enabled. |
TrustedOrigins | []string | ["auto"] | Origins permitted by the connector's Origin-header validation. auto allows localhost variants and the server bind address; * allows all; an explicit list permits only those origins. |
ToolTimeoutSeconds (default 300) is the server-side tool-execution budget. It is independent of any client-side HTTP timeout and of the per-call timeout_seconds argument on tools like command_send, query_send, and agent_send, which is itself capped at 300.
Enable / disable
The MCP connector is enabled by default. Start kubemq-server and POST /mcp is live — no =true flag is required.
To disable it, set its enable env var to false:
docker run -d -p 9090:9090 -p 50000:50000 -e KUBEMQ_TOKEN=YOUR_LICENSE_KEY -e CONNECTORSMCP_ENABLE=false europe-docker.pkg.dev/kubemq/images/kubemq:nextThe disable variable is CONNECTORSMCP_ENABLE — there is no underscore between MCP and ENABLE. The name is generated by snake-casing the dotted config key Connectors.MCP.Enable; because MCP has no lowercase letters, the transform inserts no separator and the segments join. This differs from older KubeMQ docs that described MCP as off-by-default and instructed enabling with =true — that framing is stale. See Shared HTTP server → enable model for the full algorithm.
TOML configuration
Set the fields under a [Connectors.MCP] table in config.toml:
[Connectors.MCP]
Enable = true
ToolTimeoutSeconds = 300
TrustedOrigins = ["auto"]Environment variables
Each config field binds to an environment variable derived from its dotted key. The dots are stripped, the remainder is snake-cased and upper-cased, so Connectors.MCP.ToolTimeoutSeconds becomes CONNECTORSMCP_TOOL_TIMEOUT_SECONDS.
| Variable | Config field | Default | Description |
|---|---|---|---|
CONNECTORSMCP_ENABLE | Connectors.MCP.Enable | true | Enable (default) or disable (false) the MCP connector. |
CONNECTORSMCP_TOOL_TIMEOUT_SECONDS | Connectors.MCP.ToolTimeoutSeconds | 300 | Server-side per-tool execution timeout, in seconds. |
CONNECTORSMCP_TRUSTED_ORIGINS | Connectors.MCP.TrustedOrigins | auto | Comma-separated origin allow-list for Origin validation. |
export CONNECTORSMCP_ENABLE=true
export CONNECTORSMCP_TOOL_TIMEOUT_SECONDS=300
export CONNECTORSMCP_TRUSTED_ORIGINS=autoThe Origin allow-list set here is an MCP-specific check layered on top of the shared HTTP server's CORS middleware. For how auto, *, and explicit origins are evaluated — and the -32010 error returned on a rejected origin — see Auth & security.
Docker
Pass the same variables to docker run. This example keeps MCP at its default-on state and raises the tool timeout:
docker run -d \ --name kubemq \ -p 9090:9090 \ -p 50000:50000 \ -e KUBEMQ_TOKEN=YOUR_LICENSE_KEY \ -e CONNECTORSMCP_TOOL_TIMEOUT_SECONDS=600 \ europe-docker.pkg.dev/kubemq/images/kubemq:nextThe connector is served because Enable defaults to true; to turn it off, add -e CONNECTORSMCP_ENABLE=false as shown in Enable / disable above.
Client protocol settings
The settings above are server-side. When a client opens a session it negotiates the protocol in the initialize handshake. KubeMQ expects protocol version 2025-11-25, a clientInfo object, and an empty capabilities object — capabilities are server-driven.
| Setting | Value | Description |
|---|---|---|
| Protocol version | 2025-11-25 | MCP protocol version sent in the initialize request and echoed in the MCP-Protocol-Version response header. |
| Client info | { name, version } | Identifies the client to the server. |
| Capabilities | {} | Empty object — the server advertises its own capabilities in the response. |
{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2025-11-25",
"capabilities": {},
"clientInfo": {
"name": "my-agent",
"version": "1.0.0"
}
}
}The server replies with its own protocolVersion, capabilities, serverInfo, and a sessionId under result._meta. The handshake and session reuse are covered in depth in Session management.
Related
Was this page helpful?