McpServer
Stability: beta -- This resource kind ships with
orloj.dev/v1and is suitable for production use, but its schema may evolve with migration guidance in future minor releases.
Represents a connection to an external MCP (Model Context Protocol) server. The McpServer controller discovers tools via tools/list and auto-generates Tool resources (type=mcp) for each.
spec
transport(string): required.stdioorhttp.command(string): stdio transport: command to spawn the MCP server process. Required unlessimageis set.args([]string): stdio transport: command arguments.env([]object): stdio transport: environment variables for the child process. Each entry has:name(string): environment variable name.value(string): literal value.secretRef(string): resolve value from a Secret resource. Mutually exclusive withvalue.mountPath(string): absolute path inside the container where the resolved value is written as a file. Only valid whenimageis set. The env var is set to the mount path so the MCP server can locate the file.
image(string): stdio transport: container image. When set, the MCP server runs inside a Docker container (docker run --rm -i) with sandboxing.image_pull_secret(string): name of a Secret containing registry credentials for pullingspec.image. The Secret must contain either a.dockerconfigjsonkey with a complete Docker config JSON, orregistry,username, andpasswordkeys. Requiresimageto be set.idle_timeout(duration string): duration after which an idle session is shut down (e.g.5m). Default0means never evict.endpoint(string): http transport: the MCP server URL.auth(object): http transport: authentication configuration.secretRef(string): secret reference for auth.profile(string):bearerorapi_key_header. Defaults tobearer.
tool_filter(object): optional tool import filtering.include([]string): allowlist of MCP tool names. When set, only listed tools are generated. When empty, all discovered tools are generated.
reconnect(object): reconnection policy.max_attempts(int): max reconnection attempts. Defaults to 3.backoff(duration string): backoff between attempts. Defaults to2s.
default_tool_runtime(object): default runtime policy inherited by all generated Tool resources. When set, each tool synced from this server receives this policy as itsspec.runtime.timeout(duration string): max tool call execution time (e.g.30s,2m).isolation_mode(string): isolation mode for tool execution.retry(object): retry policy (see Tool resource).
Defaults and Validation
transportis required. Must bestdioorhttp.commandorimageis required whentransport=stdio.endpointis required whentransport=http.imageis only valid withtransport=stdio.image_pull_secretrequiresimageto be set.env[].secretRefandenv[].valueare mutually exclusive.env[].mountPathrequiresimageto be set and must be an absolute path.idle_timeoutdefaults to0(never evict).reconnect.max_attemptsdefaults to3.reconnect.backoffdefaults to2s.
status
phase:Pending,Connecting,Ready,Error.discoveredTools([]string): all tool names from the MCP server'stools/listresponse.generatedTools([]string): names of theToolresources actually created.lastSyncedAt(timestamp): last successful tool sync.lastError(string): last error message.
Guide: Connect an MCP Server
Examples: examples/resources/mcp-servers/
See also: MCP server concepts.