MCP Directory
Back

mcp-server-12306

by drfccv · Python · ★ 320

12306 MCP Server​​ 是一个基于 ​​Model Context Protocol (MCP)​​ 的高性能火车票查询后端系统。它通过标准化接口提供官方 12306 的实时数据服务,包括余票查询、车站信息、列车经停站、中转换乘方案等核心功能。

#12306#mcp-server

Install

pip install git+https://github.com/drfccv/mcp-server-12306.git

Claude Desktop config

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "mcp-server-12306": {
      "command": "uvx",
      "args": [
        "git+https://github.com/drfccv/mcp-server-12306.git"
      ]
    }
  }
}

From the README

- 实时余票/车次/座席/时刻/换乘一站式查询 - 全国车站信息管理与模糊搜索 - 官方经停站、一次中转方案全支持 - 实时查询各车次票价信息 - 智能时间工具,支持时区和时间戳 - Streamable HTTP/STDIO传输协议,支持MCP 2025-03-26标准 - FastAPI异步高性能,秒级响应 - MCP标准,AI/自动化场景即插即用 --- 本项目支持两种运行模式: 1. **Stdio 模式**:适用于 Claude Desktop 等本地 MCP 客户端(推荐)。 2. **Streamable HTTP 模式**:适用于远程部署或通过 SSE/Post 访问。 --- 在此模式下,MCP Server 通过标准输入/输出与客户端通信,无需占用网络端口。 是 包管理器提供的工具,环境隔离且启动极快。 如果您更习惯使用 pipx: 适用于开发者调试: --- 在此模式下,Server 启动一个 Web 服务(默认 8000 端口),支持 MCP 的 SSE(Server-Sent Events)和 POST 交互。 **MCP 客户端配置:** --- | 工具名 | 典型场景/功能描述 | |--------------------------|--------…
Read full README on GitHub →

💡 Need a managed MCP host?

Try Claude Pro for the smoothest MCP experience, or browse our cloud-hosted servers.

Related other servers