Skip to main content
Glama
README.md
# RMV MCP Server

A simple MCP (Model Context Protocol) server with two functions to call RMV APIs for information about nearby stations and departure boards.

## Setup

1.  **Install dependencies and create a virtual environment:**

    This project uses `uv`, an extremely fast Python package installer and resolver which creates and manages virtual environments (like `venv`). If you don't have it, see the official uv documentation to install it.

    ```bash
    uv init
    ```
    By using uv, there is no need to explicetily create a venv and install requirements. All information about the
    uv project is in the file pyproject.toml. Consequently, there is no requirements.txt in this repo.

2.  **Configure your RMV Access ID:**

    -   Create a `.env` file in the project root.
    -   Add your RMV `ACCESS_ID` to it:
        ```
        ACCESS_ID="your-rmv-api-access-id"
        ```
    -   You can get an `ACCESS_ID` from the [RMV open data platform](https://www.rmv.de/c/de/fahrplan/api-service/api-key-bestellen).

## Usage

1.  **Integrate the MCP server to Gemini CLI**
    
    Go and find the file .gemini/settings.json in your home directory.
    Add the following block:


    ```bash
    "mcpServers": {
      "rmvServer": {
      "command": "uv",
      "args": [
        "run",
        "--project",
        "/YOURPATH/rmv_mcp/",
        "/YOURPATH/rmv_mcp/rmv_server.py"
      ]
    }
  },

    ```

## Gemini CLI

In Gemini CLI check with /mcp the new MCP server:

```bash
rmvServer - Ready (2 tools)
    Tools:
    - get_departureboard
    - get_nearbystations
```