MCPGen: Benchmarking LLMs on Executable MCPWorkflow Development

Yingxuan Yang, Jiaqi Liu, Lirui Guan, Jiaye Gao, Weiwen Liu, Weinan Zhang, Ying WenarXiv 2026

TL;DR

While Large Language Models (LLMs) are increasingly deployed to build complex automation systems, existing benchmarks only evaluate their tool-using capabilities in isolation. This paper introduces MCPGen, the first executable benchmark designed to evaluate LLMs on generating end-to-end workflows using the Model Context Protocol (MCP). The evaluation exposes a massive "integration gap": even when LLMs successfully write individual tools, no model exceeds a 57% success rate when executing the full, interconnected workflow project.

What Problem Does This Paper Address?

LLMs have progressed from simple text generators to agents capable of invoking external APIs. However, real-world software engineering requires stitching multiple tools into complex Directed Acyclic Graphs (DAGs)—workflows where data must flow seamlessly across steps under strict schema, typing, and runtime constraints.

Existing benchmarks typically evaluate tool selection or step-by-step trajectories using text-based proxies, completely ignoring whether the generated code actually compiles and runs. A workflow can look structurally plausible on paper but fail catastrophically in production due to a minor serialization error, a missing schema field, or mismatched runtime wiring between two adjacent tools. The authors address this lack of holistic, project-level evaluation by shifting the focus from static text matching to process-isolated, end-to-end execution.

Methods

The authors present MCPGen, an execution-based evaluation framework built on Anthropic's Model Context Protocol (MCP). Instead of merely checking text outputs, MCPGen inserts LLM-generated code directly into isolated environments to run actual integration and end-to-end tests.

To pinpoint exactly where LLMs fail, MCPGen breaks workflow development down into three distinct diagnostic tasks:

  1. Workflow Reconstruction: Tests structural reasoning by asking the LLM to recover the correct execution order and data dependencies from a shuffled, anonymized set of workflow steps.
  2. Tool Creation: Tests code generation by tasking the LLM to write missing, schema-compliant Python tools that must seamlessly interoperate with an existing project.
  3. Workflow Extension: Tests compositionality by requiring the LLM to add new functionality to a validated baseline prefix while strictly preserving backward compatibility.
Overview of MCPGen tasks

Datasets

MCPGen introduces a new benchmark dataset containing 100 self-contained MCP workflow projects spanning 16 application domains (such as Finance, DevOps, Marketing, and CRM). These projects are adapted from real-world n8n automation templates.

  • Scale: The dataset includes 911 unique tool targets, averaging 9.1 tools per project.
  • Complexity Tiers: Workflows are split into Easy (3–5 steps), Medium (6–10 steps with branching), and Hard (11+ steps with nested conditionals or parallel paths).
  • Environment: To ensure absolute reproducibility and isolate code correctness from external network volatility, all live APIs are replaced with deterministic offline mocks and locked dependencies.
Figure 2: Domain distribution of the 100 MCPGen projects. The outer ring shows 16 application domains; the inner ring groups them by primary data modality.

Key Insights and Ideas

  • The "Unit-to-Integration" Bottleneck: The most striking finding is that passing individual tool unit tests does not guarantee project success. Models like Claude-Sonnet achieve a high individual tool pass rate (63.8%), but when all generated tools are thrown into the project together, the collective integration pass rate plummets to 41%.
  • Framework Violations Trump Logic Errors: You might expect LLMs to fail due to complex control logic or math. Instead, the largest source of runtime failures (31.9%) stems from violating the MCP framework itself—specifically, generating workflow arguments that fail Pydantic runtime schema validation before the tool even executes.
  • Diverse Failure Profiles: LLMs don't fail uniformly. For instance, Claude-Sonnet and GPT-5.2 struggle heavily with basic syntax and import errors (accounting for up to 40% of their failures), whereas GPT-4o-mini and Claude-Haiku are syntactically sound but frequently violate runtime schema bindings.

Key Results

The authors evaluated 11 representative foundation LLMs in a single-turn setting. The results show a sharp divergence between structural understanding and actual execution:

  • Task 1 (Reconstruction): Highly tractable. Gemini-Flash led with 88.5% overall accuracy, proving that modern LLMs are highly capable of inferring sequential dependencies from raw schemas.
  • Task 2 (Tool Creation): Claude-Haiku achieved the highest Collective Pass rate at 45.0%, showing better compositional robustness than larger models.
  • Task 3 (Workflow Extension): Gemini-Pro dominated end-to-end execution, achieving the highest E2E Success rate of 57%, followed closely by o3 at 46%.
  • The Illusion of Success: GPT-4o-mini bottomed out at a mere 6% E2E success, despite having decent structural sub-metrics (67.3% Tool Chain accuracy). This massive disconnect highlights why execution-based benchmarking is vital; structural metrics hide fatal runtime bugs.

Limitations and Future Work

  • Template Bias: The 100 projects are derived entirely from n8n community templates, which may not fully capture the messy, custom realities of enterprise production orchestration.
  • Sterilized Environments: By using deterministic offline mocks, the benchmark omits real-world distributed systems headaches like authentication expiration, rate-limiting, and transient network drops.
  • Single-Turn Limitation: The evaluation isolates foundation model capabilities in a single turn. In practice, developers use agentic workflows with multi-turn execution feedback and interactive repair, which the authors flag as a crucial direction for future benchmarking.

Summary updated

BibTeX
@misc{yang2026mcpgen,
  author = {Yingxuan Yang and Jiaqi Liu and Lirui Guan and Jiaye Gao and Weiwen Liu and Weinan Zhang and Ying Wen},
  title = {{MCPGen: Benchmarking LLMs on Executable MCPWorkflow Development}},
  year = {2026},
  eprint = {2609.23925},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.23925},
}
Figure