Teaching your LLM to read Chinese train timetables
It wraps China's 12306 rail search in an MCP server so your model can look up trains, filters, and transfers instead of you.

What it does
This project is an MCP (Model Context Protocol) server that exposes 12306’s Chinese railway data as structured tools. An LLM client can query direct trains, filter results, check pass-through routes, and plan transfers by calling the server over stdio or HTTP. It essentially turns 12306 timetable data into a set of functions inside your context window.
The interesting bit
The value is in the mapping layer: it repackages 12306 ticket listings as discrete MCP tools that an LLM can reason about and call. The author also labels the project as strictly for learning, which is a refreshingly honest disclaimer for anything touching the 12306 ecosystem.
Key highlights
- Supports direct search, filtering, pass-through station lookup, and transfer queries
- Runs over stdio or HTTP, suitable for local or container deployment
- Built in TypeScript using the official MCP TypeScript SDK
- Includes architecture diagrams and a documented breakdown of service internals
- Explicitly marked as a learning project, not a commercial booking tool
Caveats
- Search and query only; the README never suggests booking or payment is supported
- Additional interfaces are listed as planned, so the surface area is still growing
Verdict
Worth exploring if you’re building Chinese travel assistants or experimenting with MCP tool-calling. Give it a pass if you need production booking flows or enterprise stability—the author openly calls it a learning exercise.
Frequently asked
- What is Joooook/12306-mcp?
- It wraps China's 12306 rail search in an MCP server so your model can look up trains, filters, and transfers instead of you.
- Is 12306-mcp open source?
- Yes — Joooook/12306-mcp is open source, released under the MIT license.
- What language is 12306-mcp written in?
- Joooook/12306-mcp is primarily written in JavaScript.
- How popular is 12306-mcp?
- Joooook/12306-mcp has 1.1k stars on GitHub and is currently holding steady.
- Where can I find 12306-mcp?
- Joooook/12306-mcp is on GitHub at https://github.com/Joooook/12306-mcp.