Separating Intelligence from Execution: A Workflow Engine for the Model Context Protocol
Agents reason once, then execute 67-step workflows with a single tool call.
A new research paper from Abhinav Singh Parmar presents the MCP Workflow Engine, a TypeScript-based system built on the Model Context Protocol (MCP) that separates an agent's reasoning (intelligence) from its execution (action). Traditional LLM agents must plan each tool call during every session, burning tokens even on repetitive tasks. The engine solves this by having the agent reason once to produce a declarative workflow blueprint—a JSON document specifying directed sequences, parameterized templates, loops, parallel branches, and data piping. Subsequent runs require only a single run_workflow tool call, consuming tokens for just that one invocation regardless of internal complexity.
To enable this, the author formalizes the MCP Mediator pattern—an MCP server that simultaneously acts as a client to downstream MCP servers. The engine was evaluated on a production-scale Kubernetes CMDB synchronization task spanning 38 namespaces, 13 worker nodes, and 22 resource types across 67 orchestrated steps and two MCP servers. Results showed a per-execution token cost reduction of over 99%, full cluster graph rendering (1,200+ nodes, 2,800+ relationships) in under 45 seconds, and deterministic, idempotent execution with zero agent involvement at runtime. This approach promises to dramatically reduce operational costs for agent-based automation in complex distributed systems.
- Declarative workflow blueprints in JSON capture sequences, loops, branches, and data piping from a single reasoning pass.
- The MCP Mediator architectural pattern enables an MCP server to act as both server and client to downstream servers.
- Real-world test on a Kubernetes CMDB sync: 67 steps, 99%+ token savings, and under 45 seconds for 1,200+ nodes.
Why It Matters
Agents become infinitely more cost-efficient for repetitive tasks, making large-scale automation practical.