Skip to content

ironflow mcp

Start the Model Context Protocol (MCP) server for AI assistant integration.

Terminal window
ironflow mcp [flags]

AI assistants like Claude Code, Cursor, and Windsurf can use this to interact with your Ironflow server directly from the IDE. The MCP server runs on stdio by default. Supervisors can opt into authenticated streamable HTTP on a loopback address; HTTP mode requires IRONFLOW_MCP_BEARER_TOKEN.

By default, only the 23 read tools are registered. --allow-writes adds 11 write tools (emit events, invoke functions, cancel/resume runs, append entity events, set secrets and KV keys, requeue or discard outbox DLQ entries, rebuild projections, reset circuit breakers). Combining --allow-writes with --evidence-file registers one more, ironflow_await_reload. On top of these, application tools the SDK registered with the server are exposed dynamically unless --static-only is passed.

Flags:

FlagTypeDefaultDescription
--server-urlstringhttp://localhost:9123Ironflow server URL
--api-keystringAPI key for authentication (or IRONFLOW_API_KEY)
--allow-writesboolfalseEnable write operations (emit events, invoke)
--evidence-filestringAppend a JSONL trail of every tool call and result; with --allow-writes it also registers ironflow_await_reload
--transportstringstdioMCP transport: stdio or streamable-http
--hoststring127.0.0.1Loopback host for streamable HTTP
--portint0HTTP port; 0 lets the OS choose
--port-filestringWrite bound HTTP port as mode-0600 JSON {"http_port":N}
--static-onlyboolfalseExclude SDK-registered application tools

Examples:

Terminal window
# Start read-only MCP server
ironflow mcp
# Start with write access
ironflow mcp --allow-writes
# Custom server URL
ironflow mcp --server-url http://prod:9123 --api-key ifkey_...
# Record a tool-call evidence trail
ironflow mcp --allow-writes --evidence-file /path/to/agent-evidence.jsonl
# Authenticated, static-only loopback HTTP on an ephemeral port
IRONFLOW_MCP_BEARER_TOKEN=... ironflow mcp --transport=streamable-http \
--host=127.0.0.1 --port=0 --port-file=/path/to/mcp-port.json --static-only