Skip to main content

TransCAPI MCP server

Lets AI assistants such as Claude answer questions about public transport in Great Britain and Ireland 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, Wales and the island of Ireland (plus the Netherlands and Belgium): stops and places, bus and rail departures with live running, live bus positions, journey planning with rail fares, disruptions matched to a route, and measured bus punctuality.

Setup

  1. Get a free API key at https://www.transcapi.com/signup (500 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.

Metadata

Release files for transcapi-mcp 0.1.2

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.2
File Size Uploaded Provenance Actions
transcapi_mcp-0.1.2.tar.gz 6.0 kB Without provenance Details for transcapi_mcp-0.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 13.0 kB

Release files / transcapi_mcp-0.1.2.tar.gz

Download URL transcapi_mcp-0.1.2.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e582ba2b7066c158efce746034fe6ed3b6180c75d873d8aa1315258159a44eb1
BLAKE2b-256 checksum
How to use checksums
28b321015a94b88deb30dfd98e5ed98fd11673abbfad8b3a43c1a38f99c3119b
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.2-py3-none-any.whl

Download URL transcapi_mcp-0.1.2-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
30da129a9ae7c44d40cbc4ac2be151be9308d721b768eba53579026bf381b18e
BLAKE2b-256 checksum
How to use checksums
08df932de7d6258d68525ac8b0d5f072e4f1cbc6ed5d5fa82b97b64a7d31ae7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for transcapi-mcp 0.1.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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