Back to MCP directory
publicPublicdnsLocal runtime

Vilnius Transport

维尔纽斯公共交通MCP服务器项目,通过MCP协议为大型语言模型提供实时交通数据访问能力。

article

README

🚀 维尔纽斯交通 MCP 服务器

本项目实现了一个 Model Context Protocol (MCP) 服务器,旨在为大型语言模型(LLMs)提供维尔纽斯公共交通数据的访问能力,让 LLMs 可以获取实时公交信息。它充分展示了如何借助 MCP 标准来扩展 LLM 的功能。

Model Context Protocol (MCP) 是一项重要标准,它允许大型语言模型(LLMs)安全地访问外部工具和数据。通过 MCP,LLMs 能够实现以下功能:

  • 访问实时或本地数据
  • 调用外部函数
  • 与系统资源交互
  • 维持一致的工具接口

本项目所实现的 MCP 服务器,为大型语言模型提供了维尔纽斯公共交通数据工具,从而使模型能够回答有关公交站点和线路的问题。

🚀 快速开始

📦 安装与配置

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

{
    "mcpServers": {
        "vilnius_transport": {
            "command": "uv",
            "args": [
                "--directory",
                "path/维尔纽斯-交通-MCP-服务器/src/vilnius_transport_mcp",
                "运行",
                "transport.py"
            ]
        }
    }
}

⚠️ 重要提示

请调整目录路径以匹配您的本地安装。

💻 使用示例

基础用法

本服务器提供了以下 MCP 工具:

  • find_stops:按名称搜索公共交点
{
    "name": string; // 站点的全名或部分名称
}
  • find_closest_stop:根据给定坐标查找最近的公共交通站点
{ 
    "coordinates": string; // 格式:"纬度, 经度"(例如:"54.687157, 25.279652")
}

运行客户端

要运行客户端,请使用以下命令:

uv 运行 client.py path/src/vilnius_transport_mcp/transport.py
help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client