Introduction
Microscopic traffic simulation is a cornerstone of modern urban planning and autonomous driving research. SUMO (Simulation of Urban Mobility) stands as the industry standard, yet it remains notoriously difficult for non-experts to master. The platform requires deep expertise in complex interfaces like TraCI (Traffic Control Interface) and involves fragmented, manual workflows—from downloading map data and generating vehicle demand to configuring signal timings and analyzing multi-dimensional results.
Previous attempts to bridge Large Language Models (LLMs) with SUMO often resulted in "rigid" systems. These implementations relied on pre-programmed scripts where the LLM acted merely as a parameter-filler. Such systems lacked flexibility; any deviation from a fixed workflow or the addition of new tools would cause the system to fail. Furthermore, these models frequently suffered from "tool overload," where providing an LLM with too many functions simultaneously led to confusion, hallucinations, and execution errors.
The SUMO-MCP Framework
To address these challenges, the authors introduce SUMO-MCP, an agent-driven framework built upon Anthropic’s Model Context Protocol (MCP). This architecture transforms the complex SUMO ecosystem into a "chat-ready" platform where LLM agents can dynamically discover and orchestrate simulation tools through natural language.
Key technical components of the framework include:
- MCP-Compatible Tool Suite: Core SUMO command-line utilities (e.g.,
netconvert,randomTrips) and custom auxiliary utilities for map acquisition and metric calculation are wrapped into a standardized server-client architecture. - Dynamic Import Mechanism: To maintain agent focus, SUMO-MCP utilizes a "Base Module" that only imports specific sub-modules (Network, Route, or Signal Control) upon explicit request. This keeps the agent's context window clean and reduces errors.
- Agentic Workflow: Upon receiving a prompt, the LLM agent performs intent analysis, queries the server for available tools, and orchestrates an execution loop that includes autonomous error handling and retries.
- Predefined Workflows: The system includes optimized pipelines for "Simulation Generation & Evaluation" and "Signal Control Optimization" to guide users through end-to-end studies.
Experimental Evaluation
The system was evaluated using real-world geographical data from OpenStreetMap (OSM) across major urban centers, including Beijing (Haidian, Chaoyang), Shanghai (Pudong), and Shenzhen (Guangming). Additionally, a synthetic 5×5 "Xiong’an Network" grid was used to benchmark signal control optimization. Traffic demand was modeled using both random patterns and Origin-Destination (OD) matrices.
Key Results and Insights
SUMO-MCP demonstrates that discovery is superior to hard-coding. By viewing the SUMO ecosystem as a searchable catalog, the agent can recombine tools in novel ways to satisfy unique user requests without manual script updates.
- Efficiency Gains: In comparative tests across five regions, the MCP-based approach was 30% faster on average than direct command-line scripting (74s vs. 106s) and required 60% fewer tool calls (5.0 vs. 12.6).
- Optimization Performance: The automated signal optimization tool reduced average vehicle delay by 6.86% network-wide, with critical intersections seeing queue time reductions of up to 21.45%.
- Robustness: Ablation studies confirmed that the "Dynamic Import" feature is essential; without it, agents frequently failed due to tool overload and repeated execution errors.
Conclusion and Future Work
SUMO-MCP successfully closes the loop in traffic engineering by allowing an agent to run simulations, identify congestion hotspots, and automatically trigger optimization routines. While effective, the authors identify areas for improvement, including more native file management via MCP "Resources" and exploring multi-agent coordination for large-scale urban simulations. Future development will also focus on a dedicated interactive frontend to further lower the barrier to entry for traffic experiment design.
Summary updated