What is this?
12306-mcp is a Model Context Protocol (MCP) server that lets AI models search train tickets on China's 12306 railway booking system through a simple API.
Is this a standalone app or a server I plug into my AI assistant?
It is an MCP server: you run it and connect it to an MCP-compatible AI client (like Claude or another LLM tool) which then calls its API to search tickets.
How do I get it running?
You can run it directly via CLI in stdio or HTTP mode, or use the provided Docker setup (Docker-stdio or Docker-http), then point your MCP client config at it.
What do I need installed to run it?
You need Node.js 18 or newer; running the debug command with MCP Inspector 2.0.0 requires Node.js 22.19.0 or newer.
Is this ready for real ticket purchases, or just for learning?
The author states the project is only for learning purposes, not an officially sanctioned or guaranteed production booking tool.
Who would use this?
Developers building AI agents or chatbots that need to look up Chinese train schedules and ticket availability without manually browsing the 12306 website.
What kind of ticket queries does it support?
It supports standard 12306 ticket search, filtering trains by criteria, querying stops along a route, and transit/interchange route queries.
Do I need a 12306 account or API key to use it?
The README doesn't mention needing a 12306 account or API key — it just requires running the server and connecting an MCP client.
Are more features planned?
Yes, the README lists additional interfaces as planned ('计划内') and invites users to request features.
What are similar projects?
bb-browser, Baize, craft-agents-oss, executor, overmind, gemini-notebook-mcp-cli, XActions, davinci-resolve-mcp
Which topics is it in?
node, model-context-protocol, china, command-line, mcp-server, ai-agent, mcp, api, terminal, chinese, automation, ai-agents

