🤖 AI Summary
Current large language models (LLMs) face three key bottlenecks in leveraging the rapidly expanding Model Context Protocol (MCP) ecosystem: limited server coverage, heavy reliance on manual maintenance, and scarcity of high-quality training data. To address these, we propose the first end-to-end automated web agent pipeline for large-scale MCP server discovery, automatic collection and cleaning of high-fidelity instruction–function-call pairs, task trajectory generation, and subsequent model fine-tuning. We construct the largest and most diverse MCP dataset to date—comprising 68,733 instruction–call pairs and 6,439 task trajectories—drawn from 1,166 MCP servers. Our approach integrates supervised fine-tuning with reinforcement learning to optimize tool-calling capabilities. Experiments demonstrate substantial improvements in LLM performance across tool selection, function generation, and multi-step agent tasks, significantly enhancing generalization and scalability of LLM-driven real-world tool utilization.
📝 Abstract
Large Language Models (LLMs) increasingly rely on external tools to perform complex, realistic tasks, yet their ability to utilize the rapidly expanding Model Contextual Protocol (MCP) ecosystem remains limited. Existing MCP research covers few servers, depends on costly manual curation, and lacks training support, hindering progress toward real-world deployment. To overcome these limitations, we introduce MCP-Flow, an automated web-agent-driven pipeline for large-scale server discovery, data synthesis, and model training. MCP-Flow collects and filters data from 1166 servers and 11536 tools, producing 68733 high-quality instruction-function call pairs and 6439 trajectories, far exceeding prior work in scale and diversity. Extensive experiments demonstrate MCP-Flow's effectiveness in driving superior MCP tool selection, function-call generation, and enhanced agentic task performance. MCP-Flow thus provides a scalable foundation for advancing LLM agents' proficiency in real-world MCP environments. MCP-Flow is publicly available at href{https://github.com/wwh0411/MCP-Flow}{https://github.com/wwh0411/MCP-Flow}.