MCPybarra: A Multi-agent Framework for Low-Cost, High-Quality MCP Service Generation
摘要
Large Language Models (LLMs) increasingly depend on external tools and services for complex task execution, creating unprecedented demand for high-quality, reliable tool ecosystems. The Model Context Protocol (MCP) provides a standardized framework for LLM-tool integration, but its growth is severely constrained by prohibitive development costs and pervasive quality deficits in available services. We introduce MCPybarra, a novel multi-agent framework that automates the generation of high-quality MCP services from natural language requirements. Our approach employs three specialized agents—Code Generator, Quality Assurance Inspector, and Code Refiner—operating within a stateful workflow that implements continuous quality-driven iterative refinement. A comprehensive five-dimensional evaluation system provides objective quality assessment and guides automated improvement. Evaluation across 25 diverse MCP services demonstrates that MCPybarra-generated services surpass human-written counterparts in 72% of tasks, with particularly strong performance in non-functional dimensions such as Security and Robustness. The framework achieves this quality improvement at costs of $0.018-0.14 per service. Our work contributes both a novel quality-gated multi-agent paradigm for automated software engineering and a practical solution for scaling high-quality tool ecosystems essential for advanced LLM applications. The code, demo and technical supplementary materials are available at https://github.com/poutonwu/MCPybarra