TfL MCP Server
Provides tools for accessing real-time Transport for London data via the TfL Unified API, including line status, station details, train arrivals, journey planning, bus arrivals and routes, fare estimates, disruptions, planned works, station search, and nearby stations.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@TfL MCP Server Is the Elizabeth line running right now?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🚇 TfL MCP Server
A Model Context Protocol (MCP) server that gives Claude AI real-time access to Transport for London (TfL) data. Ask Claude about tube status, plan journeys, check arrivals, and more — all through natural language.
🎥 Demo
Ask Claude things like:
"Is the Elizabeth line running?"
"How do I get from Seven Kings to Canary Wharf?"
"Any disruptions on TfL today?"
"When is the next bus at stop 55354?"
"How much is a journey from Seven Kings to Liverpool Street?"
Related MCP server: TFL MCP Server for Poke
🛠 Tools Available
Tool | Description |
| Status of a specific TfL line |
| Status of ALL TfL lines at once |
| Station details (zone, modes, ID) |
| Next train arrivals at a station |
| Full journey plan between two locations |
| Fastest journey time between two locations |
| Next buses at a bus stop |
| Full route of a bus |
| Journey fare estimate |
| Search for a station by name |
| Stations near a postcode |
| Current network disruptions |
| Upcoming engineering works |
🚀 Getting Started
Prerequisites
Node.js 18+
Claude Desktop
Installation
Clone the repository:
git clone https://github.com/Rumaisa10/tfl-mcp.git
cd tfl-mcpInstall dependencies:
npm installBuild:
npm run buildAdd to Claude Desktop config:
Find your config file:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonMac:
~/Library/Application Support/Claude/claude_desktop_config.json
Add the following:
{
"mcpServers": {
"tfl-mcp": {
"command": "node",
"args": ["/full/path/to/tfl-mcp/build/index.js"]
}
}
}Restart Claude Desktop
Ask Claude anything about TfL! 🚇
📁 Project Structure
tfl-mcp/ ├── src/ │ ├── index.ts ← MCP server entry point │ ├── tools.ts ← Tool definitions │ ├── handlers.ts ← Tool logic │ └── tfl/ │ ├── client.ts ← TfL API base fetch helper │ ├── lines.ts ← Line status functions │ ├── stations.ts ← Station functions │ ├── journey.ts ← Journey planning │ ├── bus.ts ← Bus functions │ ├── fares.ts ← Fare functions │ └── disruptions.ts← Disruption functions ├── build/ ← Compiled JavaScript ├── package.json └── tsconfig.json
🔑 API Key
This server uses the TfL Unified API which works without an API key for up to 50 requests/minute. For higher rate limits, register at api.tfl.gov.uk and add your credentials as query parameters in src/tfl/client.ts.
🌐 Supported Lines
elizabeth → Elizabeth line central → Central line jubilee → Jubilee line northern → Northern line victoria → Victoria line dlr → DLR overground → London Overground bakerloo → Bakerloo line piccadilly → Piccadilly line district → District line circle → Circle line hammersmith → Hammersmith & City line metropolitan → Metropolitan line
🤝 Contributing
Pull requests welcome! Feel free to add more TfL tools or improve existing ones.
📄 License
MIT
👩💻 Built by
Romysa Sultana — Frontend Developer based in London
Available Tools
13 toolsget_all_lines_statusC
Get the current status of ALL TfL lines at once
Inputs: no named parameters.
get_arrivalsA
Get next train arrivals at a station. NOTE: First call get_station_info to get the stationId, then pass that ID here. Do not pass the station name directly.
Inputs: stationId (required), line.
get_bus_arrivalsC
Get next bus arrivals at a bus stop
Inputs: stopCode (required).
get_bus_routeC
Get the full route of a bus
Inputs: busNumber (required).
get_disruptionsB
Get all current disruptions on the TfL network
Inputs: no named parameters.
get_fareC
Get the fare for a journey between two locations
Inputs: to (required), from (required).
get_journey_timeC
Get the fastest journey time between two locations
Inputs: to (required), from (required).
get_line_statusB
Get the current status of a specific TfL line (tube, DLR, Elizabeth line etc)
Inputs: line (required).
get_nearby_stationsC
Find TfL stations near a postcode
Inputs: postcode (required).
get_planned_worksB
Get upcoming planned engineering works on TfL lines
Inputs: no named parameters.
get_station_infoA
Get information about a station including zone and transport modes
Inputs: station (required).
plan_journeyB
Plan a journey between two locations using TfL
Inputs: to (required), from (required), time.
search_stationC
Search for a station by name
Inputs: query (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Most tools have clearly distinct purposes (line status vs all-line status, bus arrivals vs train arrivals, nearby vs search vs station info). However, get_disruptions, get_planned_works, and get_line_status have some conceptual overlap around service conditions, and search_station vs get_station_info could be confused when resolving station identifiers.
All tool names follow a consistent verb_noun or verb_noun_qualifier pattern using snake_case, such as get_line_status, get_bus_arrivals, plan_journey, and search_station. There are no mixed conventions or vague standalone verbs.
13 tools is well-scoped for a TfL transport server, covering lines, stations, arrivals, journeys, fares, buses, and disruptions without excessive sprawl. Each tool appears to earn its place.
The surface covers the core read-only TfL workflows: status, disruptions, planned works, station search/info, arrivals, journey planning, fares, and buses. Minor gaps exist, such as detailed line route/stop listings and potential ambiguity around how to obtain station IDs for arrivals, but agents can likely work around them.
Maintenance
Related MCP Connectors
Connect Claude to your Platform7n workspaces: chat, links, work and decks. One-click OAuth.
Connect Claude to your Platform7n workspaces: chat, links, work and decks. One-click OAuth.
UK business phone for Claude and ChatGPT: calls, transcripts, AI summaries, contacts, messages.
tri-train is a training platform for triathletes that syncs activities from Strava and Garmin and exposes them to Claude through a remote MCP server. Ask Claude how your last block went, why your run pace dropped, or whether you are fresh enough for Sunday's race, and it answers from your real data: activities with laps and grade-adjusted pace, weekly load and the performance management chart (CTL/ATL/TSB), sleep, HRV and resting heart rate, and your race calendar with predictions. Claude can also act: create and adjust planned workouts with structured intervals, push them to your Garmin watch, add races and write notes. Every change is journaled and can be undone. Read and write access are separate OAuth scopes, and the server enforces them on every call. Built and hosted in Switzerland by a triathlete; data stays on our own servers (Swiss revDSG / GDPR).
Related MCP Servers
- AlicenseCqualityDmaintenanceProvides real-time access to Transport for London data, enabling users to check tube line statuses, get disruption details, and plan journeys between London locations. Uses the official TfL Unified API to deliver live transport information through AI assistants.39 npmMIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to access real-time Transport for London data, including tube/bus arrivals, line status, journey planning, and disruptions.1-
- AlicenseBqualityDmaintenanceProvides real-time Transport for London journey data, including routes, alerts, and disruptions, allowing AI assistants to search journeys and get station information.18 npm4ISC
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to query live Transport for London data, including service status, arrivals, journey planning, bike points, crowding, and fares.1MIT