The 12306 MCP Server is an open-source Model Context Protocol server that lets AI assistants query China’s railway ticketing system. Released under the MIT license, it has gained close to 2,400 GitHub stars and remains under active development in 2026, turning train schedule lookups into tools any MCP-compatible agent can call.
12306 is the official China Railway booking platform, and its data โ which trains run between two cities, departure times, seat availability โ normally sits behind a consumer website and app. This server wraps those public query interfaces in the Model Context Protocol, so an assistant in clients such as Claude or Cursor can answer questions like “what trains go from Beijing to Shanghai tomorrow morning?” by calling structured tools instead of guessing. It handles the station codes, date handling and response parsing that the raw interfaces require.
The server is free and open source under the MIT license; it queries publicly available 12306 information and does not charge for lookups.
It is for developers building travel assistants and agent workflows for China rail journeys, and for MCP users who want their everyday assistant to answer real train timetable questions with live data.