train-tickets
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
Install / Use
npx skills add nano-muse/nanoMuse --skill train-ticketsInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
MarketingSupported Platforms
Our assessment of train-tickets
train-tickets scores 85/100 on our quality scale, 423rd of 560 Marketing skills we index.
Its SKILL.md is 5.4 KB long, well organised into 8 sections with 1 code example: a solid amount of guidance for an agent.
With 1,454 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 7 days ago, so train-tickets is actively maintained.
- It is released under GPL-3.0, a copyleft license: you can use it, but modified versions you distribute must carry the same license.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
train-tickets compared with similar skills
All 4 of these similar skills score higher than train-tickets; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| train-tickets (this skill)by nano-muse | 85 | 1.5k | 7d ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 101.9k | today | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 77.7k | today | CLAUDE.md |
| CowAgentby zhayujie | 100 | 47.6k | today | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 89.6k | 2d ago | MCP Server |
Frequently asked questions
- How do I install train-tickets?
- Run
npx skills add nano-muse/nanoMuse --skill train-tickets. The install tabs above show the steps for each supported agent. - Which AI agents does train-tickets work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is train-tickets safe to use?
- It is GPL-3.0-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is train-tickets still maintained?
- The repository was last updated 7 days ago, so train-tickets is actively maintained.
Skill content
View source on GitHubname: train-tickets 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. channel: mixed metadata: author: nanoMuse version: "2"
Train tickets (12306)
Two hands, in this order. Searching is done with the 12306__* tools, a community MCP server (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:
[[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 oneask_usercall. - Passengers, seat class and budget only matter for booking; do not ask for them to run a search.
Searching
12306__get-current-datefirst whenever the user said 明天 / 后天 / 下周三; the server's date is the one that counts, not yours.12306__get-station-code-of-cityswithcitys=北京|上海gives the code that stands for a whole city (every station in it). A specific station (北京南,上海虹桥):12306__get-station-code-by-names. All the stations of a city:12306__get-stations-code-in-city.12306__get-ticketswithdate,fromStation,toStation(names or codes), and the filters that fit:trainFilterFlags(G高铁/城际,D动车,GDboth,Z/T/Kthe slow ones,F复兴号),earliestStartTime/latestStartTime(hours, 0–24),sortFlag(startTime,arriveTime,duration),limitedNum(ask for 5–8, not the whole day). One call; a second only if the first came back empty (widen the hours or drop the flag).- No direct train:
12306__get-interline-ticketswith the same arguments,middleStationoptional: the first ten connections. Where a train stops and when:12306__get-train-route-stationswithtrainCodeanddepartDate.
Then, in your own words, the options that fit, three at most: 车次, 出发站 and time, 到达站 and time, 历时, the seat the user wants with its price and whether there are seats left (剩余 N 张 / 有 / 无). Say which you would take and why (earliest, shortest, cheapest that still has seats). Seat counts move by the minute; say so when the number is small.
Booking
Only when the user has picked a train and said to book it, and only with a phone connected (the system prompt says whether one is). Without a phone, say the train, date and price and that the booking is theirs to make in the app; offer a reminder for when sales open or a calendar entry.
phone_task,app=铁路12306: open the chosen train on the chosen date, pick the seat class and the passengers the user named, and stop on the order confirmation screen; read back the train, date, passengers, seats, total. The goal must say: 停在提交订单页,不要点「提交订单」或任何支付按钮。- Show the user that summary and ask whether to place the order. Only with a yes, one more
phone_taskfor 提交订单; Sentinel will ask the user again for that tap; that is expected, not an error. Payment (支付) is the user's: say the order is placed and waiting to be paid in the app, and stop. - Never enter a password, a verification code or an ID number; when the app asks for one, stop with what the screen says and let the user do it.
Searching on the screen (fallback)
Only when the server is not configured and a phone is connected. One phone_task, app = 铁路12306, with a goal like:
在 12306 首页把出发地设为「北京」、目的地设为「上海」、日期设为 9月25日,点「查询车票」。在结果页读出按发车时间最早的前 5 班:车次、发车站和发车时间、到达站和到达时间、历时、二等座价格和余票。只查询,不要点任何车次进入下单。
Rules for the operator you can put in context: the left station is 出发, the right one 到达, the swap icon sits between them; the date is picked on a calendar page; 筛选 / 只看高铁 narrow the list; the results list scrolls. Prices on the list page are the lowest class ("¥xxx 起"); say so.
With the other hands
- 12306 + 高德: the route to the station at that hour (the
amapskill) and the train make one plan: leave home at 07:10, G1 at 08:00. - 12306 + 飞书 / 腾讯会议: the train that fits a meeting's time; the chosen 车次 and times go to the colleague or the group through lark-cli, once the user approves the text.
- 12306 + the calendar and reminders: an event for the departure (station, 车次, seat), a reminder to pay within the app's time limit after 提交订单.
Finish
- Reply with the trains or the order in a few lines: train, date, times, price, state (查询 / 已提交待支付). Save nothing unless asked; if the user wants it kept,
trips/<route>-<date>.mdin the workspace. rememberthe stations and times the user keeps choosing, so the next search needs no question.
Related Skills
Agent-Reach
101.9kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
77.7kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
CowAgent
47.6kOpen-source personal AI assistant & Agent Harness. Plans tasks, runs tools and skills, self-evolves with memory and knowledge. Multi-agent, multi-model, multi-channel. Lightweight, extensible, one-line install.
Scrapling
89.6k🕷️ A Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
