Data as of
12306 MCP for Cursor: Setup & Config
12306 MCP lets Cursor search Chinese railway ticket availability and train routes.
What you can do with 12306 in Cursor
A focused 12306 search interface with station resolution, transfer queries, and stop-by-stop details.
- Resolve Chinese city and station names into station codes.
- Inspect a train's intermediate stops and timetable details.
Before you start: 12306 in Cursor
- Node.js and npx
- An MCP-compatible client
Uses the README's CLI-stdio example. HTTP operation is documented with a --port argument, and Docker build/run examples cover both modes. No required environment variables or minimum Node.js version are stated.
12306 Cursor configuration
Choose Cursor configuration scope
For 12306 MCP, open Project: .cursor/mcp.json User: ~/.cursor/mcp.json. Merge into mcpServers at project or user scope.
Add 12306 MCP to Cursor
Use the 12306-mcp entry below in mcpServers. Keep 12306 MCP's documented stdio connection fields and your other Cursor entries.
Check 12306 MCP in Cursor
12306 MCP: Enable in Cursor’s MCP settings; inspect tools.
Config file · Project: .cursor/mcp.json
User: ~/.cursor/mcp.json
{
"mcpServers": {
"12306-mcp": {
"command": "npx",
"args": [
"-y",
"12306-mcp"
],
"env": {}
}
}
}12306 tools available to Cursor
12306's stored tool list documents 8 tools; compare it with Cursor's connected tool list, because the stored list is not a live check.
- get-current-date
Find get-current-date under 12306 in Cursor's MCP settings; inspect its arguments when the agent requests a call.
- get-stations-code-in-city
Find get-stations-code-in-city under 12306 in Cursor's MCP settings; inspect its arguments when the agent requests a call.
- get-station-code-of-citys
Find get-station-code-of-citys under 12306 in Cursor's MCP settings; inspect its arguments when the agent requests a call.
- get-station-code-by-names
Find get-station-code-by-names under 12306 in Cursor's MCP settings; inspect its arguments when the agent requests a call.
- get-station-by-telecode
Find get-station-by-telecode under 12306 in Cursor's MCP settings; inspect its arguments when the agent requests a call.
Retrieve station details such as name, pinyin, and city from a telecode.
- get-tickets
Find get-tickets under 12306 in Cursor's MCP settings; inspect its arguments when the agent requests a call.
Query remaining ticket availability through 12306.
- get-interline-tickets
Find get-interline-tickets under 12306 in Cursor's MCP settings; inspect its arguments when the agent requests a call.
Query transfer-ticket availability, currently limited to the first ten results.
- get-train-route-stations
Find get-train-route-stations under 12306 in Cursor's MCP settings; inspect its arguments when the agent requests a call.
Inspect a train's stops, arrival and departure times, and dwell durations within an interval.
Troubleshooting 12306 in Cursor
- Cursor must find npx 12306-mcp (Node.js/npm) for 12306 MCP. Enable the project/user entry in MCP settings and inspect its tools.
- 12306 MCP uses stdio here: Cursor must keep the configured process running; protocol output belongs on stdout and diagnostics on stderr.
- Known limitation: The transfer query is limited to the first ten results.
- Known limitation: Booking and payment operations are not documented.
- Known limitation: The README frames the project as a learning tool.
- General Cursor troubleshooting lives in the /clients/cursor guide.
12306 MCP — details. Cursor guide