TransCAPI

com.transcapi由 transcapi.com 发布v0.1.3更新于 Oct 30, 2026

UK and Ireland transport: live buses and trains, journey planning, rail fares, disruptions.

已验证STDIO仅桌面位置与生活数据与分析

概览

AI 生成的概览

TransCAPI 让助手获取英国与爱尔兰的实时公共交通数据:公交与火车班次、车辆实时位置、运营中断和行程规划。

可以做什么
  • 按名称或坐标查找城镇、邮编、公交站和火车站,并返回后续查询所需的代码
  • 读取公交与火车的实时出发和到达信息,含预计时间、站台、取消和延误原因
  • 追踪单趟公交或火车的全部停靠站,含今日实时状态和车辆当前位置
  • 列出某地点附近的在途公交,可按线路或运营商筛选
  • 按区域、交通方式、运营商、线路或某条行程路线查询计划施工、事故和线路状态
  • 规划公共交通行程,含步行、票价和已运行公交的实时位置
适用场景
适合回答关于英国与爱尔兰公共交通的问题:下一班火车或公交、是否准点、某辆公交现在在哪、什么在影响某条线路。行程规划目前仅覆盖南约克郡、西约克郡和西萨塞克斯。
运行要求
以 Python 包 transcapi-mcp 在本地通过 stdio 运行(可用 uvx 或 pip),面向桌面客户端。需要在 TRANSCAPI_API_KEY 中提供 TransCAPI API 密钥,免费额度为每天 200 次请求。可用 TRANSCAPI_BASE_URL 覆盖 API 地址。需要能访问 TransCAPI API 的网络。
安装前请注意
TRANSCAPI_API_KEY 中的 API 密钥属于机密,不应外泄。所有工具均为只读,但查询会把位置和出行计划发送给第三方 API。向他人展示数据时须按提供方要求标注数据来源。

安装

在 SourceWeft 中

  1. 打开 控制台中的 TransCAPI,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

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 (200 requests a day, every endpoint).

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

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

    For Claude Code:

    bash
    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

ToolWhat it answers
search_placesFind a town, village, postcode or stop by name
nearby_stopsBus, tram and rail stops near a point, with which way the buses go
nearby_stationsRail stations near a point
bus_departuresWhat's leaving (or arriving at) a bus stop, with live times for tracked buses
rail_departuresLive trains at a station: expected times, platforms, cancellations, delay reasons
train_serviceEvery station one train calls at, live for today
bus_serviceEvery stop one bus journey calls at, and where the bus is now
live_busesBuses on the road near a point, with delays where tracked
disruptionsPlanned works, incidents and line status, by area, line or a journey's route
plan_journeyPublic transport journeys between two points (South and West Yorkshire and West Sussex for now)

All tools are read-only.

Configuration

Variable
TRANSCAPI_API_KEYRequired. Your TransCAPI key.
TRANSCAPI_BASE_URLOptional. 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.

来源:README.md,提交 fad5b23

工具

10

search_places

Find towns, villages, postcodes (full or partial, e.g. "S1") and stops by name. Places sharing a name are ranked by size. Give lat/lon to sort by distance from there.

输入参数latlonlimitquery必填

nearby_stops

Bus, tram and rail stops within `radius` metres of a point, nearest first. Each has an `atcocode` for bus_departures and `towards` saying which way its buses go.

输入参数lat必填lon必填limitradius

nearby_stations

Rail stations within `radius` metres of a point, with their CRS codes for rail_departures.

输入参数lat必填lon必填limitradius

bus_departures

What is leaving (or, with board="arrivals" or "both", arriving at) a bus stop. Tracked buses have an expected time and `delay_seconds`; others show the timetabled time with source `gtfs_scheduled`.

输入参数boardlimitatcocode必填minutes_ahead

rail_departures

Live trains leaving (or arriving at, with board="arrivals" or "both") a station: expected times, platforms, cancellations and delay reasons from National Rail, plus station messages. `crs_code` is the 3-letter code, e.g. LDS for Leeds.

输入参数boardlimitcrs_code必填minutes_ahead

train_service

Every station one train calls at. For a train running today, each call has live status, expected and actual times, and the platform at its next station. Take `trip_id` from rail_departures.

输入参数trip_id必填

bus_service

Every stop one bus journey calls at, the days it runs, and where the bus is now if it is running. Take `trip_id` from bus_departures or live_buses.

输入参数trip_id必填

live_buses

Buses on the road within `radius` metres (up to 10000) of a point, nearest first, each linked to the journey it is working (`trip_id`) and with `delay_seconds` where tracked. Filter by `line` (e.g. "52") or operator.

输入参数lat必填lon必填lineradiusoperator

disruptions

Planned works, incidents and line status: bus and tram across Great Britain, plus Tube, DLR, Overground, Elizabeth line and London Trams. Filter by area (lat/lon/radius), mode, operator or line. To ask what affects a particular journey, pass its route as `path` (an encoded polyline, e.g. a leg's `leg_geometry` from plan_journey): line numbers repeat across towns, so this is more reliable than `line`.

输入参数latlonlinemodepathlimitradiusoperatorpath_radius

plan_journey

Public transport journeys between two points, with walking, fares and live positions of buses already running. `datetime` is ISO 8601 (default now); `arrive_by` treats it as the latest arrival. Currently covers South and West Yorkshire and West Sussex: elsewhere it returns 422 outside_coverage, which means not covered rather than no route.

输入参数limitto_lat必填to_lon必填datetimefrom_lat必填from_lon必填arrive_byinclude_steps

版本历史

3
  1. v0.1.3最新Oct 23, 2026
  2. v0.1.2Oct 21, 2026
  3. v0.1.1Sep 29, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分