Token导航 LogoToken导航TokenDH.com
Mobility MCP Server logo
地图位置stdio官方级别未说明来源级核验

Mobility MCP Server

MCP Server

为残障人士提供综合考虑电梯/扶梯停运、场馆无障碍设施、天气条件等因素的智能出行规划服务。

工具数

2

提示词数

0

GitHub Stars

0

资源数

0
PythonClaude位置天气Claude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

yaswanthreddyyyr

提供方

yaswanthreddyyyr

最后核验

2026/5/17 20:21

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

python -m venv .venv

详细介绍

可访问性移动上下文路由器-MCP服务器

🎯 想法

问题:残疾人在规划旅行时面临重大挑战。标准导航应用程序不考虑:

  • 交通系统中的电梯/自动扶梯停运,导致无障碍路线受阻
  • 场馆无障碍信息(轮椅通道、语音导览、触觉路径等)
  • 影响出行的天气条件(雨、雪、极端温度)
  • 无障碍旅行需要额外的缓冲时间
  • 与日历事件集成,主动规划行程
  • 可能扰乱旅行计划的实时可访问性障碍

解决方案:一个MCP(模型上下文协议)服务器,融合了多个数据源,为残疾人提供了一个全面的、可访问性优先的旅行规划上下文包。它回答的不是“如何到达那里”,而是“如何安全无阻地到达那里”

关键创新:通过结合日历意图(下次会议)、实时交通可达性数据(电梯/自动扶梯停运)、场馆可达性标签(OpenStreetMap)、天气风险和路线规划,我们创建了一个 上下文包 这为人工智能助手提供了所需的一切,以提供知情、可访问性意识的指导。

影响:这将旅行计划从一个多步骤、容易出错的过程转变为一个单一的问题:“我如何去参加下一次会议?”系统会自动考虑无障碍障碍因素,提出替代方案,并提供与证据相关的建议。

🌍 这对谁有帮助

此MCP服务器使各个可访问性领域的人们受益:

  • 轮椅使用者:实时电梯/自动扶梯停运警报、场馆轮椅无障碍验证、带缓冲时间的无障碍路线规划
  • 盲人和视力障碍者:详细的路线描述、主要路线受阻时的替代路线选项、影响导航的天气条件
  • 行动不便:无障碍交通选择、场馆无障碍信息、针对影响出行条件的天气感知规划
  • 慢性病患者:缓冲时间建议、天气风险评估、主要方案不可用时的替代路线
  • 老年旅行者:全面的无障碍信息、清晰的路线选择、主动的障碍物检测

该系统的上下文包提供了结构化的、有证据支持的信息,人工智能助手可以适应每个用户的特定需求,无论他们需要轮椅无障碍路线、详细的口头描述还是对天气敏感的规划。

______________________________________________________________________

🚀 此MCP服务器的功能

这个MCP服务器是人工智能助手(如克劳德)的专用工具,可以帮助残疾人计划无障碍旅行。当你问“我如何参加下一次会议?”时,服务器:

  1. 获取您的下一个日历事件 通过ICS提要从谷歌日历中获取(标题、时间、位置)
  2. 查找多条路线候选 (交通,步行,驾驶)使用谷歌地图方向API
  3. 检查电梯/自动扶梯是否停机 纽约市大都会运输署的交通路线可能会堵塞无障碍通道
  4. 验证场馆可达性 (轮椅通行,无障碍功能)使用OpenStreetMap天桥API
  5. 评估天气风险 使用OpenWeather API在旅行时间前后
  6. 计算最佳出发时间 具有可配置的缓冲分钟数
  7. 将所有内容融合到一个紧凑的上下文包中 引用和证据

结果是一个结构化的JSON包,其中包含:

  • 亮点:5个关键项目,总结路线、无障碍警报、场馆通道、天气和时间
  • 替代方案:如果主路由有问题,则备份路由选项
  • 引用:源数据链接(地图、运输状态、天气预报)
  • 元数据:事件详细信息、来源/目的地、使用的来源

此上下文包使AI助手能够提供自然的、有证据支持的答案,例如:

“从时代广场乘坐Q线到86街(20分钟)。下午3:40前出发,下午4:00前到达,有20分钟的缓冲时间。注意:57街站电梯停运——考虑通过96街的替代路线。大都会博物馆是轮椅无障碍的。预计会有小雨——带把伞。”

______________________________________________________________________

🛠️ 可用工具

MCP服务器公开了两个工具和一个资源:

工具

1. ask

目的:获得关于如何参加下一次会议的简洁、自然语言的答案。

参数:

  • question (必填,字符串):您的问题,例如,“我怎样才能参加下一次会议?”
  • origin (可选,字符串):起始地址。如果省略,则使用 HOME_ADDRESS 从配置。
  • buffer_minutes (可选,整数,默认值:20):可访问行程的额外时间缓冲区(分钟)。

退货:一份包含主要亮点和建议的文本回复,以及完整的上下文包。

示例请求:

{
  "jsonrpc": "2.0",
  "id": "1",
  "method": "tools/call",
  "params": {
    "name": "ask",
    "arguments": {
      "question": "How can I reach my next meeting?",
      "buffer_minutes": 20
    }
  }
}

示例响应:

{
  "jsonrpc": "2.0",
  "id": "1",
  "result": {
    "content": [
      {
        "type": "text",
        "text": "- Take Q train from Times Sq-42 St to 86 St (20 min)\n- Elevator outage at 57th St station - consider alternative route\n- The Met is wheelchair accessible\n- Light rain expected around arrival time - bring an umbrella\n- Leave by 3:40 PM to arrive by 4:00 PM (20 min buffer)\n- Alternative: Take 1 train to 96th St, then walk (25 min)"
      },
      {
        "type": "text",
        "text": "{\"context\":{\"query_intent\":\"route_to_event\",\"sources_used\":[\"directions\",\"gtfs_rt_elevators\",\"osm_overpass\",\"openweather\"],\"event\":{\"title\":\"Museum Visit\",\"start_time_iso\":\"2025-11-08T16:00:00-05:00\",\"location_text\":\"The Met, 1000 5th Ave, New York, NY\"},\"origin\":{\"label\":\"Home\",\"address\":\"Times Square, New York, NY\"},\"highlights\":[{\"type\":\"route_summary\",\"text\":\"Take Q train from Times Sq-42 St to 86 St (20 min)\",\"citations\":[\"https://www.google.com/maps/dir/?saddr=Times+Square%2C+New+York%2C+NY&daddr=The+Met%2C+1000+5th+Ave%2C+New+York%2C+NY\"]},{\"type\":\"accessibility_alert\",\"text\":\"Elevator outage at 57th St station\",\"citations\":[\"https://api-endpoint.mta.info/Dataservice/mtagtfsfeeds/nyct%2Fnyct_ene.json\"]},{\"type\":\"venue_access\",\"text\":\"The Met is wheelchair accessible\",\"citations\":[\"https://overpass-api.de/api/interpreter\"]},{\"type\":\"weather_risk\",\"text\":\"Light rain expected around arrival time\",\"citations\":[\"https://api.openweathermap.org/data/2.5/forecast\"]},{\"type\":\"buffer_recommendation\",\"text\":\"Leave by 3:40 PM to arrive by 4:00 PM (20 min buffer)\",\"citations\":[]}],\"alternatives\":[{\"summary\":\"Alternative: Take 1 train to 96th St, then walk (25 min)\",\"citations\":[\"https://www.google.com/maps/dir/?saddr=Times+Square%2C+New+York%2C+NY&daddr=The+Met%2C+1000+5th+Ave%2C+New+York%2C+NY\"]}],\"raw_citations\":[\"https://www.google.com/maps/dir/?saddr=Times+Square%2C+New+York%2C+NY&daddr=The+Met%2C+1000+5th+Ave%2C+New+York%2C+NY\",\"https://api-endpoint.mta.info/Dataservice/mtagtfsfeeds/nyct%2Fnyct_ene.json\",\"https://overpass-api.de/api/interpreter\",\"https://api.openweathermap.org/data/2.5/forecast\"],\"token_estimate\":156,\"meta\":{}}}"
      }
    ]
  }
}

备注:答复包含两个文本项:

  1. 第一项:简明扼要的要点摘要回答
  2. 第二项:一个包含完整内容的JSON字符串 context 对象完整 ContextPackage 细节、引用和元数据

解析后,第二个项目产生:

{
  "context": {
    "query_intent": "route_to_event",
    "sources_used": ["directions", "gtfs_rt_elevators", "osm_overpass", "openweather"],
    "event": {
      "title": "Museum Visit",
      "start_time_iso": "2025-11-08T16:00:00-05:00",
      "location_text": "The Met, 1000 5th Ave, New York, NY"
    },
    "origin": {
      "label": "Home",
      "address": "Times Square, New York, NY"
    },
    "highlights": [...],
    "alternatives": [...],
    "raw_citations": [...],
    "token_estimate": 156,
    "meta": {}
  }
}

2. build_context

目的:构建包含所有细节、引用和替代方案的完整上下文包。

参数:

  • origin (可选,字符串):起始地址。如果省略,则使用 HOME_ADDRESS 从配置。
  • buffer_minutes (可选,整数,默认值:20):以分钟为单位的额外时间缓冲区。

退货:一个包含完整信息的JSON字符串 ContextPackage 对象。

示例请求:

{
  "jsonrpc": "2.0",
  "id": "2",
  "method": "tools/call",
  "params": {
    "name": "build_context",
    "arguments": {
      "buffer_minutes": 20
    }
  }
}

示例响应:

{
  "jsonrpc": "2.0",
  "id": "2",
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"query_intent\":\"route_to_event\",\"sources_used\":[\"directions\",\"gtfs_rt_elevators\",\"osm_overpass\",\"openweather\"],\"event\":{\"title\":\"Museum Visit\",\"start_time_iso\":\"2025-11-08T16:00:00-05:00\",\"location_text\":\"The Met, 1000 5th Ave, New York, NY\"},\"origin\":{\"label\":\"Home\",\"address\":\"Times Square, New York, NY\"},\"highlights\":[{\"type\":\"route_summary\",\"text\":\"Take Q train from Times Sq-42 St to 86 St (20 min)\",\"citations\":[\"https://www.google.com/maps/dir/?saddr=Times+Square%2C+New+York%2C+NY&daddr=The+Met%2C+1000+5th+Ave%2C+New+York%2C+NY\"]},{\"type\":\"accessibility_alert\",\"text\":\"Elevator outage at 57th St station\",\"citations\":[\"https://api-endpoint.mta.info/Dataservice/mtagtfsfeeds/nyct%2Fnyct_ene.json\"]},{\"type\":\"venue_access\",\"text\":\"The Met is wheelchair accessible\",\"citations\":[\"https://overpass-api.de/api/interpreter\"]},{\"type\":\"weather_risk\",\"text\":\"Light rain expected around arrival time\",\"citations\":[\"https://api.openweathermap.org/data/2.5/forecast\"]},{\"type\":\"buffer_recommendation\",\"text\":\"Leave by 3:40 PM to arrive by 4:00 PM (20 min buffer)\",\"citations\":[]}],\"alternatives\":[{\"summary\":\"Alternative: Take 1 train to 96th St, then walk (25 min)\",\"citations\":[\"https://www.google.com/maps/dir/?saddr=Times+Square%2C+New+York%2C+NY&daddr=The+Met%2C+1000+5th+Ave%2C+New+York%2C+NY\"]}],\"raw_citations\":[\"https://www.google.com/maps/dir/?saddr=Times+Square%2C+New+York%2C+NY&daddr=The+Met%2C+1000+5th+Ave%2C+New+York%2C+NY\",\"https://api-endpoint.mta.info/Dataservice/mtagtfsfeeds/nyct%2Fnyct_ene.json\",\"https://overpass-api.de/api/interpreter\",\"https://api.openweathermap.org/data/2.5/forecast\"],\"token_estimate\":156,\"meta\":{}}"
      }
    ]
  }
}

备注:响应包含一个JSON字符串。解析时,它会产生一个 ContextPackage 具有以下结构的对象:

{
  "query_intent": "route_to_event",
  "sources_used": [
    "directions",
    "gtfs_rt_elevators",
    "osm_overpass",
    "openweather"
  ],
  "event": {
    "title": "Museum Visit",
    "start_time_iso": "2025-11-08T16:00:00-05:00",
    "location_text": "The Met, 1000 5th Ave, New York, NY"
  },
  "origin": {
    "label": "Home",
    "address": "Times Square, New York, NY"
  },
  "highlights": [
    {
      "type": "route_summary",
      "text": "Take Q train from Times Sq-42 St to 86 St (20 min)",
      "citations": ["https://www.google.com/maps/dir/..."]
    },
    {
      "type": "accessibility_alert",
      "text": "Elevator outage at 57th St station",
      "citations": ["https://api-endpoint.mta.info/..."]
    },
    {
      "type": "venue_access",
      "text": "The Met is wheelchair accessible",
      "citations": ["https://overpass-api.de/..."]
    },
    {
      "type": "weather_risk",
      "text": "Light rain expected around arrival time",
      "citations": ["https://api.openweathermap.org/..."]
    },
    {
      "type": "buffer_recommendation",
      "text": "Leave by 3:40 PM to arrive by 4:00 PM (20 min buffer)",
      "citations": []
    }
  ],
  "alternatives": [
    {
      "summary": "Alternative: Take 1 train to 96th St, then walk (25 min)",
      "citations": ["https://www.google.com/maps/dir/..."]
    }
  ],
  "raw_citations": [
    "https://www.google.com/maps/dir/...",
    "https://api-endpoint.mta.info/...",
    "https://overpass-api.de/...",
    "https://api.openweathermap.org/..."
  ],
  "token_estimate": 156,
  "meta": {}
}

资源

context/last

目的:访问上次生成的上下文包。

统一资源标识符: context/last

退货:最近 ContextPackage JSON格式。

示例请求:

{
  "jsonrpc": "2.0",
  "id": "3",
  "method": "resources/read",
  "params": {
    "uri": "context/last"
  }
}

示例响应:

{
  "jsonrpc": "2.0",
  "id": "3",
  "result": {
    "contents": [
      {
        "type": "text",
        "text": "{\n  \"query_intent\": \"route_to_event\",\n  \"sources_used\": [\"directions\", \"gtfs_rt_elevators\", \"osm_overpass\", \"openweather\"],\n  \"event\": {\n    \"title\": \"Museum Visit\",\n    \"start_time_iso\": \"2025-11-08T16:00:00-05:00\",\n    \"location_text\": \"The Met, 1000 5th Ave, New York, NY\"\n  },\n  \"origin\": {\n    \"label\": \"Home\",\n    \"address\": \"Times Square, New York, NY\"\n  },\n  \"highlights\": [\n    {\n      \"type\": \"route_summary\",\n      \"text\": \"Take Q train from Times Sq-42 St to 86 St (20 min)\",\n      \"citations\": [\"https://www.google.com/maps/dir/?saddr=Times+Square%2C+New+York%2C+NY&daddr=The+Met%2C+1000+5th+Ave%2C+New+York%2C+NY\"]\n    },\n    {\n      \"type\": \"accessibility_alert\",\n      \"text\": \"Elevator outage at 57th St station\",\n      \"citations\": [\"https://api-endpoint.mta.info/Dataservice/mtagtfsfeeds/nyct%2Fnyct_ene.json\"]\n    },\n    {\n      \"type\": \"venue_access\",\n      \"text\": \"The Met is wheelchair accessible\",\n      \"citations\": [\"https://overpass-api.de/api/interpreter\"]\n    },\n    {\n      \"type\": \"weather_risk\",\n      \"text\": \"Light rain expected around arrival time\",\n      \"citations\": [\"https://api.openweathermap.org/data/2.5/forecast\"]\n    },\n    {\n      \"type\": \"buffer_recommendation\",\n      \"text\": \"Leave by 3:40 PM to arrive by 4:00 PM (20 min buffer)\",\n      \"citations\": []\n    }\n  ],\n  \"alternatives\": [\n    {\n      \"summary\": \"Alternative: Take 1 train to 96th St, then walk (25 min)\",\n      \"citations\": [\"https://www.google.com/maps/dir/?saddr=Times+Square%2C+New+York%2C+NY&daddr=The+Met%2C+1000+5th+Ave%2C+New+York%2C+NY\"]\n    }\n  ],\n  \"raw_citations\": [\n    \"https://www.google.com/maps/dir/?saddr=Times+Square%2C+New+York%2C+NY&daddr=The+Met%2C+1000+5th+Ave%2C+New+York%2C+NY\",\n    \"https://api-endpoint.mta.info/Dataservice/mtagtfsfeeds/nyct%2Fnyct_ene.json\",\n    \"https://overpass-api.de/api/interpreter\",\n    \"https://api.openweathermap.org/data/2.5/forecast\"\n  ],\n  \"token_estimate\": 156,\n  \"meta\": {}\n}"
      }
    ]
  }
}

备注:响应包含上次生成的格式化JSON字符串 ContextPackage。如果尚未构建上下文,则返回一个空对象 {}.

______________________________________________________________________

📦 安装说明

先决条件

  • Python 3.9或更高版本
  • 虚拟环境工具(推荐: uvvenv)
  • (可选)用于增强功能的API密钥(请参见下文)

步骤1:克隆和导航

cd D:\Datathon

第二步:创建虚拟环境

使用 uv (推荐):

# Install uv if not already installed
# Windows PowerShell:
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

# Create virtual environment
uv venv

# Activate (Windows PowerShell)
.\.venv\Scripts\activate

使用 venv:

python -m venv .venv

# Activate (Windows PowerShell)
.\.venv\Scripts\activate

步骤3:安装依赖项

# Using uv
uv pip install -r requirements.txt

# Or using pip
pip install -r requirements.txt

步骤4:配置环境变量

创建一个 .env 项目根目录中的文件:

# Required: Set your home address (origin for trips)
HOME_ADDRESS=Times Square, New York, NY

# Optional: Default city code
DEFAULT_CITY=nyc

# Optional: Google Calendar ICS URL (private read-only feed)
# Get this from: Google Calendar → Settings → Your Calendar → Integrate Calendar → "Secret address in iCal format"
GOOGLE_CALENDAR_ICS_URL=https://calendar.google.com/calendar/ical/your_secret_hash/basic.ics

# Optional: Google Maps API Key (for live directions)
GOOGLE_MAPS_API_KEY=your_google_maps_api_key_here

# Optional: OpenWeather API Key (for weather forecasts)
OPENWEATHER_API_KEY=your_openweather_api_key_here

# Optional: MTA API Key (not required - MTA JSON feeds are public)
MTA_API_KEY=

# Optional: Mock mode (auto-enabled if API keys missing)
MOCK_MODE=false

# Optional: Request timeout in seconds
REQUEST_TIMEOUT_SECONDS=3.0

# Optional: Weather units (metric or imperial)
WEATHER_UNITS=metric

备注:服务器工作在 模拟模式 如果API密钥丢失,则提供确定性演示数据。这非常适合测试和演示。

步骤5:运行MCP服务器

用于stdio模式(由Claude Desktop使用):

python -m app.mcp_server

服务器将在stdin上等待JSON-RPC消息,并在stdout上响应。

对于REST API模式(可选):

uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload

______________________________________________________________________

🔌 连接到克劳德桌面

要将此MCP服务器与Claude Desktop一起使用:

  1. 找到Claude Desktop配置文件:

- 窗户: %APPDATA%\Claude\claude_desktop_config.json - 或者: C:\Users\\AppData\Roaming\Claude\claude_desktop_config.json

  1. 编辑或创建配置文件:
{
  "mcpServers": {
    "mobility": {
      "command": "D:\\Datathon\\.venv\\Scripts\\python.exe",
      "args": ["-m", "app.mcp_server"],
      "workingDirectory": "D:\\Datathon",
      "env": {
        "PYTHONPATH": "D:\\Datathon",
        "PYTHONUNBUFFERED": "1",
        "HOME_ADDRESS": "Times Square, New York, NY",
        "DEFAULT_CITY": "nyc",
        "MOCK_MODE": "false"
      }
    }
  }
}

重要:

  • 使用正斜杠或转义反斜杠(\\)在路径
  • PYTHONPATH 到您的项目根目录
  • PYTHONUNBUFFERED=1 用于正确的stdio通信
  • 在中添加所需的任何环境变量 env 章节
  1. 重新启动克劳德桌面 完全
  1. 克劳德测试:询问“我如何参加下一次会议?”或“使用提问工具帮助我规划路线”

______________________________________________________________________

🏗️ 建筑

app/
├── mcp_server.py          # MCP server entry point (stdio JSON-RPC)
├── main.py                # FastAPI REST API (optional)
├── config.py              # Settings and runtime state
├── models/
│   └── schemas.py         # Pydantic models (ContextPackage, etc.)
└── services/
    ├── calendar.py        # Google Calendar ICS integration
    ├── directions.py      # Google Maps Directions API
    ├── geocode.py         # Address geocoding (Google/Nominatim)
    ├── transit.py         # NYC MTA elevator/escalator outages
    ├── osm.py             # OpenStreetMap venue accessibility
    ├── weather.py         # OpenWeather API integration
    ├── fusion.py          # Route scoring and context fusion
    ├── formatter.py       # Context package building
    └── llm.py             # Gemini integration (optional)
└── utils/
    └── http.py           # Shared HTTP client with timeouts

数据流

  1. 输入:用户通过MCP工具询问“我如何参加下一次会议?”
  2. 日历:从ICS提要中获取下一个事件(标题、时间、位置)
  3. 地理编码:将位置文本解析为lat/lng坐标
  4. 并行数据获取:

- API指南→ 路线候选人 - MTA API→ 电梯/自动扶梯停运 - OSM天桥→ 场馆轮椅标签 - 开放天气→ 天气预报

  1. 融合:对路线进行评分,确定最佳选项,生成上下文项目符号
  2. 输出:带有亮点、备选方案和引用的结构化上下文包

关键设计决策

  • 模拟模式:API密钥丢失时的优雅降级(确定性演示数据)
  • 超时保护:所有HTTP请求都有可配置的超时(默认为3秒)
  • 引文链接:每条信息都包含用于验证的源链接
  • 缓冲时间:可配置的额外旅行时间(默认20分钟)
  • 错误处理:即使单个数据源发生故障,服务器也会继续处理

______________________________________________________________________

📊 上下文包结构

ContextPackage 返回的工具包括:

{
  "query_intent": "route_to_event",
  "sources_used": [
    "directions",
    "gtfs_rt_elevators",
    "osm_overpass",
    "openweather"
  ],
  "event": {
    "title": "Museum Visit",
    "start_time_iso": "2025-11-08T16:00:00-05:00",
    "location_text": "The Met, 1000 5th Ave, New York, NY"
  },
  "origin": {
    "label": "Home",
    "address": "Times Square, New York, NY"
  },
  "highlights": [
    {
      "type": "route_summary",
      "text": "Take Q train from Times Sq-42 St to 86 St (20 min)",
      "citations": ["https://www.google.com/maps/dir/..."]
    },
    {
      "type": "accessibility_alert",
      "text": "Elevator outage at 57th St station",
      "citations": ["https://api-endpoint.mta.info/..."]
    },
    {
      "type": "venue_access",
      "text": "The Met is wheelchair accessible",
      "citations": ["https://overpass-api.de/..."]
    },
    {
      "type": "weather_risk",
      "text": "Light rain expected around arrival time",
      "citations": ["https://api.openweathermap.org/..."]
    },
    {
      "type": "buffer_recommendation",
      "text": "Leave by 3:40 PM to arrive by 4:00 PM (20 min buffer)",
      "citations": []
    }
  ],
  "alternatives": [
    {
      "summary": "Alternative: Take 1 train to 96th St, then walk (25 min)",
      "citations": ["https://www.google.com/maps/dir/..."]
    }
  ],
  "raw_citations": [
    "https://www.google.com/maps/dir/...",
    "https://api-endpoint.mta.info/..."
  ]
}

______________________________________________________________________

🔑 API密钥(可选)

服务器在没有API密钥的情况下工作(模拟模式),但用于生产:

谷歌日历ICS URL

  • 如何获得:谷歌日历→ 设置→ 日历→ 集成日历→ 复制“iCal格式的秘密地址”
  • 为什么:自动获取您的下一个事件

谷歌地图API密钥

  • 如何获得: 谷歌云控制台 → 启用“方向API”→ 创建API密钥
  • 为什么:提供实时路线规划,包括交通、步行和驾驶选项

OpenWeather API密钥

  • 如何获得: 开放天气地图 → 注册→ 获取API密钥
  • 为什么:旅行时间前后的天气预报

MTA API密钥

  • 非必需:MTA JSON提要是公共的(不需要密钥)
  • 为什么:纽约市交通的实时电梯/自动扶梯停运数据

______________________________________________________________________

🧪 测试

手动测试(stdio模式)

MCP服务器通过stdio上的JSON-RPC进行通信。您可以手动测试它:

python -m app.mcp_server

然后发送JSON-RPC消息(服务器将响应)。

REST API测试(可选)

如果您运行FastAPI服务器:

uvicorn app.main:app --host 0.0.0.0 --port 8000

测试终点:

  • GET /health -健康检查
  • POST /config/home -设置家庭住址
  • POST /build_context -构建上下文包
  • GET /context/last -获取最后一个上下文包

______________________________________________________________________

🎯 用例

  1. 主动旅行计划:“我怎样才能参加下一次会议?”→ 带有可达性检查的自动路线规划
  2. 辅助功能警报:关于影响您路线的电梯停运的实时通知
  3. 场馆验证:出发前检查目的地是否适合轮椅通行
  4. 天气感知规划:知道天气是否会影响你的旅行
  5. 替代路线:如果您的主要路线有问题,请获取备份选项

______________________________________________________________________

📝 许可证

麻省理工学院

______________________________________________________________________

🤝 贡献

这是一个生产就绪的MCP服务器,用于可访问性感知的行程规划。代码库的结构便于扩展:

  • 增加新的交通系统(目前为纽约市MTA)
  • 整合其他数据源
  • 增强路线评分算法
  • 添加对其他日历提供程序的支持

______________________________________________________________________

🐛 故障排除

服务器无法启动

  • 检查Python版本: python --version (需要3.9+)
  • 验证依赖关系: pip list
  • 检查 PYTHONPATH 设置正确

工具在Claude中不起作用

  • 验证MCP服务器配置JSON语法
  • 检查克劳德桌面日志: %APPDATA%\Claude\Logs\
  • 确保 PYTHONUNBUFFERED=1 在配置中设置
  • 配置更改后重新启动Claude Desktop

未找到日历事件

  • 验证 GOOGLE_CALENDAR_ICS_URL 是正确的
  • 检查您的日历是否有即将举行的活动和地点
  • 如果ICS发生故障,服务器将回退到模拟事件

始终启用模拟模式

  • MOCK_MODE=false.env 或配置
  • 至少提供一个API密钥(建议使用谷歌地图)

______________________________________________________________________

📚 其他资源

______________________________________________________________________

🔮 未来改进

该MVP为无障碍出行规划提供了坚实的基础。未来可能的增强功能包括:

  • 扩大过境覆盖范围:支持纽约市大都会运输署以外的其他交通系统(例如,其他主要城市的交通API)
  • 增强的可访问性数据:与众包无障碍平台和特定场馆无障碍数据库集成
  • 个性化:用户对无障碍需求、首选交通方式和缓冲时间偏好的偏好配置文件
  • 高级路线智能:基于机器学习的路线评分和使用历史模式的预测性中断检测
  • 多日历支持:与其他日历提供商(Outlook、Apple calendar等)集成

这些改进将增强MCP服务器的功能,同时建立在当前可访问性优先的基础上。

目录标签

目录标签

PythonClaude位置天气无障碍出行本地部署智能导航残障辅助路线规划实时交通

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

api-key

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

2

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdioapi-key部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP