Skip to main content
skill CX Codex

mcp-server-12306 — Claude Code skill: what it does, how to install

Enables AI agents to query China Railway 12306 services. Checks real-time train availability, seat prices, schedules, and transfer routes.

no license 167 installs ★ 9 updated 2026-10-09

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add reason-machines/mcp-skills --skill mcp-server-12306 -a claude-code
Open on GitHub

What mcp-server-12306 does

This skill equips coding assistants with tools to interface with the China Railway 12306 booking system through Model Context Protocol. It guides models on formulating requests for train classes like G, D, K, T, and Z, checking remaining seat inventory, and translating station queries supplied in pinyin or Chinese characters.

The server implementation uses FastAPI to handle async queries. Tool definitions cover searching direct connections, planning trips with a single interchange, retrieving stop sequences with layover durations, and computing booking windows under the Asia/Shanghai timezone.

A functioning transport layer is necessary: either configure the stdio command with uvx in your client configuration or keep the HTTP daemon alive on http://localhost:8000/mcp. Without that running backend, the assistant cannot retrieve live schedule data.

What it helps with

  • search live train seat availability across Chinese rail stations
  • calculate ticket prices in CNY for specific carriage classes
  • find one-transfer train combinations between distant cities
  • resolve railway station telecodes using pinyin keywords
  • inspect complete stop lists and arrival timings for scheduled trains

Example prompts for the agent

  • Check available seats on trains from Beijing to Shanghai for 2025-06-15
  • Search transfer connections between Beijing and Guilin for adult tickets on 2025-06-20
  • Get all scheduled stop stations and timings for train G101

How to install mcp-server-12306

1Skills CLI (Vercel)

npx skills add reason-machines/mcp-skills --skill mcp-server-12306 -a claude-code

2Manually: put the files in place

~/.claude/skills/mcp-server-12306/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/mcp-server-12306/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about mcp-server-12306

How to install mcp-server-12306 in Claude Code?

Run npx skills add reason-machines/mcp-skills --skill mcp-server-12306 -a claude-code. The definition will be added to ~/.claude/skills/mcp-server-12306/SKILL.md.

What does mcp-server-12306 do?

It gives your agent access to China Railway 12306 endpoints to search train departures, seat pricing, transit transfers, and station records.

What infrastructure is needed to make queries work?

You must register the backend in your MCP settings via uvx mcp-server-12306 or spin up the Docker container drfccv/mcp-server-12306:latest mapped to port 8000.

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set98

The whole set →
mcp-server-bash-sdk mcp-server-bash-sdk guides you in building zero-runtime Model Context Protocol servers using pure Bash and jq instead of heavy runtimes. CX Codex +1 171installs codex-mcp-server-integration codex-mcp-server-integration — a skill that bridges OpenAI Codex CLI to Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode via MCP. Brings code analysis, generation, branch review, and web search into the editor. CX Codex +1 171installs remote-mcp-server-with-auth remote-mcp-server-with-auth is a Claude Code skill for building and deploying a Cloudflare Workers MCP server with GitHub OAuth and PostgreSQL. It supports role-based permissions. CX Codex +1 168installs postman-mcp-server Hooks your coding agent up to Postman over MCP: workspaces, collections, environments, request runs and client code generation. CX Codex +1 168installs quickbooks-online-mcp-server Connects coding assistants to a QuickBooks Online MCP server to handle bookkeeping entities and inspect accounting reports. CX Codex +1 166installs mcp-documentation-server The mcp-documentation-server skill indexes documents in a local database and searches by text or meaning. Use it to find relevant passages across files and retrieve their surrounding context. CX Codex +1 166installs monarch-money-mcp-server Runs a Monarch Money MCP server, so an agent can read accounts, transactions, budgets and categories and add new entries. CX Codex +1 161installs mcp-security-hub mcp-security-hub connects Dockerized security assessment utilities and scanners to your coding assistant via MCP. CX Codex +1 160installs

Project sponsors

Companies that keep this analytics open