Transport for London MCP Server

Transport for London MCP Server

tfl-mcp-server•byanoopt

A Model Context Protocol server that provides real-time Transport for London data, including line status, journey planning, and disruption information, deployed on Cloudflare Workers.

License: MIT License•Runtime: Awaiting documentation review•Category: search web

WHAT IT DOES

  • •Displays an interactive selector with buttons for all TfL lines, each styled with its official line color, that calls get_line_status for a line when clicked.
  • •Gets the current status of a specific TfL line, returning JSON data and a visual card with TfL branding and status badges for MCP-UI clients.
  • •Plans journeys between two London locations with optional transport modes, time, date, walking speed, cycling preference, and optimization parameters.
  • •Supports optional TfL API key authentication passed via the X-API-Key header for higher rate limits.

BEST FOR

  • •Checking the current service status of London transport lines such as the Northern, Victoria, and Central lines.
  • •Planning journeys between London locations, such as from King's Cross to Heathrow Airport.
  • •Finding the fastest route between London stations, such as from Wimbledon to Liverpool Street.

ABOUT TFL-MCP-SERVER

Transport for London MCP Server is cataloged as an MCP server attributed to anoopt. A Model Context Protocol server that provides real-time Transport for London data, including line status, journey planning, and disruption information, deployed on Cloudflare Workers. It is categorized under search web. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Transport for London MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

上游原版 README

在 GitHub 查看同一版本原文

README.md · ff9c53920b05 · 采集于 2026-11-13 13:58:20 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

Transport for London MCP Server

⚠️ Important Disclaimer: This is not an official Transport for London (TfL) MCP server. This is an independent project that uses the publicly available TfL Unified API to provide transport data. It is not affiliated with, endorsed by, or officially supported by Transport for London.

A Model Context Protocol (MCP) server providing real-time Transport for London data, including line status, journey planning, and disruption information. This server is deployed on Cloudflare Workers and can be used with any MCP-compatible client like Claude Desktop.

Demo

With MCP-UI Support

Experience interactive visual cards and UI components with MCP-UI compatible clients (shown here using nanobot.ai):

Demo with MCP-UI

Without MCP-UI

For clients without MCP-UI support, the server returns JSON data:

Demo without MCP-UI

Features

This MCP server provides the following tools:

🎯 show_line_status_selector (NEW!)

Display an interactive selector with buttons for all TfL lines. This uses MCP-UI's externalUrl feature to load an interactive HTML interface in your MCP client.

  • Parameters: None
  • Output:
    • An interactive UI with clickable buttons for all available TfL lines (Victoria, Central, Northern, Piccadilly, Jubilee, Bakerloo, Circle, District, Hammersmith & City, Metropolitan, Waterloo & City, Elizabeth, DLR, Overground, and Tram)
    • Each button is styled with the official line color
    • Clicking a button automatically calls get_line_status for that line
    • Perfect for quickly checking status across multiple lines

Use Case Example: Ask "Show me the line status selector" or "Show status" to get an interactive view of all lines. Click any line button to instantly check its current status.

🚇 get_line_status

Get the current status of a specific TfL transport line with beautiful visual cards (MCP-UI support).

  • Parameters:
    • lineId: The line ID to query (e.g., 'central', 'piccadilly', 'northern', 'victoria')
  • Output: Returns both JSON data and a visual UI card with TfL branding, line colors, and status badges

MCP-UI Visual Responses

When used with MCP-UI compatible clients (like Claude Desktop with MCP-UI support), the server returns beautiful visual cards:

Good Service:

Victoria Line - Good Service

Severe Delays:

Central Line - Severe Delays

Minor Delays:

Northern Line - Minor Delays

The visual cards feature:

  • Official TfL roundel logo with dynamic line colors
  • Status badges (green for good service, red for severe delays, amber for minor delays)
  • Clean, professional design with TfL branding
  • Fully backward compatible - non-MCP-UI clients receive JSON data

🗺️ plan_journey

Plan journeys between two locations in London.

  • Parameters:
    • from: Starting location (postcode, address, or station name)
    • to: Destination location (postcode, address, or station name)
    • modes (optional): Transport modes to use (e.g., 'tube,bus,walking')
    • time (optional): Journey time in HH:MM format or 'now'
    • timeIs (optional): 'Departing' or 'Arriving'
    • date (optional): Journey date in YYYYMMDD format
    • walkingSpeed (optional): 'Slow', 'Average', or 'Fast'
    • cyclePreference (optional): Cycling preference options
    • optimize (optional): 'Time', 'LeastInterchange', or 'LeastWalking'
    • maxTransferMinutes (optional): Maximum transfer time in minutes
    • maxWalkingMinutes (optional): Maximum walking time in minutes

Getting Started

Try It Now (No Deployment Required)

Want to test the server before deploying your own? You can use the public demo instance!

For Claude Desktop:

  1. Open Claude Desktop Settings > Developer > Edit Config
  2. Add this configuration:
{
  "mcpServers": {
    "tfl": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://london-transport-mcp.anoopt.workers.dev/mcp"
      ]
    }
  }
}
  1. Restart Claude Desktop
  2. Start asking questions about London transport!

For VS Code (GitHub Copilot):

  1. Open VS Code Settings > Extensions > GitHub Copilot > MCP Servers
  2. Add this configuration:
{
  "servers": {
    "tfl": {
      "type": "http",
      "url": "https://london-transport-mcp.anoopt.workers.dev/mcp"
    }
  }
}
  1. Start the MCP server
  2. Start using TfL tools in Copilot Chat!

Quick Deploy

Deploy to Cloudflare Workers

Click the button above to deploy this MCP server to your Cloudflare Workers account with one click!

Manual Deployment

  1. Clone this repository
  2. Install dependencies:
    npm install
    
  3. Deploy to Cloudflare Workers:
    npm run deploy
    

Your MCP server will be deployed to a URL like: london-transport-mcp.<your-account>.workers.dev

Authentication (Optional)

This server supports optional TfL API key authentication. While the TfL API works without authentication, using an API key provides higher rate limits and better performance.

Without API Key: The server will work with TfL's public API limits (subject to rate limiting).

With API Key (Recommended):

  1. Get a free API key from TfL API Portal
  2. Pass the API key in the X-API-Key header when connecting to the server

Connect to Claude Desktop

To connect to your MCP server from Claude Desktop, update your Claude Desktop configuration:

  1. Go to Claude Desktop Settings > Developer > Edit Config
  2. Add one of the following configurations:

Using mcp-remote

With API Key:

{
  "mcpServers": {
    "tfl": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://london-transport-mcp.<your-account>.workers.dev/mcp",
        "--header",
        "X-API-Key: YOUR_TFL_API_KEY"
      ]
    }
  }
}

Without API Key:

{
  "mcpServers": {
    "tfl": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://london-transport-mcp.<your-account>.workers.dev/mcp"
      ]
    }
  }
}

Note: For local development, replace the URL with http://localhost:8787/mcp

Connect to Cloudflare AI Playground

You can also connect to your MCP server from the Cloudflare AI Playground:

  1. Go to https://playground.ai.cloudflare.com/
  2. Enter your deployed MCP server URL with the /mcp endpoint
  3. Add the X-API-Key header with your TfL API key
  4. Start using the TfL tools directly from the playground!

Local Development

For local development:

npm run dev

This will start the server locally at http://localhost:8787

API Key (Optional)

This server supports optional TfL API key authentication for higher rate limits. The API key is not required but recommended for production use.

To use without an API Key: Simply omit the X-API-Key header when connecting. The TfL API will apply standard rate limits.

To use with an API Key:

  1. Visit the TfL API Portal
  2. Register for a free account
  3. Create a new application to get your API key
  4. Pass the key in the X-API-Key header when connecting

Examples

Once connected, you can ask Claude things like:

  • "Show me the line status selector" or "Show status" - displays an interactive UI with all TfL lines
  • "Is the Northern line running ok?"
  • "What's the status of the Victoria line?"
  • "Plan a journey from King's Cross to Heathrow Airport"
  • "How do I get from Oxford Circus to Canary Wharf?"
  • "What's the fastest route from Wimbledon to Liverpool Street?"

Tech Stack

  • Runtime: Cloudflare Workers
  • Framework: Hono.js
  • MCP SDK: @modelcontextprotocol/sdk
  • Language: TypeScript
  • API: Transport for London Unified API

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is open source and available under the MIT License.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Transport for London MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/tfl-mcp-server)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related search web MCP Servers

Alternative and complementary servers in the same category

View all in search web →

An MCP server that merges Google Search Console history with a live first-party crawl of your site to produce a prioritised, evidence-backed technical SEO audit inside Claude, complete with paste-ready fixes.

Repository stats unavailable
Search & Web Research

An MCP server that offers intelligent web search using OpenAI reasoning models, with support for fast iterations and deep research.

94
Search & Web Research