Skip to content
Ironflow is pre-1.0: APIs can change between releases. Pin a version. What is ready →

Agent harnesses with MCP

You are building an agent harness for an application: the execution loop, tools, state, and approval decisions around the agent’s reasoning. You want MCP clients to use those capabilities. A coding assistant might start an investigation, ask for its status, and read the result without embedding your application’s logic into its own session.

Completion means clients can request useful work and inspect what happened. Ironflow supplies runtime and protocol components; you write the harness, tool contracts, model integration, and application permissions.

Register application tools through an Ironflow SDK. Run the MCP server with write operations enabled to expose those tools to clients. A tool can validate an investigation request and explicitly start a durable agent run. Another operation can return its progress or completed result.

The run gathers evidence, calls the model, and waits for approval before taking an action. Your application records domain events and derives a status view where that view helps the operator. Separate long-running work from the client’s initial tool response so the client can reconnect later.

The client disconnects after starting work. The durable run can continue or remain paused for approval without keeping that client session alive. A worker restart preserves completed durable step results.

An MCP-exposed tool handler is a callable capability. Exposing it does not automatically turn its execution into a durable run. The handler must invoke durable work explicitly when the job needs recovery, long waits, or saved steps.

The MCP server exposes runtime operations and SDK-registered application tools. Application tools require write mode and are excluded by --static-only. Agent APIs supply durable execution, tool/model steps, and approval waits. Entity streams and projections can hold explicitly recorded case facts and derive a client-facing view.

The application still decides which tools a client should reach, validates their inputs, and enforces its business authorization. Give the MCP adapter an appropriately scoped engine API key. Enable execution recording when you want the inspectable execution history described by the debugging guides.

This is an illustrative flow:

  1. Define a tool that accepts and validates a task request.
  2. Have it start a durable agent run and return the run’s identifier.
  3. Wrap external calls and model calls in durable steps.
  4. Wait for application-authorized approval before external actions.
  5. Expose a progress/result operation and connect an MCP client.
  • MCP server explains connection setup, read/write modes, dynamic application tools, and runtime inspection.
  • Agent tool dispatch describes the handler callback contract and signature verification.
  • Survive a crash shows durable agent steps; it is a document-processing example you can use to learn the execution layer.