Metadata-Version: 2.4
Name: agentsumo-mcp
Version: 0.1.0
Summary: MCP server for SUMO traffic simulation: orchestrate networks, trips, simulations, and analysis from LLM agents.
Author: Minwoo Jeong, Jeeyun Chang, Yoonjin Yoon
License: MIT License
        
        Copyright (c) 2026 Minwoo Jeong, Jeeyun Chang, Yoonjin Yoon
                          KAIST Graduate School of Data Science
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in
        all copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/mw-jeong/AgentSUMO
Project-URL: Documentation, https://agentsumo.readthedocs.io
Project-URL: Repository, https://github.com/mw-jeong/AgentSUMO
Project-URL: Issues, https://github.com/mw-jeong/AgentSUMO/issues
Keywords: mcp,sumo,traffic-simulation,llm,agent,anthropic
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: GIS
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: mcp[cli]>=1.13.1
Requires-Dist: sumolib>=1.24.0
Requires-Dist: geopy>=2.4.1
Requires-Dist: geopandas<0.15.0,>=0.14.3
Requires-Dist: pandas>=2.3.2
Requires-Dist: shapely>=2.1.1
Requires-Dist: pyproj>=3.6.0
Requires-Dist: lxml>=5.0.0
Requires-Dist: ddgs>=9.0.0
Dynamic: license-file

<!-- mcp-name: io.github.mw-jeong/agentsumo-mcp -->

# agentsumo-mcp

[![PyPI](https://img.shields.io/pypi/v/agentsumo-mcp.svg)](https://pypi.org/project/agentsumo-mcp/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)

MCP server for [SUMO](https://www.eclipse.org/sumo/) (Simulation of Urban MObility) traffic simulation. Orchestrate network extraction, trip generation, scenario customization, simulation runs, and SQL-based result analysis from any MCP-compatible LLM client.

## Features

- **Pipeline tools**: OSM extraction -> network conversion -> trip generation -> route generation -> simulation
- **Scenario customization**: edge editing, lane reduction, speed limit changes, vehicle generation, traffic-light timing
- **Result analysis**: ingest tripinfo / edgedata / summary XML into SQLite for natural-language SQL queries
- **Visualization**: network plots, edge data heatmaps, policy-target visualizations
- **Geocoding**: place name -> coordinate -> nearest edge resolution

## Requirements

- Python 3.10 or later
- [SUMO](https://eclipse.dev/sumo/) installed locally (`SUMO_HOME` environment variable set)

## Installation

```bash
pip install agentsumo-mcp
```

Or run without installing via [`uvx`](https://docs.astral.sh/uv/guides/tools/):

```bash
uvx agentsumo-mcp
```

## Configuration

Set `SUMO_HOME` to point at your local SUMO installation:

```bash
export SUMO_HOME=/path/to/sumo
```

On macOS with the official SUMO installer this is usually `/Library/Frameworks/EclipseSUMO.framework/Versions/<version>/EclipseSUMO`.

## Usage with Claude Desktop

Add to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "agentsumo": {
      "command": "uvx",
      "args": ["agentsumo-mcp"],
      "env": {
        "SUMO_HOME": "/path/to/sumo"
      }
    }
  }
}
```

## Usage with other MCP clients

Any MCP client that supports stdio transport works:

```bash
agentsumo-mcp
```

## Tools

The server exposes ~25 tools across five categories:

| Category | Examples |
|----------|----------|
| Network | `osm_extract`, `net_convert`, `network_summary_tool` |
| Trips & routes | `trip_generate`, `route_generate`, `vehicle_generation_tool`, `flow_generation_tool` |
| Customization | `edge_edit_tool`, `reduce_lanes_tool`, `speed_limit_edit_tool`, `tls_offset_tool`, `tls_adaptation_tool` |
| Simulation | `sumo_runner` |
| Analysis | `xml_to_sqlite_tool`, `simulation_report_tool`, `route_analysis_tool`, `analyze_road_details_tool` |
| Visualization | `visualize_net_tool`, `visualize_edge_tool`, `visualize_edgedata_tool` |

Each tool returns structured JSON suitable for downstream LLM reasoning.

## Citation

If you use AgentSUMO in academic work, please cite:

```bibtex
@software{agentsumo2026,
  author = {Jeong, Minwoo and Chang, Jeeyun and Yoon, Yoonjin},
  title  = {AgentSUMO: an MCP-based agentic framework for SUMO traffic simulation},
  year   = {2026},
  url    = {https://github.com/mw-jeong/AgentSUMO}
}
```

## License

MIT. See [LICENSE](LICENSE).
