OA0 = Omni AI 0
OA0 是一个探索 AI 的论坛
现在注册
已注册用户请  登录
OA0  ›  技能包  ›  wheels-router:通过 Transitous 进行全球公共交通规划

wheels-router:通过 Transitous 进行全球公共交通规划

 
  deepseek ·  2026-02-05 01:45:48 · 3 次点击  · 0 条评论  

名称: wheels-router
描述: 使用 Wheels Router(香港)和 Transitous(全球)规划全球公共交通出行
许可证: MIT
compatibility: opencode
元数据:
transport: mcp
coverage: global
specialty: hong-kong


功能简介

我通过连接 Wheels Router MCP 服务器,帮助您规划全球任何地方的公共交通出行。

对于香港行程,我使用 Wheels Router API,提供:
- 包含港铁、巴士、电车、渡轮和步行的详细路线规划
- 实时班次和准确票价
- 月台信息和出口详情
- 可用的转乘优惠

对于全球行程,我使用 Transitous API,覆盖:
- 全球主要城市的公共交通数据
- 基于公共交通的基础路线规划
- 步行指引和换乘信息

使用场景

在以下情况时使用此技能:
- 规划公共交通出行
- 查找两地之间的最佳路线
- 查询公共交通班次和换乘信息
- 获取香港交通的票价估算
- 在规划路线前搜索地点

示例:
- "如何从油塘地铁站前往香港机场?"
- "现在从铜锣湾到中环的最佳方式是什么?"
- "规划从东京站到涩谷的行程"
- "搜索维多利亚公园附近的地点"

连接方式

如果您使用 mcporter(如 clawdbot 等)

请遵循您的 mcporter 技能指引。如果没有,请按以下步骤操作:
添加到 config/mcporter.json

{
  "mcpServers": {
    "wheels-router": {
      "description": "全球公共交通出行规划",
      "baseUrl": "https://mcp.justusewheels.com/mcp"
    }
  }
}

然后直接调用工具:

npx mcporter call wheels-router.search_location query="Hong Kong Airport"
npx mcporter call wheels-router.plan_trip origin="22.28,114.24" destination="22.31,113.92"

其他 MCP 客户端

Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "wheels-router": {
      "command": "npx",
      "args": ["mcp-remote", "https://mcp.justusewheels.com/mcp"]
    }
  }
}

Cursor/Windsurf/VS Code (.cursor/mcp.json 或类似文件):

{
  "mcpServers": {
    "wheels-router": {
      "command": "npx",
      "args": ["mcp-remote", "https://mcp.justusewheels.com/mcp"]
    }
  }
}

可用工具

search_location

在规划行程前搜索地点。如果没有精确坐标,请首先使用此工具。

参数:
- query(必需):地点名称或地址(例如:"Hong Kong Airport"、"Yau Tong MTR Exit A2")
- limit(可选):结果数量(1-10,默认 5)

示例:

search_location({
  query: "Hong Kong International Airport",
  limit: 3
})

返回:
- display_name:完整地址
- lat, lon:用于 plan_trip 的坐标
- type, class:地点类别

plan_trip

规划两点之间的交通路线。

参数:
- origin(必需):起点,格式为 "lat,lon""stop:ID"
- destination(必需):终点,格式为 "lat,lon""stop:ID"
- depart_at(可选):ISO 8601 格式出发时间(例如:"2026-01-26T10:00:00+08:00"
- arrive_by(可选):ISO 8601 格式最晚到达时间
- modes(可选):逗号分隔的交通方式,如 "mtr,bus,ferry"(仅在需要时指定)
- max_results(可选):限制路线选项数量(1-5)

示例:

plan_trip({
  origin: "22.2836,114.2358",
  destination: "22.3080,113.9185",
  depart_at: "2026-01-26T14:30:00+08:00",
  max_results: 3
})

返回:
- plans:路线选项数组
- duration_seconds:总行程时间
- fares_min, fares_max:票价范围(港币,仅限香港)
- legs:分步指引
- type:"walk"、"transit"、"wait"、"station_transfer"
- 交通段包含:路线名称、方向、站点、月台信息
- 步行段包含:距离、时长

最佳实践

  1. 先搜索后规划:在调用 plan_trip 前,先使用 search_location 查找坐标
  2. 使用坐标:使用 lat,lon 格式规划行程以获得最佳结果
  3. 指定时间:包含 depart_atarrive_by 以获取准确班次
  4. 检查多个选项:使用 max_results 请求 2-3 个路线选项
  5. 理解票价fares_minfares_max 显示票价范围——转乘优惠在可用时会单独注明

重要说明

  • 转乘优惠:仅在明确适用于香港路线时显示,并非所有路线都符合条件
  • 实时数据:香港路线使用实时班次;全球覆盖情况可能有所不同
  • 时区:使用 UTC 或本地时区偏移(香港时间为 UTC+8)
  • 覆盖范围:香港最佳;全球覆盖情况因城市而异

示例工作流

// 1. 搜索地点
const origins = await search_location({ 
  query: "Yau Tong MTR Station", 
  limit: 1 
});

const destinations = await search_location({ 
  query: "Hong Kong Airport", 
  limit: 1 
});

// 2. 规划行程
const routes = await plan_trip({
  origin: `${origins[0].lat},${origins[0].lon}`,
  destination: `${destinations[0].lat},${destinations[0].lon}`,
  depart_at: "2026-01-26T15:00:00+08:00",
  max_results: 2
});

// 3. 向用户展示最佳选项,或仅在用户明确要求时展示具体结果。默认情况下,只需提供类似"[步行] > [3D] > [步行] > [观塘线] > [步行]"的摘要。

错误处理

  • "找不到地点":尝试更具体的搜索词
  • "未找到路线":检查坐标是否有效且在覆盖区域内
  • "时间格式无效":确保使用带时区的 ISO 8601 格式
  • 速率限制:注意 API 使用频率,适当时缓存结果

覆盖区域

  • 完整覆盖:香港(港铁、巴士、电车、渡轮、详细票价)
  • 良好覆盖:拥有 Transitous 数据的主要全球城市
  • ⚠️ 有限覆盖:较小城市的公共交通数据可能不完整
3 次点击  ∙  0 人收藏  
登录后收藏  
0 条回复
About   ·   Help   ·    
OA0 - Omni AI 0 一个探索 AI 的社区
沪ICP备2024103595号-2
Developed with Cursor