Skip to main content

poland-transit-mcp

An MCP server for getting around Polish cities: places, walking routes, timetables and door-to-door trip plans.
Built on OpenStreetMap and the operators' official GTFS timetables. Every answer names its sources and data dates.

Licence: MIT Python 3.11+ MCP server

plan_trip answering a trip in Gdańsk, in a terminal

What it does

  • Finds places: attractions, museums, parks, stations, stops, hotels and streets, by name or near a point.
  • Walks: routes along mapped streets and paths that never cross water except on a bridge.
  • Reads timetables: departures and lines from each operator's GTFS feed, live estimates in Gdańsk (opt-in).
  • Plans trips: up to 3 door-to-door options, leaving at or arriving by a time, also between cities by train or FlixBus.
  • Draws maps: a PNG of an area or of a planned trip.
  • Answers lean and typed: every tool declares its answer shape (outputSchema); detail: "full" adds what only code needs.

Cities and data

Cities Warszawa · Kraków · Katowice (GZM) · Wrocław · Poznań · Gdańsk · Lublin · Toruń · Zakopane
Between cities poland: trains of 13 rail operators and FlixBus coaches
Data one SQLite file per city, built by you from the official sources (not in git; no prebuilt download yet)

Quick start

Needs uv, osmium-tool and a Rust toolchain (macOS: brew install uv osmium-tool rust). No Rust? Leave out --extra fast: the built-in Python search gives the same answers, more slowly.

git clone https://github.com/alexratmanpl/poland-transit-mcp.git && cd poland-transit-mcp
uv sync --extra dev --extra fast                      # --extra fast: the optional Rust engine
uv run poland-transit-mcp build gdansk --download     # about 2 min; writes data/cities/gdansk.sqlite
uv run python scripts/smoke.py                        # expect: PASS
claude mcp add poland-transit -- "$PWD/.venv/bin/poland-transit-mcp" --cities gdansk --data-dir "$PWD/data/cities" --no-download

More cities, trips between cities, other MCP clients, memory, every flag and troubleshooting: AGENTS.md.

Tools

Tool Answers
list_cities cities and national layers, their features and timetable dates
find_places places by name or near a point
stops_near stops by walking time, with the lines serving each
departures the next departures from a stop; with to, only the runs that go on to another stop
line_info a line's stops, first and last run and frequency; on poland, a train
walk_route a walking route between two points
plan_trip door-to-door itineraries; with to_city, between cities
plan_stations trains and coaches between stations, for a caller that brings the traveller to a station
map_extract map geometry of an area, for code that draws its own map
render_map a map picture of an area or of a planned trip
credits the full credit and licence text of each data source

Arguments, declared answer fields, errors and answer sizes: docs/TOOLS.md.

Serving it to others? --http has no authentication, rate limit or time limit per call: put it behind a gateway or a buffering reverse proxy (SECURITY.md). Cutting a model client's token cost with "code mode": SECURITY.md.

Documentation

AGENTS.md from an empty machine to a working MCP server; code map, troubleshooting, flags
docs/TOOLS.md every tool: arguments, answer fields (outputSchema), lean-by-default rule, errors, sizes
docs/ENGINE.md the optional Rust engine: why, how fast, how to install
docs/INTERCITY.md trips between cities: how they are planned, measurements, limits
docs/SCALING.md what each city costs, memory budget, what runs on what hardware
docs/OBSERVABILITY.md opt-in OpenTelemetry traces and metrics
docs/CHECKS.md accuracy against operators' timetables, speed and memory measurements
docs/PUBLISHING.md releasing both packages to PyPI (one workflow, Trusted Publishing)
SECURITY.md what the server trusts, running it for others, reporting a vulnerability
docs/postmortems/ what went wrong, why our process let it through, what changed
SOURCES.md · DATA-LICENSE.md every feed with its credits · data licences and redistribution
DECISIONS.md · CONTRIBUTING.md · CHANGELOG.md design choices · contributing · releases

Licence and credits

Code: MIT. City files: ODbL 1.0 (© OpenStreetMap contributors) for the map, and each timetable keeps its publisher's terms; Zakopane's timetable and poland are not cleared for redistribution (DATA-LICENSE.md). Timetables from the cities' transport authorities, PKP PLK, Koleje Mazowieckie and FlixBus; GTFS conversions by Mikołaj Kuranowski (full credits).

Metadata

Release files for poland-transit-mcp 0.5.7

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

Source distribution (sdist)

Source distribution for poland-transit-mcp 0.5.7
File Size Uploaded Provenance Actions
poland_transit_mcp-0.5.7.tar.gz 514.6 kB With provenance Details for poland_transit_mcp-0.5.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for poland-transit-mcp 0.5.7
File Interpreter ABI Platform Actions
poland_transit_mcp-0.5.7-py3-none-any.whl Python 3 none any Details for poland_transit_mcp-0.5.7-py3-none-any.whl

Total release size: 664.2 kB

Release files / poland_transit_mcp-0.5.7.tar.gz

Download URL poland_transit_mcp-0.5.7.tar.gz
Size 514.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b8a163437c11ba08aeae1da925dc0339dcddb2ca92a187a96515cb7d696570f5
BLAKE2b-256 checksum
How to use checksums
b915e1ad05678e8f74fa7274ddea9ff8654cc8df80c7021e6cfc95fbe698e857
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Release files / poland_transit_mcp-0.5.7-py3-none-any.whl

Download URL poland_transit_mcp-0.5.7-py3-none-any.whl
Size 149.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0d956deafbc3fe7454d470679e73fb9301de83b0dad1abf664b7ba0ad2ea3c2b
BLAKE2b-256 checksum
How to use checksums
e3ecf8b76e9ee16e54a6873bb5685df390a6f12b357d4dcf7936218452748a75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Security for poland-transit-mcp 0.5.7

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for poland_transit_mcp-0.5.7.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

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.

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