Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ruvnet/ruflo/llms.txt

Use this file to discover all available pages before exploring further.

ruflo mcp manages the Model Context Protocol server that bridges Ruflo to Claude Code and any other MCP-compatible client. The MCP server exposes Ruflo’s full tool catalog (agent management, swarm coordination, memory operations, hooks, and more) as structured tool calls. In the default stdio transport, Claude Code communicates with it directly through the process I/O streams — no port required.

Synopsis

ruflo mcp <subcommand> [options]

Subcommands

SubcommandDescription
startStart the MCP server
stopStop the running MCP server
statusShow server status, PID, uptime, and health
healthPerform a deep health check against a running server
restartStop and start the server in one step
toolsList all registered tools, optionally filtered by category
toggleEnable or disable specific tools by name
execExecute an MCP tool directly from the CLI
logsShow recent server log entries

Transports

TransportValueDescription
stdiostdio(Default) Standard I/O — used by Claude Code’s native MCP integration
HTTPhttpJSON-RPC over HTTP; exposes /health and /rpc endpoints
WebSocketwebsocketPersistent WebSocket connection at /ws
The stdio transport is the recommended transport for Claude Code integration. To register Ruflo with Claude Code, run:
claude mcp add ruflo -- npx -y ruflo@latest mcp start
Then verify with claude mcp list.

start

Start the MCP server. Detects an already-running server before starting and auto-recovers from stale PID files.
ruflo mcp start [options]
--transport / -t
string
default:"stdio"
Transport protocol. One of: stdio, http, websocket.
--port / -p
number
default:"3000"
Listening port. Only relevant for http and websocket transports.
--host / -h
string
default:"localhost"
Bind address. Only relevant for http and websocket transports.
--tools
string
default:"all"
Comma-separated list of tool names to enable, or all to enable everything.
--daemon / -d
boolean
default:"false"
Detach from the terminal and run as a background daemon.
--force / -f
boolean
default:"false"
Kill any existing server on the same transport/port before starting.
When the server starts on http transport, it exposes:
  • http://<host>:<port>/health — liveness endpoint
  • http://<host>:<port>/rpc — JSON-RPC 2.0 endpoint
When started on websocket, it exposes ws://<host>:<port>/ws.
Ruflo installs a parent-death watchdog when started as a stdio server. If Claude Code exits and the server process is reparented to PID 1 (launchd/init), the server shuts itself down cleanly to prevent stale orphan processes from accumulating in the npx cache.

stop

Gracefully drain pending requests, close connections, and terminate the server process.
ruflo mcp stop [options]
--force / -f
boolean
default:"false"
Skip the graceful drain and send an immediate kill signal.
If no server is running, the command exits cleanly with an info message rather than an error.

status

Print the current server state — running or stopped, PID, transport, host, port (non-stdio only), uptime, and health metrics.
ruflo mcp status [--format json]
For stdio transport, the server is considered running if process.stdin is not a TTY (i.e. the process is attached to a pipe, as when Claude Code has invoked it). Pass --format json for machine-readable output suitable for monitoring scripts.

health

Run a deep health check against the server (not just PID-file inspection).
ruflo mcp health
Returns a healthy/unhealthy verdict and a metrics map. Exits non-zero if the server is unhealthy so the command can be used in CI readiness gates.

restart

Restart the server in one atomic step: stop (graceful) + start with the same options.
ruflo mcp restart [--force]
--force / -f
boolean
default:"false"
Force-kill the existing server before restarting.

tools

List every registered MCP tool, grouped by category.
ruflo mcp tools [--category <cat>] [--enabled]
--category / -c
string
Filter to a single category. Valid values: agent, swarm, memory, hooks, config, system.
--enabled
boolean
default:"false"
Show only enabled tools (skips disabled ones).
Sample tool categories and their tools:
CategoryExample tools
agentagent_spawn, agent_list, agent_terminate, agent_status, agent_health, agent_pool, agent_logs
swarmswarm_init, swarm_status, swarm_scale, swarm_shutdown
memorymemory_store, memory_search, memory_list, memory_stats, memory_import
hookshooks_pre-edit, hooks_post-edit, hooks_pre-command, hooks_post-command, hooks_route, hooks_explain, hooks_pretrain, hooks_metrics, hooks_list, hooks_model-route, hooks_model-outcome, hooks_task-completed, hooks_teammate-idle
configconfig_load, config_save, config_validate
systemsystem_info, system_health, system_metrics

toggle

Enable or disable tools by name without restarting the server.
ruflo mcp toggle --enable <tool1,tool2> --disable <tool3>
--enable / -e
string
Comma-separated tool names to enable.
--disable / -d
string
Comma-separated tool names to disable.

exec

Execute a registered MCP tool directly from the CLI, bypassing Claude Code. Useful for testing tools in isolation or scripting.
ruflo mcp exec --tool <toolName> [--params '<json>']
--tool / -t
string
required
Name of the tool to execute (e.g. swarm_init).
--params / -p
string
JSON-encoded parameter object. Defaults to {} if omitted.

logs

Show recent server log entries.
ruflo mcp logs [options]
--lines / -n
number
default:"20"
Number of lines to display.
--follow / -f
boolean
default:"false"
Stream new log lines as they arrive.
--level
string
Filter to a minimum log level: debug, info, warn, or error.

Examples

# Register ruflo as an MCP server in Claude Code
claude mcp add ruflo -- npx -y ruflo@latest mcp start

# Verify it appears in Claude Code's server list
claude mcp list
If you have multiple Ruflo processes running (e.g. from devcontainer + VS Code task firing at the same time), they may race to write the PID file. Use ruflo mcp start --force or ruflo mcp restart to ensure only one server is active. The CLI’s built-in dedup guard prevents the zombie accumulation issue described in ADR-2407.

Build docs developers (and LLMs) love