muc
MCP Server for MUC Public Transport
claude mcp add --transport stdio anisul-muc-mcp-server gradle run
How to use
This MCP server provides real-time Munich public transport information by interfacing with the MVG API. It exposes tools to fetch live departures, search for stations, retrieve detailed station information, and list all stations within the Munich transport network. You can query departures by a location or a specific station, look up station details by ID, and obtain the complete list of stations. Use-case examples include asking for the next departures near Marienplatz, finding stations in Munich, or getting metadata for a particular station.
Available tools include: mvg_get_departures, which returns departures for a queried location (with limit and offset options); mvg_get_departures_from_station, which returns departures from a specified station by its stationId; mvg_get_stations, which retrieves all stations; and mvg_get_station, which fetches detailed information about a single station by its stationId. These tools enable AI assistants to provide accurate, context-aware public transport information and planning support for Munich riders.
How to install
Prerequisites:
- Java 21 or higher
- Gradle build system
- Git
Setup and run steps:
- Clone the repository:
git clone [your-repository-url]
cd [repository-name]
- Build the project:
gradle build
- Run the MCP server:
gradle run
Note: Ensure you have network access to MVG services and any required MVG API credentials or keys configured as part of the environment if the project requires them (not shown in the README). If you need to customize the port or environment, adjust Gradle run configurations or environment variables as needed.
Additional notes
Notes and tips:
- This server relies on the MVG public API. Review MVG terms of service to ensure compliance, especially for commercial usage.
- If you deploy behind a firewall or proxy, ensure outbound HTTP(S) access to MVG endpoints.
- The Claude Desktop integration example in the README shows how to connect via a JSON config; adapt the path to the actual jar built by Gradle if packaged differently.
- If you encounter port conflicts, you can customize the run configuration in Gradle or pass environment variables to select an alternative port.
- When diagnosing issues, check logs produced by the Gradle run task for MVG API communication details and possible rate limits.