Skip to main content
Glama
Estonian Transport MCP

Estonian Transport MCP

by a-rank

Estonian Transport MCP

An MCP server for Estonian public transport — timetables, trip planning, stop search, and real-time vehicle tracking.

Tools

Tool

Description

search_stops

Search for stops by name (e.g. "Viru", "Balti jaam")

get_departures

Get upcoming departures from a stop, with real-time predictions

plan_trip

Plan a trip between two coordinates with date/time options

nearby_stops

Find stops within a radius of a location

get_route

Get route details including all stop patterns

get_trip_stops

Get full schedule of a specific trip — all stops with arrival/departure times

tallinn_vehicles

Real-time GPS positions of Tallinn buses, trams, and trolleybuses

Related MCP server: Auckland Transport MCP Server

Prerequisites

This server runs via uvx, a zero-install Python package runner. Install uv first:

# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

# Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

# or via Homebrew
brew install uv

No other setup needed — uvx automatically downloads dependencies on first run.

Usage

Claude Code

Add to your MCP settings (.claude/settings.json or project-level .mcp.json):

{
  "mcpServers": {
    "estonian-transport": {
      "command": "uvx",
      "args": ["estonian-transport-mcp"]
    }
  }
}

Claude Desktop

Config file location:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add to the mcpServers section:

{
  "mcpServers": {
    "estonian-transport": {
      "command": "uvx",
      "args": ["estonian-transport-mcp"]
    }
  }
}

Note: Claude Desktop may not find uvx in its PATH. If the server fails to start, replace "uvx" with the full path. Find it by running which uvx in your terminal, then use that path:

{
  "mcpServers": {
    "estonian-transport": {
      "command": "/Users/yourname/.local/bin/uvx",
      "args": ["estonian-transport-mcp"]
    }
  }
}

Restart Claude Desktop after saving the config.

Remote server (HTTP)

Run as an HTTP server for remote access (e.g. from claude.ai/code on mobile):

estonian-transport-mcp --transport streamable-http --port 8000

Then connect to it from any MCP client using the URL http://your-server:8000/mcp.

Example deployment with systemd on a VPS:

[Unit]
Description=Estonian Transport MCP
After=network.target

[Service]
ExecStart=/home/user/.local/bin/estonian-transport-mcp --transport streamable-http --port 8000
Restart=always
User=user

[Install]
WantedBy=multi-user.target

Manual testing

# stdio mode (default)
uvx estonian-transport-mcp

# HTTP mode
uvx estonian-transport-mcp --transport streamable-http --port 8000

Test interactively with the MCP Inspector:

npx @modelcontextprotocol/inspector uvx estonian-transport-mcp

Data Sources & APIs

Peatus.ee — OpenTripPlanner GraphQL API

  • Endpoint: https://api.peatus.ee/routing/v1/routers/estonia/index/graphql

  • Protocol: GraphQL over HTTP POST

  • Authentication: None (open access)

  • Maintained by: Transpordiamet (Estonian Transport Administration)

  • Coverage: All Estonian public transport — buses, trams, trolleybuses, trains, and ferries nationwide

  • Data: Stop search, departure times, trip planning, route patterns, real-time arrival predictions

  • Based on: OpenTripPlanner with Digitransit

  • Underlying data: National GTFS feed consolidated from all Estonian transport operators

Used by tools: search_stops, get_departures, plan_trip, nearby_stops, get_route

Tallinn Transport — Real-Time Vehicle GPS

  • Endpoint: https://transport.tallinn.ee/gps.txt

  • Protocol: Plain-text CSV over HTTP GET

  • Authentication: None (open access)

  • Update frequency: ~10 seconds

  • Coverage: Tallinn city only — buses, trams, and trolleybuses operated by TLT (Tallinna Linnatransport)

  • Data: Vehicle type, line number, GPS coordinates (WGS84 microdegrees), heading, vehicle ID, destination

  • Format: Each line is one vehicle: type,line,lon,lat,,heading,vehicle_id,status,unknown,destination

    • Vehicle types: 1 = trolleybus, 2 = bus, 3 = tram

    • Coordinates: integer microdegrees (divide by 1,000,000 for decimal degrees)

    • Heading 999 = unknown

Used by tools: tallinn_vehicles

Tech Stack

  • Python with FastMCP (mcp[cli])

  • httpx for async HTTP requests

  • Transport: stdio (standard MCP transport for local integrations)

Available Tools

8 tools
get_departuresA

Get upcoming departures from a specific stop.

Args: stop_id: GTFS stop ID (e.g. '1:4173'). Use search_stops to find IDs. limit: Number of departures to return (default 15, max 50) date: Date to get departures for, YYYY-MM-DD (default: today) time: Time to get departures from, HH:MM (default: now)

Inputs: stop_id (required), date, time, limit. Returns: result

get_routeB

Get details about a transport route including its stops.

Args: route_id: GTFS route ID (e.g. '1:1'). Find these from stop search results.

Inputs: route_id (required). Returns: result

get_trip_stopsA

Get the full schedule of a specific trip — all stops with arrival/departure times.

Use this to trace a bus/tram/train along its route and see when it arrives at each stop. Trip IDs can be found in get_departures output.

Args: trip_id: GTFS trip ID (e.g. '1:155_20250329_1_1'). Found in get_departures results.

Inputs: trip_id (required). Returns: result

nearby_stopsB

Find public transport stops near a given location.

Args: lat: Latitude lon: Longitude radius: Search radius in meters (default 500, max 2000)

Inputs: lat (required), lon (required), radius. Returns: result

plan_tripA

Plan a public transport trip between two locations in Estonia.

Args: from_place: Origin — stop name (e.g. 'Viru', 'Balti jaam') or coordinates ('59.437,24.745') to_place: Destination — stop name or coordinates date: Travel date YYYY-MM-DD (default: today) time: Travel time HH:MM (default: now) arrive_by: If true, time is desired arrival time num_results: Number of itinerary options (default 3) max_walk_distance: Maximum walking distance in meters (default: ~2000) max_transfers: Maximum number of transfers (default: no limit) transfer_penalty: Penalty per transfer in seconds — higher values prefer fewer transfers (default: 0)

Inputs: to_place (required), from_place (required), date, time, +5 more. Returns: result

search_stopsB

Search for Estonian public transport stops by name.

Args: name: Stop name to search for (e.g. 'Viru', 'Balti jaam', 'Tartu')

Inputs: name (required). Returns: result

server_versionA

Return the version of this MCP server.

Inputs: no named parameters. Returns: result

tallinn_vehiclesA

Get real-time GPS positions of Tallinn public transport vehicles.

Args: vehicle_type: Filter by type: 'bus', 'tram', or 'trolleybus' (default: all) line: Filter by line/route number (e.g. '2', '17', '42A')

Inputs: line, vehicle_type. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 8 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes (stop search vs. departure lookup vs. trip planning). However, search_stops and nearby_stops both return stops, and get_departures and get_trip_stops both return schedule data, which could cause occasional confusion.

    Naming Consistency4/5

    Names consistently use snake_case and mostly follow a verb_noun pattern (search_stops, get_departures, plan_trip). Two tools (nearby_stops, tallinn_vehicles) and server_version use noun phrases, a minor deviation.

    Tool Count5/5

    8 tools is well within the ideal 3–15 range for a public transport data server. Each tool covers a distinct capability without redundancy.

    Completeness4/5

    The surface covers stop discovery, departures, trip planning, route/trip details, and real-time vehicles. Missing a direct route search/list tool and service alerts, but core workflows are achievable.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers