12306 MCP Server

12306 MCP Server

โ˜… 3.8 ๐Ÿ”– 1200 saves ๐Ÿ’ฐ Free GitHub

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.

Overview

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.

Key Features

  • Exposes 12306 train data as standard MCP tools for AI agents
  • Search trains between stations with dates and train-type filters
  • Returns schedules, durations and available seat classes
  • Resolves station names to the codes the 12306 system requires
  • Works with MCP clients including Claude Desktop and Cursor
  • Lightweight server that is simple to run locally

๐Ÿ’ณ Pricing

The server is free and open source under the MIT license; it queries publicly available 12306 information and does not charge for lookups.

Who Is It For

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.

๐Ÿš€ Visit 12306 MCP Server Official Site

๐Ÿšฉ Report an issue