关于 Transit Land
Transit Land 是用于查询公共交通机构、线路、站点、出发班次和 GTFS 数据源的 MCP 服务,适合需要跨运营方和地点获取公共交通数据的应用。
主要功能
- 01搜索公共交通机构
- 02按类型或地点搜索线路
- 03查找站点和车站
- 04查询站点出发班次
- 05列出可用 GTFS 数据源
适用场景
- 01查找附近的交通运营方
- 02定位线路和邻近站点
- 03查询车站出发班次
- 04浏览可用的交通数据源
MCP 相关
向 MCP 客户端提供 Transitland 机构、线路、站点、出发班次和数据源查询工具,可通过 Pipeworx 网关或本地 stdio 服务使用。
配置
远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。
https://gateway.pipeworx.io/transit-land/mcpclaude mcp add --transport http pipeworx-io-transit-land https://gateway.pipeworx.io/transit-land/mcp{"mcpServers":{"pipeworx-io-transit-land":{"type":"http","url":"https://gateway.pipeworx.io/transit-land/mcp"}}}在 Cursor 中打开{"servers":{"pipeworx-io-transit-land":{"type":"http","url":"https://gateway.pipeworx.io/transit-land/mcp"}}}在 VS Code 中打开{"mcpServers":{"pipeworx-io-transit-land":{"type":"http","url":"https://gateway.pipeworx.io/transit-land/mcp"}}}{"mcpServers":{"pipeworx-io-transit-land":{"serverUrl":"https://gateway.pipeworx.io/transit-land/mcp"}}}命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。
工具
详细介绍
@pipeworx/transit-land
Transitland MCP — 全球 GTFS 聚合器(约 3000 家公共交通运营商、约 50k 个数据源)。免费套餐需使用 API 密钥。
属于 Pipeworx — 一个将 AI Agent 连接到 1684+ 个实时数据源的 MCP 网关。
工具
search_agencies(name?, agency_id?, lat?, lon?, radius_m?, limit?)— 公共交通运营商search_routes(name?, route_type?, agency_id?, operator_id?, lat?, lon?, radius_m?, limit?)— 公交车/铁路/渡轮线路search_stops(name?, stop_id?, lat?, lon?, radius_m?, limit?, served_by_route_type?)— 停靠点/车站departures_at_stop(stop_id, service_date?, start_time?, end_time?)— 即将发车的班次list_feeds(spec?, limit?)— 可用的 GTFS 数据源
身份验证
- 平台密钥: 网关环境变量
PLATFORM_TRANSITLAND_KEY - 自带密钥: 在 https://www.transit.land/ 注册后,添加
?_apiKey=<key>
数据源
https://transit.land/api/v2/rest/ — 使用 apikey= 查询参数或 apikey 标头。
快速开始
添加到你的 MCP 客户端(Claude Desktop、Cursor、Windsurf 等):
{
"mcpServers": {
"transit-land": {
"url": "https://gateway.pipeworx.io/transit-land/mcp"
}
}
}
此端点实际提供的内容
https://gateway.pipeworx.io/transit-land/mcp 上的 tools/list 会返回上表中的工具,以及 Pipeworx 共享元工具 — ask_pipeworx、
discover_tools、search_within、remember/recall 及网关范围内的其他工具。因此,你看到的工具数量会多于此表中的数量:目前,单个工具包端点除了自身工具外,还会列出约 30 个共享工具。连接的 initialize 响应会说明其确切范围,是当天情况的权威说明。
这是有意为之,并非意外复用。元工具让限定范围的连接也能回答此工具包未涵盖的问题 — 通过 ask_pipeworx 跨整个目录进行路由 — 而无需添加第二个 MCP 服务。目前无法在不包含这些工具的情况下挂载工具包端点;如果额外的架构定义带来的上下文开销超过路由的价值,请只连接一次完整网关,而不是连接多个工具包端点。
你也可以连接完整的 Pipeworx 网关,直接列出所有工具包的工具,而不只是此工具包的工具:
{
"mcpServers": {
"pipeworx": {
"url": "https://gateway.pipeworx.io/mcp"
}
}
}
两个 URL 都会连接到同一个网关和相同的 1684+ 个数据源。唯一的区别是直接列出的工具属于哪个工具包;通过任一端点调用 ask_pipeworx 都可以访问所有工具。
没有 MCP 客户端?通过 HTTP 调用
curl -X POST https://gateway.pipeworx.io/v1/tools/search_agencies \
-H 'Content-Type: application/json' \
-d '{}'
首次调用无需账户。查看任意工具:GET https://gateway.pipeworx.io/v1/tools/search_agencies。查找工具:使用 {"query":"..."} 向 https://gateway.pipeworx.io/v1/tools/search_packs 发送 POST 请求。
独立运行(无需网关账户)
此软件包也可以作为本地 stdio MCP 服务运行 — 无需 Pipeworx 账户,也无需通过网关往返:
{
"mcpServers": {
"transit-land": {
"command": "npx",
"args": ["-y", "@pipeworx/mcp-transit-land"]
}
}
}
或者直接运行,确认它能正常启动:
npx -y @pipeworx/mcp-transit-land
它通过 stdin/stdout 使用 MCP 协议,并针对仅此工具包自身的工具响应 initialize/tools/list/tools/call — 不包含上述网关连接添加的任何共享元工具。数据源相同,工具相同,但没有 ask_pipeworx 路由。
使用 ask_pipeworx
你也可以用日常语言提问,而不是直接调用工具 — 这既适用于上面的工具包端点,也适用于完整网关:
ask_pipeworx({ question: "your question about Transit Land data" })
网关会选择合适的工具,并自动填入参数。
更多信息
许可证
MIT
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。