MCP.so
登录
服务器

Mcp Server 12306

@drfccv

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

概览

What is MCP Server 12306?

MCP Server 12306 is a high-performance train ticket query service based on the Model Context Protocol (MCP). It supports real-time queries for 12306 ticket availability, prices, stations, stopovers, transfers, and intelligent time tools, designed for AI, automation, and intelligent assistant scenarios.

How to use MCP Server 12306?

Supports two operation modes: Stdio mode (recommended for Claude Desktop) and Streamable HTTP mode (for remote deployment). Stdio mode can be run via uvx or pipx; HTTP mode is started after pip installation with the [http] extra or via Docker. Client configuration for HTTP mode is http://localhost:8000/mcp.

Key features of MCP Server 12306

  • Real-time query of tickets, trains, seats, schedules, and transfers
  • Nationwide station management with fuzzy search
  • Full support for official stopover and transfer plans
  • Real-time fare query for each train
  • Smart time tools with timezone and timestamp support
  • Dual transport modes: Stdio | Streamable HTTP

Use cases of MCP Server 12306

  • Integrate into intelligent assistants for real-time train ticket and fare queries
  • Automate itinerary planning with transfer route suggestions
  • Fuzzy search and station information completion
  • Query train stopovers and timetables
  • Assist date selection based on current time

FAQ from MCP Server 12306

What transport modes does MCP Server 12306 support?

It supports Stdio mode (for local MCP clients like Claude Desktop) and Streamable HTTP mode (for remote access via SSE/POST).

What are the runtime requirements?

Python 3.10+; HTTP mode requires FastAPI/uvicorn (install with pip install mcp-server-12306[http]); also available via Docker.

Where does the station data come from?

The project does not store 12306 data; it only aggregates and forwards the official public interface. Static station resources are stored in the resources/ directory.

Is MCP Server 12306 free and open-source?

Yes, the project is licensed under MIT License, but commercial use is strictly prohibited. Users must comply with Chinese laws and 12306 regulations.

How to configure MCP Server 12306 for Claude Desktop?

Add the following to your Claude Desktop MCP configuration: for uvx, set command to "uvx" and args to `["mcp-server-123

来自「其他」的更多内容