12306 Train MCP server
{
"mcpServers": {
"12306-train": {
"type": "http",
"url": "https://mcp.pianam.cn/train-mcp/mcp"
}
}
}{
"mcpServers": {
"12306-train": {
"type": "http",
"url": "https://mcp.pianam.cn/train-mcp/mcp"
}
}
}{
"mcpServers": {
"12306-train": {
"type": "http",
"url": "https://mcp.pianam.cn/train-mcp/mcp"
}
}
}{
"servers": {
"12306-train": {
"type": "http",
"url": "https://mcp.pianam.cn/train-mcp/mcp"
}
}
}{
"mcpServers": {
"12306-train": {
"type": "http",
"url": "https://mcp.pianam.cn/train-mcp/mcp"
}
}
}file .mcp.json (in your project root)file claude_desktop_config.jsonfile ~/.cursor/mcp.jsonfile .vscode/mcp.jsonfile ~/.codeium/windsurf/mcp_config.jsonversion 1.0.0
What it does
Query train schedules and ticket availability on China Railway 12306 by Chinese station names and date. Returns departure/arrival times, duration, and remaining seats by class. Useful for travelers planning trips within China or checking seat availability.
- Check available trains and seat inventory between two Chinese cities for a specific date.
- Search for exact station names when you are unsure of the proper station code or spelling.
- Compare train classes and remaining seats to decide which service type to book via the official 12306 app or website.
Tools this server exposes
| Tool | Does |
|---|---|
| query_train_tickets | Query train schedules and remaining seats between two Chinese stations for a given date (defaults to tomorrow if not specified). |
| search_station | Fuzzy-search for exact Chinese station names by keyword to resolve ambiguous station references. |
Before you enable it
An MCP server runs with whatever access you give it. Start with a development account rather than production, and check which tools the server exposes before you let an agent call them unattended.