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
-
Get a free API key at https://www.transcapi.com/signup (1,000 requests a day, every endpoint).
-
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-mcpOr install it yourself with
pip install transcapi-mcpand runtranscapi-mcp.
Tools
All tools are read-only.
Configuration
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.