Skip to main content

MCP

Runix exposes process management operations through Model Context Protocol tools and resources.

Implementation​

The implementation lives in runix/internal/mcp/.

FileResponsibility
server.goMCP server construction and registration
tools.goTool definitions
handlers.goTool handlers backed by the supervisor
resources.goResource and resource-template handlers
transport_stdio.gostdio transport
transport_http.gostreamable HTTP transport

Launch​

# stdio transport
runix mcp

# HTTP transport
runix mcp --transport http --listen localhost:8090

If transport is omitted, Runix defaults to stdio.

Transports​

stdio​

Used for local AI agent integrations that spawn runix mcp as a subprocess.

HTTP​

Used for remote or long-running integrations. The HTTP server listens on the configured address and logs /mcp as the endpoint.

When auth is enabled, HTTP requests are wrapped with the shared Runix auth middleware.

Tools​

ToolRequired ParamsOptional ParamsDescription
list_appsnonenoneList all managed processes
start_appentrypointname, runtime, cwd, restart_policy, envStart a process
stop_apptargetforceStop a process by ID, name, or all
restart_apptargetnoneRestart a process
reload_apptargetnoneGracefully reload a process
delete_apptargetnoneStop and remove a process
get_statustargetnoneReturn full process status
get_logstargetlinesReturn recent process logs
save_statenonenonePersist current state to disk
resurrect_processesnonenoneRestore previously saved state

Resources​

ResourceTypeMIME TypeDescription
apps://liststaticapplication/jsonAll managed processes
apps://{name}templateapplication/jsonOne process by ID or name
logs://{name}templatetext/plainRecent log output
metrics://{name}templateapplication/jsonCollected metrics for a process

Example Configuration​

mcp:
enabled: true
transport: stdio
listen: localhost:8090

security:
auth:
enabled: true
mode: token
token: "replace-with-a-long-random-token"

CLI flags override config values for transport and listen.

Notes​

  • MCP handlers call the supervisor directly, not the daemon IPC client
  • Log and resource reads are capped to the last 1 MiB
  • Metrics resources return a status object when collection is disabled or no sample exists yet