公共交通数据服务

一个基于Model Context Protocol (MCP)的服务,为大型语言模型(LLMs)提供维尔纽斯公共交通数据的实时访问能力,支持查询公交站点和路线信息。

  • by sarunasdaujotis
  • Python
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 sarunasdaujotis/vilnius-transport-mcp-server

使用说明

维尔纽斯交通MCP服务器

一种模型上下文协议(MCP)服务器实现,为大型语言模型(LLM)提供维尔纽斯公共交通数据访问功能。该项目演示了如何使用MCP标准通过实时传输数据扩展LLM功能。

这 模型上下文协议(MCP) 是一种标准,使大型语言模型(LLM)能够安全地访问外部工具和数据。MCP允许LLM:

该项目实施了一个MCP服务器,为LLM提供维尔纽斯公共交通数据工具,使他们能够回答有关公共交通站点和路线的查询。

服务器公开了以下MCP工具:

  • find_stops:按名称搜索公共交通站点
    {
      name: string;  // Full or partial name of the stop to search for
    }
    
  • find_closest_stop:查找距离给定坐标最近的公共交通站点
    { 
      coordinates: string;  // Format: "latitude, longitude" (e.g., "54.687157, 25.279652")
    }
    

要将MCP服务器添加到Claude开发环境中,请将以下配置添加到Claude_desktop_config.json文件中:

   {
    "mcpServers": {
      "vilnius_transport": {
        "command": "uv",
        "args": [
            "--directory",
            "path/vilnius-transport-mcp-server/src/vilnius_transport_mcp",
            "run",
            "transport.py"
        ]
      }
    }
   }

注意:请确保调整目录路径以匹配您的本地安装。

要运行客户端,请执行以下操作:

uv run client.py path/src/vilnius_transport_mcp/transport.py