ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified productivity Safety 4/5

Mcporter Railway Query

Skill by lancenas

Why use this skill?

Efficiently query and track China Railway 12306 tickets using the Mcporter Railway Query skill. Search schedules, check availability, and plan trips easily.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/lancenas/mcporter-railway-query
Or

What This Skill Does

The Mcporter Railway Query skill is a powerful automation tool designed for travelers and commuters in China to interact with the 12306 railway ticketing system via the OpenClaw AI agent. It abstracts complex CLI commands into a simplified interface, allowing users to search for train schedules, check ticket availability, and filter results based on specific preferences such as train types (G/D series), departure windows, and sorting criteria. Whether you are planning a business trip from Shanghai to Hangzhou or commuting across regional lines, this skill automates the data retrieval process, providing real-time status updates directly in your chat interface.

Installation

To integrate this skill, ensure you have the OpenClaw environment configured. Use the following command in your terminal: clawhub install openclaw/skills/skills/lancenas/mcporter-railway-query. After installation, verify that the mcporter CLI is globally installed via npm. You must also establish a valid ~/.mcporter/mcporter.json configuration file, which serves as the bridge between your machine and the 12306 railway data servers. If the tool is not found, verify your environment path by running npm install -g mcporter.

Use Cases

This skill is perfect for scenarios where efficiency is key. Use it to:

  • Quickly verify if there are high-speed seats available for a last-minute trip.
  • Compare travel times between different train options during peak hours.
  • Automate the lookup of station codes for unfamiliar cities before booking.
  • Plan inter-city travel itineraries by narrowing down trains that fit within a preferred time block (e.g., afternoon departures).

Example Prompts

  • "Can you check if there are any high-speed trains from Shanghai Hong桥 to Hangzhou East on 2026-02-18 between 2 PM and 6 PM?"
  • "Help me find the station code for Nanjing South so I can look up tickets for next week."
  • "Show me all available trains from AOH to HZH for tomorrow, sorted by arrival time."

Tips & Limitations

  • Accuracy: Always verify station codes if the search returns no results, as minor typos in city names can lead to query failures. Use the get-station-code-of-citys tool if you are unsure.
  • Data Refresh: As ticket availability on 12306 changes rapidly, rely on the agent to perform real-time queries rather than caching results.
  • Filtering: Use the trainFilterFlags parameter effectively to reduce noise by focusing only on 'G' (High-speed) or 'D' (Dynamic) trains.
  • Limitations: This skill focuses on querying; it does not replace the official 12306 app for secure payment or official booking authentication. Use it as a discovery tool to streamline your booking workflow.

Metadata

Author@lancenas
Stars1656
Views0
Updated2026-02-28
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-lancenas-mcporter-railway-query": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#railway#travel#automation#china-transport#12306
Safety Score: 4/5

Flags: file-read, external-api, code-execution