
AgentSUMO
io.github.mw-jeongPublished by GitHub account mw-jeongv0.1.2Updated Oct 24, 2026
MCP server for LLM-driven SUMO traffic simulation, scenario design, and result analysis.
Overview
AgentSUMO lets an assistant build, run and analyze SUMO traffic simulations from natural-language policy questions, from OSM network creation to reports.
- What you can do
- Build baseline simulations: extract OSM data, convert networks, generate trips and routes, and run SUMO simulations (Scenario Generation). Apply policy interventions such as edge edits, lane reductions, demand and flow changes, and traffic-signal offset or adaptation (Policy Experimentation). Convert SUMO XML output to SQLite and render HTML simulation reports (Result Analysis). Visualize networks, highlighted edges, policy targets and per-edge metric heatmaps (Visualization). Inspect network statistics, analyze routes, resolve road names to edge IDs, validate origin-destination coordinates and run web-search grounding (Utility Functions).
- When to use it
- Useful when you want to explore traffic-policy questions, such as road closures, lane reductions, signal optimization or demand changes, as runnable SUMO scenarios and compare results across runs without hand-writing SUMO configuration files.
- Requirements
- Local Python 3.10+ process, runnable via uvx or pip install; a local SUMO 1.24+ installation with SUMO_HOME pointing at a directory containing bin/, share/ and tools/. The optional AGENTSUMO_MCP_OUTPUT_BASE sets where outputs are written (defaults to the working directory). The full AgentSUMO framework additionally needs an Anthropic Claude API key and a Mapbox token for its web map.
Installation
In SourceWeft
- Open AgentSUMO in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
AgentSUMO
An Agentic Framework for Interactive Simulation Scenario Generation in SUMO via Large Language Models
[PyPI] [tests] [arXiv] [Docs] [License: MIT] [Python 3.10+] [MCP Registry]
[AgentSUMO overview]Documentation · Installation · Tools · Schema · Tutorials
Overview
AgentSUMO lets non-expert stakeholders design, execute, and analyze SUMO traffic simulations through natural-language interaction. The Planner Agent translates abstract policy questions into executable simulation plans, drives them via the Model Context Protocol (MCP), and surfaces results through a web dashboard.
- Conversational scenario design — describe a policy question, get a runnable simulation
- Policy experiments — road closures, lane reductions, signal optimization, demand changes
- Cross-scenario analysis — SQL-based comparison across runs, with auto-generated HTML reports
- Web dashboard — geospatial visualization, time-series charts, and trip replay
Demo
Web interface: conversational planning panel, scenario list, and live simulation status.
Geospatial visualization: per-edge metrics, congestion overlays, and trip replay on the 2.5D basemap.
Architecture
The reasoning layer (Planner Agent) lives in this repository. The execution layer (agentsumo-mcp) is published to PyPI and installed automatically as a dependency.
Tool Layer
The AgentSUMO MCP Server exposes 26 tools grouped into five capability categories that follow the simulation workflow. Full reference at agentsumo.readthedocs.io/.../tools.
Installation
Requirements
- Python 3.10 or later
- SUMO 1.24 or later (locally installed, with
SUMO_HOMEset) - Anthropic Claude API key (bring-your-own-key)
- Mapbox access token (used by the web map renderer)
1. Install SUMO
macOS
Or download the installer from the Eclipse SUMO downloads page.
Windows — Download the installer from the Eclipse SUMO downloads page.
Linux (Ubuntu/Debian)
2. Set up the Python environment
Install uv:
Clone the repository, create a virtual environment, and install AgentSUMO:
3. Configure environment variables
AgentSUMO reads API keys and the SUMO path from environment variables. The easiest way is a .env file at the project root:
Open .env in your editor and fill in:
ANTHROPIC_API_KEY (required) — Claude API key that drives the Planner Agent. Get one at the Anthropic Console.
MAPBOX_TOKEN (required for the web UI) — used to render the basemap. Get one at the Mapbox access tokens page.
SUMO_HOME (required) — absolute path to your local SUMO installation. The directory must contain bin/sumo (or bin/sumo.exe on Windows).
AGENTSUMO_MCP_OUTPUT_BASE (optional) — override the base directory where the MCP server writes simulation outputs (networks, trips, results). Defaults to the current working directory.
4. Run
Project Structure
Use the MCP Server Standalone
The AgentSUMO MCP Server can be used independently from this framework with any MCP-compatible LLM client (Claude Desktop, OpenAI tool clients, Gemini, local LLMs):
Or via uvx without installing:
The server is registered in the official MCP Registry under io.github.mw-jeong/agentsumo-mcp.
Troubleshooting
SUMO path error — Verify SUMO_HOME in your .env. The directory must contain bin/sumo (or bin/sumo.exe on Windows).
API key error — Verify ANTHROPIC_API_KEY in your .env is set to a valid Claude API key. The Planner Agent will refuse to start without it.
Dependency error — Re-resolve dependencies:
Legacy token files (deprecated, scheduled for removal in 0.2.0) — AgentSUMO still falls back to claude_api.txt and mapbox_token.txt at the project root when the corresponding environment variables are missing, but those code paths now emit a DeprecationWarning at import time. Use the .env workflow for new installations.
Documentation
Full documentation lives at agentsumo.readthedocs.io.
- Installation — SUMO, Python 3.10+, environment setup
- Tools — reference for all MCP tools
- Schema —
simulations.dbER diagram and column reference - Tutorials — walkthroughs of the paper case studies
Citation
If you use AgentSUMO in academic work, please cite:
License
MIT. See LICENSE.
Developed at
Source: README.md at commit 2ad1d91
Tools
0Version history
1- v0.1.2LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts