
routemate
io.github.AlexanderTar/routemate
London journey options with live and planned disruption, lift and step-free issues on each leg.
Documentation
RouteMate
An MCP server that gives AI assistants London journey options with the known issues on every leg, for now or for a later date.
RouteMate uses TfL open data; not affiliated with or endorsed by Transport for London.
What it does
Ask your assistant things like "I need to be at Canary Wharf by 09:25 next Thursday" or "get me to Heathrow with as little walking as possible".
- Several routes, side by side: rail, bus, walking, and mixed options, so your assistant can weigh speed against changes and walking.
- Issues on each leg: delays and closures, planned works, bus diversions, lift faults, road works, and crowding.
- Step-free travel: step-free routes when you ask for them, and station access with every lift out of service.
- Plan ahead: arrive by, or leave at, a time days ahead, to fit what is in your calendar.
Use the hosted connector, or run it yourself with your own TfL key.
Hosted connector
Add a custom connector (also called a remote MCP server) in your assistant with this URL:
https://routemate.city/mcp
Sign in with Apple, Google, or an email link, choose a plan, and allow access. It costs £1.99 a month or £19.99 a year, VAT included. Clients that cannot sign in can send a personal API key from your account page. Running RouteMate yourself is free and never gated.
Tools
All tools only read.
| Tool | What it does |
|---|---|
plan_journey | Route options between two places, now, by a given time, or leaving at one, with the issues on each leg |
check_route | Re-checks a planned route shortly before leaving |
find_places | Finds stations, stops, postcodes, addresses, and bike hire docks |
get_departures | Next live departures at a stop or station |
get_line_status | Line status now or for later dates, and network notices |
get_station_access | Step-free access, lift faults, and crowding at one station |
Self-host
You need Go 1.27.1 or later and your own API key from the TfL API portal.
git clone https://github.com/AlexanderTar/routemate-mcp
cd routemate-mcp
go build -o routemate ./cmd/routemate
The server reads the key from the TFL_APP_KEY environment variable and sends it only as a request header.
Claude Desktop
Add this to claude_desktop_config.json (Settings, Developer, Edit Config), with the full path to the binary you built, then restart Claude Desktop:
{
"mcpServers": {
"routemate": {
"command": "/path/to/routemate",
"args": ["serve", "--stdio"],
"env": { "TFL_APP_KEY": "your-key" }
}
}
}
Claude Code
claude mcp add --env TFL_APP_KEY=your-key --transport stdio routemate -- /path/to/routemate serve --stdio
Codex
codex mcp add routemate --env TFL_APP_KEY=your-key -- /path/to/routemate serve --stdio
Other clients that start local servers
Run /path/to/routemate serve --stdio with TFL_APP_KEY in its environment.
ChatGPT and other clients that need a URL
ChatGPT cannot start a program on your computer. Its Secure MCP Tunnel connects it to a server on your machine without putting that server on the public internet: point the tunnel at routemate serve --stdio, or at the HTTP server below, then add it in ChatGPT as a custom MCP server.
To serve streamable HTTP instead:
TFL_APP_KEY=your-key ./routemate serve --http # http://127.0.0.1:8080/mcp
Use --addr to listen elsewhere. Before you expose this to other machines, know that:
--httphas no sign-in. Anyone who can reach it can use your key and your quota.- A request arriving over loopback is refused unless its
Hostheader names localhost or a loopback address, so a forwarding service on the same machine has to sendHost: localhost. - Requests from other websites in a browser are refused.
Privacy
The privacy policy covers the hosted service. In short:
- It keeps your sign-in email, your plan, and the apps and API keys you connect. It runs no analytics and no advertising.
- The places and times you ask about go to TfL to be answered. Planned routes stay in server memory for up to 2 hours so your assistant can re-check them, and are never written to disk or logs.
- Keys, tokens, places, and coordinates are removed from the request log.
- Stripe handles payments, so the server never sees your card.
- You can delete your account at any time.
Self-hosted
A self-hosted server writes no record of your journeys or preferences; your assistant sends the preferences on each call. The places and times you ask about go to TfL to plan the journey. Planned routes stay in server memory for up to 2 hours so your assistant can re-check them: the lines, stations, stops, and times of each option. A start or end at a station or stop is kept as that stop, while a home address, postcode, or coordinates are not. They are never written to disk or logs. It writes one file, a key for signing route tokens, at routemate/route.key in your user config directory (or set ROUTEMATE_TOKEN_KEY, at least 32 bytes). If you run the server yourself, the project receives nothing from it.
Development
go test ./... # recorded data, no network
go test -tags live -count=1 ./... # real API, needs TFL_APP_KEY
eval/ measures how well a language model uses the tools: it plays fixed tasks over recorded data and scores what the model chose. See docs/eval for results.
To run the hosted server yourself, see docs/deploy-railway.md and docs/sign-in.md.
Contributing
Read CONTRIBUTING.md and the Code of Conduct. CHANGELOG.md lists what changed. Report a security problem as SECURITY.md says, not in an issue.
Attribution
Powered by TfL Open Data. Contains OS data © Crown copyright and database rights 2016 and Geomni UK Map data © and database rights [2019].
Answers with National Rail legs also use National Rail data from National Rail Enquiries.
RouteMate uses TfL open data; not affiliated with or endorsed by Transport for London.
Licence
Apache-2.0. See LICENSE and NOTICE. The fonts and the Apple logo artwork the hosted pages use, and the recorded TfL data in the tests, are under their own terms, listed there.
No installation packages available.