Skip to main content

MCP MVG - Munich Transit MCP Server 🚇

An MCP (Model Context Protocol) server that provides access to Munich's MVG (Münchner Verkehrsgesellschaft) public transit API.

Features

  • 🔍 Search stations - Find U-Bahn, S-Bahn, Tram, and Bus stops by name
  • 🚇 Real-time departures - Get upcoming departures from any station
  • 🗺️ Nearby stops - Find transit stops near GPS coordinates
  • 📋 Line information - Browse all MVG transit lines
  • 🚌 Transport modes - Learn about Munich's transit types

Quick Start

Option 1: Install from PyPI (Recommended)

# Install globally with uvx
uvx mcp-mvg

# Or with pip
pip install mcp-mvg
mcp-mvg

Option 2: Install from GitHub

# Run directly from GitHub with uvx
uvx --from git+https://github.com/your-username/mcp-mvg.git mcp-mvg

Option 3: Local Development

git clone https://github.com/your-username/mcp-mvg.git
cd mcp-mvg
uvx --from . mcp-mvg

MCP Client Configuration

For installed package (PyPI):

{
  "mcpServers": {
    "mvg-transit": {
      "command": "uvx",
      "args": ["mcp-mvg"]
    }
  }
}

From GitHub:

{
  "mcpServers": {
    "mvg-transit": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/your-username/mcp-mvg.git", "mcp-mvg"]
    }
  }
}

With custom API Key:

{
  "mcpServers": {
    "mvg-transit": {
      "command": "uvx",
      "args": ["mcp-mvg"],
      "env": {
        "MVG_API_KEY": "your-custom-mvg-api-key"
      }
    }
  }
}

Environment Variables

Variable Description Default
MVG_API_KEY MVG API Authorization key Uses default public key

Available Tools

Tool Description Example
search_stations Search for stations by name search_stations("Marienplatz")
get_departures Get real-time departures from a station get_departures(global_id, limit=5)
get_lines List all MVG transit lines get_lines()
find_nearby_stops Find stops near GPS coordinates find_nearby_stops(48.1372, 11.5755)
get_transport_modes Get info about transit types get_transport_modes()

Example Queries

  • "What trains are departing from Marienplatz?"
  • "Find the nearest U-Bahn station"
  • "Show me all tram lines in Munich"
  • "What's at Hauptbahnhof right now?"

Publishing to PyPI

If you want to publish your own version:

# 1. Build the package
pip install build
python -m build

# 2. Upload to PyPI
pip install twine
twine upload dist/*

License

MIT

Metadata

Release files for mcp-mvg 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-mvg 0.1.0
File Size Uploaded Provenance
mcp_mvg-0.1.0.tar.gz 6.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-mvg 0.1.0
File Interpreter ABI Platform
mcp_mvg-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.6 kB

Release files / mcp_mvg-0.1.0.tar.gz

Download URL mcp_mvg-0.1.0.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
0b87bc088e2b284accabc2d33b1db177d7eaf290bf6c45f2824deb16f5f5afe3
BLAKE2b-256 checksum
How to use checksums
39a2e303af7b98982b0af2a6c3c1fef1b2d3b38ebd5a55c32111d435f025561b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / mcp_mvg-0.1.0-py3-none-any.whl

Download URL mcp_mvg-0.1.0-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5862d14830f1aa12f4055564eb1fd54c3143497b83716b569246bd1330cf753c
BLAKE2b-256 checksum
How to use checksums
15c497499c019711b74a05a3ce86018f2ed710ebf776a92f301d32b05f300e28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Security for mcp-mvg 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page