Skip to main content

TransCAPI MCP server

Lets AI assistants such as Claude answer questions about public transport in Great Britain with live data: "When's the next train from Leeds to York, and is it on time?", "Where's the 52 bus?", "Is anything disrupting my route home?"

It connects an assistant to TransCAPI, which covers England, Scotland and Wales: stops and places, bus and rail departures with live running, live bus positions, disruptions and journey planning.

Setup

  1. Get a free API key at https://www.transcapi.com/signup (1,000 requests a day, every endpoint).

  2. Add the server to your MCP client. For Claude Desktop, in claude_desktop_config.json:

    {
      "mcpServers": {
        "transcapi": {
          "command": "uvx",
          "args": ["transcapi-mcp"],
          "env": { "TRANSCAPI_API_KEY": "your-key" }
        }
      }
    }
    

    For Claude Code:

    claude mcp add transcapi --env TRANSCAPI_API_KEY=your-key -- uvx transcapi-mcp
    

    Or install it yourself with pip install transcapi-mcp and run transcapi-mcp.

Tools

Tool What it answers
search_places Find a town, village, postcode or stop by name
nearby_stops Bus, tram and rail stops near a point, with which way the buses go
nearby_stations Rail stations near a point
bus_departures What's leaving (or arriving at) a bus stop, with live times for tracked buses
rail_departures Live trains at a station: expected times, platforms, cancellations, delay reasons
train_service Every station one train calls at, live for today
bus_service Every stop one bus journey calls at, and where the bus is now
live_buses Buses on the road near a point, with delays where tracked
disruptions Planned works, incidents and line status, by area, line or a journey's route
plan_journey Public transport journeys between two points (South and West Yorkshire and West Sussex for now)

All tools are read-only.

Configuration

Variable
TRANSCAPI_API_KEY Required. Your TransCAPI key.
TRANSCAPI_BASE_URL Optional. Defaults to https://api.transcapi.com.

Attribution

TransCAPI is built on official open data. If you show its data to other people, credit the sources as described at https://www.transcapi.com/docs/data-sources.

Licence

MIT.

Release files for transcapi-mcp 0.1.0

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

Source distribution (sdist)

Source distribution for transcapi-mcp 0.1.0
File Size Uploaded
transcapi_mcp-0.1.0.tar.gz 5.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for transcapi-mcp 0.1.0
File Interpreter ABI Platform
transcapi_mcp-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.5 kB

Release files / transcapi_mcp-0.1.0.tar.gz

Download URL transcapi_mcp-0.1.0.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e90c466921b864d3c024e054d737a2c73ef50c03bbf57b622c1b597c38a5cabd
BLAKE2b-256 checksum
How to use checksums
754655778f828055d18197035187f5b4683a0e305ae9ea653ab7fe754c199362
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / transcapi_mcp-0.1.0-py3-none-any.whl

Download URL transcapi_mcp-0.1.0-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fcddf219e4003962e08446d539d6be2fd408da79a034bc946f3be1936a8bb25a
BLAKE2b-256 checksum
How to use checksums
283293c9273faca3a19d4246b790e96a585ac4bf30a6bcd9806c9ac57e65797f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

0.1.1

2 release files

This release

0.1.0 This release

2 release files

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