地铁列车到站查询服务

一个基于纽约市地铁系统的简单模型上下文协议(MCP)服务器,提供给定车站和方向的下一班列车到达信息。

  • by nkasmanoff
  • Python
  • 本地部署
  • 3 星标
  • 更新于
在 GitHub 查看 nkasmanoff/mta-mcp

使用说明

MTA MCP服务器

这是一个简单的模型上下文协议(MCP)服务器,它使用纽约市的MTA地铁系统提供有关下一列列车到达给定车站和方向的信息。

下一步:

  • 整合位置?
  • 使用不同的行和拼写问题进行更多测试

如何跑步

要开始,请按照 MCP文件.

uv run subway.py

接下来,将以下内容添加到您的.cursor/mcp.json文件中:

{
    "mcpServers": {
        "mta_subway_tracker": {
            "command": "uv",
            "args": ["--directory", "<path to your project>", "run", "subway.py"]
        }
    }
}

示例问题:

When is the next express south train arriving at 14th street?

答案:

Okay, I can help you with that. I'll check for the next southbound train at 14th St-Union Sq using the feed for lines 1, 2, 3, 4, 5, and 6.


Ran tool
The next express southbound trains arriving at 14th St-Union Sq are:
- 4 train at 15:52:41
- 5 train at 15:56:24

There are also local 6 trains arriving, the next one is at 15:46:27.

由...创建 乔纳森·艾伦 和 诺亚·卡斯曼诺夫