Metadata-Version: 2.4
Name: mcp-mvg
Version: 0.1.0
Summary: MCP Server for Munich MVG transit API - Query U-Bahn, S-Bahn, Tram, Bus departures
Project-URL: Homepage, https://github.com/your-username/mcp-mvg
Project-URL: Repository, https://github.com/your-username/mcp-mvg
Project-URL: Documentation, https://github.com/your-username/mcp-mvg#readme
Project-URL: Issues, https://github.com/your-username/mcp-mvg/issues
Author: MCP MVG Contributors
License: MIT
Keywords: mcp,model-context-protocol,munich,mvg,public-transport,sbahn,tram,transit,ubahn
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
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: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27.0
Requires-Dist: mcp>=1.0.0
Description-Content-Type: text/markdown

# 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)

```bash
# Install globally with uvx
uvx mcp-mvg

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

### Option 2: Install from GitHub

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

### Option 3: Local Development

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

## MCP Client Configuration

### For installed package (PyPI):

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

### From GitHub:

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

### With custom API Key:

```json
{
  "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:

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

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

## License

MIT
