arXiv:2610.41479cs.AIOct 2026

Manuscript Offprint

arXiv:2610.41479

EvoMCP: Co-evolving MCP agents and training data

Xuanang Gao, Kepeng Lin, Xinyan Shi, Yong Deng, Shuheng Shen, Changhua Meng, Xiaofeng Wu, Jie Yang, Wei Liu

ABSTRACT

Supervised fine-tuning of Model Context Protocol (MCP) agents is typically conducted on a static data distribution, which fails to adapt to the student's evolving capabilities and leaves newly exposed weaknesses insufficiently addressed. To address these challenges, we propose EvoMCP, an agent-data mutual evolution framework that enables MCP agents to improve through a closed loop of task evolution, trajectory evolution, and supervised fine-tuning. Specifically, EvoMCP assesses the student's established capabilities and capability gaps from rollout feedback to identify learning targets. Task evolution then translates these targets into executable tasks by adapting the instructions and observable environment states of compatible verified seed tasks while keeping their verifiers aligned. To provide reliable and efficient demonstrations for these tasks, trajectory evolution uses reusable skills to recover failed teacher rollouts and refine successful ones. The resulting task–trajectory pairs are used to fine-tune the student, while accepted tasks seed subsequent evolution. To close the loop, we re-evaluate the updated student and use its feedback to guide the next round of data evolution. Experiments on Toolathlon, MCPMark, and MCP-Atlas demonstrate consistent improvements over the initial student, yielding absolute gains of 16.5%, 10.2%, and 12.6%, respectively. Project page: https://github.com/xagao/EvoMCP.

1 INTRODUCTION

Large language model (LLM) agents handle multi-step workflows that involve finding suitable tools, invoking them with appropriate parameters, responding to tool failures, and combining their outputs into accurate, context-aware responses (Xu et al., 2025). Recent advances, including the Model Context Protocol (MCP), simplify tool integration through standardized interfaces, connecting LLMs to real-world environments and making it easier for agents to discover, invoke, and execute external tools (Xu et al., 2025; Wang et al., 2026). To develop these capabilities, models are trained on pre-collected trajectories using supervised fine-tuning (SFT) (Xu et al., 2025; He et al., 2026). An instance of this training data comprises a task–trajectory pair, where trajectories capture sequences of planning, tool calls, tool responses, and the final model response (Xu et al., 2025).

Existing MCP data pipelines synthesize tasks and tool-use trajectories for agent training (Xu et al., 2025; Wang et al., 2026; Lu et al., 2026; Xu et al., 2026). While synthetic data reduces reliance on human annotation, a fixed training corpus cannot adapt to the student's evolving capabilities, making it difficult to target specific weaknesses or support continual improvement (Yang et al., 2026). For MCP agents trained with SFT, adapting the training data requires executable tasks paired with reliable teacher demonstrations.

Constructing these task–trajectory pairs requires keeping the task instruction, environment, and verifier mutually consistent (Li et al., 2026b; Song et al., 2026). For example, an MCP agent cannot

∗^{*}Equal contribution. Contact: fangkuar@sjtu.edu.cn.

†^{\dagger}Corresponding author.

Figure

Figure 1: Self-evolving training in real MCP environments. (a) TOUCAN synthesizes tasks and filters teacher trajectories executed through real MCP tools for SFT (Xu et al., 2025). (b) EvoMCP uses student rollout feedback to assess capabilities and select learning targets and verified seed tasks. Task evolution adapts task instructions, environment states, or both while keeping verifiers aligned. Trajectory evolution uses reusable skills to recover failed teacher rollouts and refine successful demonstrations. Accepted demonstrations fine-tune the student, and accepted tasks supply seeds for later rounds.

detect declining quiz scores without access to current and historical records. The task instruction and verifier must also agree on which declines should be flagged. Once these tasks are validated, teacher rollouts provide demonstrations for student training. Training on these demonstrations resembles hard distillation in language model training, where a teacher model generates outputs and a student model learns to imitate them (He et al., 2026). A teacher may fail to complete an executable task. However, even successful teacher rollouts can contain incorrect or suboptimal actions (He et al., 2026). This underscores the need for more principled strategies to transform raw rollout trajectories into high-quality training data.

To address these challenges, we propose EvoMCP, an agent-data mutual evolution framework that enables MCP agents to improve through a closed loop of task evolution, trajectory evolution, and supervised fine-tuning. Our core idea is to use student rollout feedback to assess established capabilities and capability gaps, identify learning targets, and guide task evolution accordingly. We therefore evolve complete task–trajectory pairs, adapting compatible verified seed tasks to these targets and improving the teacher demonstrations used to train the student.

As shown in Figure 1, EvoMCP couples task evolution with trajectory evolution to adapt both training tasks and teacher demonstrations. Within task evolution, instruction evolution revises task goals or strengthens constraints. Environment evolution provides a complementary transformation by varying observable execution states, such as data values and object relations, while preserving the capability goal and MCP tool interfaces. These transformations can be used separately or together, with instructions, environments, and verifiers kept mutually consistent. To provide reliable and efficient supervision for these tasks, trajectory evolution uses reusable skills to recover failed teacher rollouts and refine successful ones. Together, these steps allow us to transform seed tasks and teacher rollouts into high-quality training data, enabling more reliable supervised fine-tuning of MCP agents.

After validating the resulting task–trajectory pairs, we use accepted demonstrations to fine-tune the student, and the corresponding tasks become seed tasks for subsequent evolution. The updated student is then re-evaluated to provide fresh feedback for selecting learning targets and compatible seeds in the next round. This closes the loop between data evolution and student learning, allowing the training distribution to adapt as the student's capabilities change. We evaluate EvoMCP on three representative benchmarks, Toolathlon (Li et al., 2026a), MCPMark (Wu et al., 2026), and MCP-Atlas (Bandi et al., 2026), using Qwen3.6-27B as the backbone. By continuously synthesizing new tasks from training-time feedback and refining teacher demonstrations, EvoMCP achieves absolute gains of 16.5%,

10.2%, and 12.6% over the initial student, respectively, demonstrating the effectiveness of agent-data mutual evolution across MCP environments. Our contributions can be summarized as follows:

  • We propose EvoMCP, an agent-data mutual evolution framework that alternates between student fine-tuning and the evolution of complete MCP task–trajectory pairs, reusing verified tasks as seeds across rounds.

  • Unlike static data synthesis, we incorporate student rollout feedback into learning-target selection and task evolution from verified seeds, and use reusable skills to recover failed teacher rollouts and refine successful demonstrations.

  • EvoMCP yields consistent gains over the initial student and static verified SFT across three MCP benchmarks, demonstrating its effectiveness in complex tool-use environments.