MCP Server 12306
An MCP server that queries China's official 12306 railway system for ticket availability, fares, station information, stops, and transfer routes, for use by AI assistants and automation scripts.
MCP Server 12306 is a Model Context Protocol server that provides train ticket data from China's official 12306 railway booking system. It supports queries for ticket availability by train, seat class, and time, fares by seat class, fuzzy station search by Chinese name, pinyin, or station code across thousands of stations, stop and arrival or departure times for a given train, automatically paginated transfer routes, and current time or relative date calculations to help pick a travel date.
It supports both stdio transport for local MCP clients such as Claude Desktop or Cursor, and a Streamable HTTP transport for remote deployment, with automatic negotiation between MCP protocol versions. The HTTP mode exposes health, tool-schema, and service-info endpoints alongside the MCP endpoint itself.
It installs with a Python package manager or runs as a Docker container, and is written in Python under the MIT license.