mcporter-railway-queryQuery and book Chinese railway tickets via 12306 using mcporter CLI. Use when user wants to search for G/D/C train tickets, check train schedules, query seat...
Install via ClawdBot CLI:
clawdbot install Lancenas/mcporter-railway-query使用 mcporter 命令行工具查询 12306 中国铁路车票信息。
# 查询下午班次 (12:00-18:00)
./scripts/query-afternoon.sh 2026-02-18 SHH KYH
# 查询全天班次
./scripts/query-tickets.sh 2026-02-18 AOH HZH
# 查询车站代码
./scripts/get-station-code.sh "上海虹桥"
# 基础查询
mcporter call 12306.get-tickets \
date="2026-02-18" \
fromStation="AOH" \
toStation="HZH" \
trainFilterFlags="GD" \
--config ~/.mcporter/mcporter.json
# 下午班次
mcporter call 12306.get-tickets \
date="2026-02-18" \
fromStation="AOH" \
toStation="HZH" \
trainFilterFlags="GD" \
earliestStartTime=12 \
latestStartTime=18 \
sortFlag="startTime" \
--config ~/.mcporter/mcporter.json
不知道车站代码时:
mcporter call 12306.get-station-code-of-citys \
citys="上海|杭州" \
--config ~/.mcporter/mcporter.json
或查看参考表 station-codes.md
mcporter call 12306.get-tickets \
date="YYYY-MM-DD" \
fromStation="出发站代码" \
toStation="到达站代码" \
[可选过滤参数] \
--config ~/.mcporter/mcporter.json
| 参数 | 类型 | 默认值 | 说明 |
|------|------|--------|------|
| date | string | 必填 | 日期格式 YYYY-MM-DD |
| fromStation | string | 必填 | 出发站代码 (如 SHH) |
| toStation | string | 必填 | 到达站代码 (如 KYH) |
| trainFilterFlags | string | "" | G=高铁, D=动车, GD=高铁+动车 |
| earliestStartTime | number | 0 | 最早出发时间 (0-24) |
| latestStartTime | number | 24 | 最晚出发时间 (0-24) |
| sortFlag | string | "" | startTime/arriveTime/duration |
| sortReverse | boolean | false | 是否倒序 |
| limitedNum | number | 0 | 限制结果数量 |
| format | string | text | text/json/csv |
| 城市 | 代码 | 城市 | 代码 |
|------|------|------|------|
| 上海 | SHH | 上海虹桥 | AOH |
| 杭州东 | HZH | 无锡 | WXH |
| 江阴 | KYH | 南京南 | NKH |
完整列表见 station-codes.md
npm install -g mcporter
创建 ~/.mcporter/mcporter.json 配置文件。
更多查询示例见 query-examples.md
Generated Mar 1, 2026
Corporate travelers use the skill to quickly search for high-speed train tickets (G/D trains) between major Chinese cities like Shanghai and Hangzhou. They filter by afternoon departure times (12:00-18:00) to align with meeting schedules and sort results by start time for efficiency. This helps professionals book optimal routes without manual website navigation.
Tour operators or individual tourists leverage the skill to plan multi-city rail journeys across China, such as from Shanghai to Nanjing. They query available seats, check train schedules, and use station code lookups (e.g., via get-station-code.sh) to ensure accurate bookings. This streamlines itinerary design for popular tourist destinations.
Logistics firms utilize the skill to monitor train availability for shipping goods or personnel between industrial hubs like Wuxi and Jiangyin. They filter by train types and time ranges to coordinate timely departures, with output in JSON or CSV format for integration into supply chain systems. This aids in optimizing transport routes and reducing delays.
Event organizers book bulk train tickets for attendees traveling to conferences or festivals in cities like Hangzhou. They use parameters like limitedNum to cap results and sortFlag to prioritize early arrivals, ensuring smooth attendee logistics. This automates group travel arrangements for large-scale events.
Researchers analyze rail traffic patterns by querying ticket availability and schedules between stations over specific dates. They employ format=json for data extraction and use filtering to study peak travel times or train type distributions. This supports studies in urban planning or transportation economics.
Offer a cloud-based platform where travel agencies subscribe to access enhanced mcporter CLI features, such as batch queries and API integrations. Revenue is generated through monthly or annual fees based on usage tiers, targeting agencies that book frequent rail tickets for clients.
Provide the core mcporter skill for free to individual users, while charging for premium support services like custom configuration, troubleshooting, and advanced filtering options. Revenue comes from one-time support fees or retainer contracts for businesses needing reliable rail query assistance.
License aggregated query data (e.g., ticket availability trends, station usage) to transportation companies or market researchers. Revenue is generated through data licensing agreements, where clients pay for access to insights derived from mcporter usage, helping them optimize routes or pricing strategies.
💬 Integration Tip
Integrate with existing travel management systems by using the JSON output format for automated data parsing, and ensure mcporter.json is correctly configured to avoid common errors like missing station codes.
Automate Xiaohongshu (RedNote) content operations using a Python client for the xiaohongshu-mcp server. Use for: (1) Publishing image, text, and video content, (2) Searching for notes and trends, (3) Analyzing post details and comments, (4) Managing user profiles and content feeds. Triggers: xiaohongshu automation, rednote content, publish to xiaohongshu, xiaohongshu search, social media management.
Feishu-integrated wrapper for the capability-evolver. Manages the evolution loop lifecycle (start/stop/ensure), sends rich Feishu card reports, and provides...
The Baidu Baike Component is a knowledge service tool designed to query authoritative encyclopedia explanations for various nouns. Its core function is given a specific "noun" (object, person, location, concept, event, etc.) provided by the user, it returns a standardized, detailed entry explanation sourced from Baidu Baike.
Draft and publish posts to 小红书 (Xiaohongshu/RED). Use when creating content for 小红书, drafting posts, generating cover images, or publishing via browser automation. Covers the full workflow from content creation to browser-based publishing, including cover image generation with Pillow.
AI-assisted creation, rendering, and automated publishing of Xiaohongshu-style content with support for Markdown to image cards and data tracking.
小红书全能助手 — 文案生成、封面制作、内容发布与管理。当用户要求写小红书笔记、生成小红书文案/标题/封面、发小红书、搜索小红书、评论点赞收藏等任何小红书相关操作时使用。支持一站式从文案创作到自动发布的完整流程。封面AI生图需配置可选环境变量(GEMINI_API_KEY 或 IMG_API_KEY 或 HUNY...