Skip to content

MCP Server

Ironflow includes a built-in Model Context Protocol (MCP) server. This lets AI assistants operate your Ironflow server directly from the IDE — list runs, inspect step outputs, emit events, query projections, and more.

Add to your project’s .mcp.json:

{
"mcpServers": {
"ironflow": {
"command": "ironflow",
"args": ["mcp", "--allow-writes"]
}
}
}

Add to your MCP settings (Settings → MCP):

{
"ironflow": {
"command": "ironflow",
"args": ["mcp", "--allow-writes"]
}
}

If the Ironflow server is running on a different port or host:

{
"mcpServers": {
"ironflow": {
"command": "ironflow",
"args": ["mcp", "--allow-writes", "--server-url", "http://localhost:9000"]
}
}
}

For servers with auth enabled, pass an API key:

{
"mcpServers": {
"ironflow": {
"command": "ironflow",
"args": ["mcp", "--allow-writes", "--api-key", "ifkey_your_api_key"]
}
}
}

Or set the IRONFLOW_API_KEY environment variable.

By default, the MCP server starts in read-only mode — only observation tools are available. Add --allow-writes to enable tools that modify state (emitting events, invoking functions, writing to KV store, etc.).

ToolDescription
ironflow_server_infoServer health and version
ironflow_overviewDashboard stats: function count, active runs, workers, recent events
ironflow_list_functionsAll registered functions
ironflow_get_functionFunction details: triggers, concurrency, config
ironflow_list_runsRecent workflow runs with status
ironflow_get_runDetailed run info including step outputs
ironflow_get_run_stepsStep-by-step execution details
ironflow_list_eventsRecent events
ironflow_list_projectionsAll projections (read models)
ironflow_projection_statusSpecific projection state
ironflow_list_entity_streamsAll entity streams
ironflow_read_entity_streamEntity event history
ironflow_list_projectsProjects (organizational boundaries)
ironflow_list_environmentsEnvironments (deployment targets)
ironflow_list_workersConnected pull-mode workers
ironflow_kv_list_bucketsKV store buckets
ironflow_kv_list_keysKeys in a KV bucket
ironflow_kv_getGet a KV value
ironflow_list_secretsAvailable secret names
ironflow_sql_queryRead-only SQL queries
ToolDescription
ironflow_emit_eventEmit an event (triggers matching functions)
ironflow_invoke_functionDirectly invoke a function
ironflow_cancel_runCancel a running workflow
ironflow_retry_runRetry a failed run from the last successful step
ironflow_append_entity_eventAppend an event to an entity stream
ironflow_kv_putStore a value in a KV bucket
ironflow_secret_setSet a secret value

With the MCP server configured, you can ask your AI assistant to:

  1. “What functions are registered?” → calls ironflow_list_functions
  2. “Emit an order.placed event” → calls ironflow_emit_event
  3. “Show me what happened in that run” → calls ironflow_get_run + ironflow_get_run_steps
  4. “What’s the current state of the order-stats projection?” → calls ironflow_projection_status
  5. “Query the database for failed runs in the last hour” → calls ironflow_sql_query
You: "List recent failed runs"
AI: → ironflow_list_runs (filters for failed status)
"Run run_abc123 failed at step 'charge-payment'"
You: "Show me what happened step by step"
AI: → ironflow_get_run_steps(run_id: "run_abc123")
"Step 1 (validate-order) succeeded with output {...}
Step 2 (charge-payment) failed: 'Payment gateway timeout'"
You: "What event triggered this?"
AI: → ironflow_list_events
"Event order.placed with data {orderId: 'ord-456', total: 99.99}"
Terminal window
ironflow mcp # Read-only mode
ironflow mcp --allow-writes # Enable write operations
ironflow mcp --server-url http://host:port # Custom server URL
ironflow mcp --api-key ifkey_xxx # API key authentication
FlagDefaultDescription
--allow-writesfalseEnable write operations
--server-urlhttp://localhost:9123Ironflow server URL
--api-key""API key (or set IRONFLOW_API_KEY)

The MCP server provides runtime tools (the agent’s “hands”), while AI Skills provide structured knowledge and workflows (the agent’s “brain”). The debug skill automatically uses MCP tools when available and falls back to CLI when not. For the best AI experience, use both.

In addition to the 27 static tools listed above, the MCP server automatically discovers and registers dynamic agent tools at startup. These are tools registered by SDK clients via the AgentToolsService/RegisterTool RPC on the running ironflow serve process.

  • The MCP CLI calls ListTools at startup to fetch SDK-registered tools
  • Each returned tool is registered as a dynamic MCP tool
  • Invocations are forwarded to the Ironflow server via InvokeTool
  • This is best-effort — if the server is unreachable, static tools still work
  • Restart the MCP CLI to pick up newly registered agent tools (no live tools/list_changed push in v1)

This means your effective MCP tool count may be higher than the 27 static tools listed in the tables above.