# Train Tickets

Trains in China through the 12306 MCP server: routes, dates, options, connections and...

- Repository: https://github.com/nano-muse/nanoMuse (2980 stars)
- Category: AI and agents
- License: GPL-3.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add nano-muse/nanoMuse --skill train-tickets -g -a claude-code -y`
Codex: `npx skills add nano-muse/nanoMuse --skill train-tickets -g -a codex -y`
Cursor: `npx skills add nano-muse/nanoMuse --skill train-tickets -g -a cursor -y`
Gemini CLI: `npx skills add nano-muse/nanoMuse --skill train-tickets -g -a gemini-cli -y`

## Description

Trains in China through the 12306 MCP server: routes, dates, options, connections and stops with no screen; booking only on the user's word, in the 12306 app on their phone, stopping before payment. Use when the user asks about 火车票 / 高铁 / 12306 or a train between two cities.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Train tickets (12306)

Two hands, in this order. **Searching** is done with the `12306__*` tools, a community MCP server ([12306-mcp](https://github.com/Joooook/12306-mcp)) that reads 12306's public timetable and seat counts; no login, no browser, no phone, nothing typed into an app. **Booking** has no API a personal agent may use; it happens on the phone's screen with `phone_task`, and only when the user has picked a train and said to book it.

## Is the server there?

Look for `12306__get-tickets` in your tools (the tools list is the only place it can be: no shell command or script to check). If it is not there, say so in one line, give the user the lines to add to `config.toml`, and, when a phone is connected, offer the search on the phone's screen instead (the old way, below); otherwise stop:

```toml
[[mcp.servers]]
name = "12306"
command = "npx"
args = ["-y", "12306-mcp"]
risk = "safe"
egress = true
```

Node is needed for `npx`; the phone's own runtime has it.

## What you need

- From, to, the date, and whether it must be 高铁/动车 (G/D) or any train. The user's habits from `recall` (preferred stations, morning or evening, seat class, who travels) count as answers. Ask for the rest with **one** `ask_user` call.
- Passengers, seat class and budget only matter for booking; do not ask for them to run a search.

## Searching

The rest: https://github.com/nano-muse/nanoMuse/blob/HEAD/nanomuse/skills/builtin/train-tickets/SKILL.md
