TransCAPI
UK and Ireland transport: live buses and trains, journey planning, rail fares, disruptions.
Installation
Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).
transcapi-mcpclaude mcp add transcapi -e 'TRANSCAPI_API_KEY=<your transcapi_api_key>' -e 'TRANSCAPI_BASE_URL=<TRANSCAPI_BASE_URL>' -- uvx transcapi-mcp==0.1.3
{
"mcpServers": {
"transcapi": {
"command": "uvx",
"args": [
"transcapi-mcp==0.1.3"
],
"env": {
"TRANSCAPI_API_KEY": "<your transcapi_api_key>",
"TRANSCAPI_BASE_URL": "<TRANSCAPI_BASE_URL>"
}
}
}
}
Variables d'environnement
TRANSCAPI_API_KEYobligatoire secret Your TransCAPI API key. Free at https://www.transcapi.com/signupTRANSCAPI_BASE_URLAPI address, if not https://api.transcapi.com
Documentation
Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.
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
- Get a free API key at https://www.transcapi.com/signup (200 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
| 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.
Questions fréquentes
Qu'est-ce que TransCAPI ?
UK and Ireland transport: live buses and trains, journey planning, rail fares, disruptions.
Comment installer TransCAPI ?
Il s'exécute sur votre machine. Dans Claude Code : claude mcp add transcapi -e 'TRANSCAPI_API_KEY=<your transcapi_api_key>' -e 'TRANSCAPI_BASE_URL=<TRANSCAPI_BASE_URL>' -- uvx transcapi-mcp==0.1.3. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.
Faut-il une clé API pour TransCAPI ?
Oui. Il attend TRANSCAPI_API_KEY, à renseigner dans sa configuration.
TransCAPI est-il open source ?
Oui. Son code est sur GitHub sous licence MIT.
Qui maintient TransCAPI ?
Il est publié par tcdataconsultants. AI.tn le référence sans le maintenir ni le recommander.
Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.