World Monitor
Real-time global intelligence on conflict, markets, energy, trade, shipping and cyber. 100 tools.
MCP server for China Railway 12306 ticket availability: schedules and seats by Chinese station name.
此项在“连接 AI 的应用”标签中,该标签不使用星标,按以下顺序排列
| 1. 在 Claude 连接器目录中 | 否 | |
|---|---|---|
| 2. 团队实测过 | 否 | |
| 3. 适合泰国用户 | 否 | |
| 4. 不计星标的使用量 | 15/100 | 热度 0 · 新鲜度 7 · 仍在响应 8 · 用户喜欢 +0 |
| 5. 登记日期 | 2026-09-03 |
用户喜欢: 0 · 最多加 5 分(每人 1 分),不能用钱买。
质量: 基础检查通过 4/5 项(仅展示,不用于排序)
选择你使用的 AI 应用,然后复制设置。
用一句话让 AI 帮你安装
请帮我安装 China 12306 Train Tickets MCP。按照 https://mcp.popnx.com/i/cn-pianam-12306-train-mcp.md 操作,先把命令给我看,等我同意后再运行。粘贴到能在你电脑上工作的 AI(如 Claude Code、Cursor)。它会读取我们的步骤,先给你看命令,等你同意。无需密钥,无需注册。 · 查看 AI 会读取的全文
通过 4/5 项检查 · 你的提问会经过开发者的服务器(mcp.pianam.cn) · ✓ 命令已检查 2026年11月13日
第一步:你用哪个 AI?
选择你用的应用,步骤会显示在下方。
可连接 Claude · 约 2 分钟
不需要密钥,不用安装程序 · 在 claude.ai 或桌面应用设置一次,即可在聊天中使用 · 免费账户可添加 1 个 · Team/Enterprise 方案由所有者(Owner)添加
CustomizeConnectors
把这里的内容复制到 Claude 中同名的输入框,然后点击 Continue
China 12306 Train Tickets MCPhttps://mcp.pianam.cn/train-mcp/mcp在 Claude 检测到的登录设置页点击 Continue · Authentication 按作者说明选择(Sign in now、Sign in when needed 或 No sign in),然后点击 Add
+ConnectorsChina 12306 Train Tickets MCP
用 China 12306 Train Tickets MCP 告诉我你能帮我做什么,然后做一件给我看✓ 如果 Claude 说正在使用 China 12306 Train Tickets MCP,或回答中出现 China 12306 Train Tickets MCP 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 Anthropic 帮助页面核实 · 你的界面可能因版本略有不同
能否连接 ChatGPT 取决于方案
完整 MCP:网页版 ChatGPT Business、Enterprise 或 Edu · Pro:以读取/获取权限连接,修改数据的工具可能用不了 · Plus:官方文档尚未确认,如果在插件页看到添加自定义 MCP 的选项可以试试 · 仅限网页
Plugins+Add custom MCP server
输入名称,在 Connection 下粘贴地址,勾选风险提示,然后点击 Create as a plugin
China 12306 Train Tickets MCPhttps://mcp.pianam.cn/train-mcp/mcp开启新聊天,输入前先从插件列表中选择 China 12306 Train Tickets MCP
用 China 12306 Train Tickets MCP 告诉我你能帮我做什么,然后做一件给我看✓ 如果 ChatGPT 说正在使用 China 12306 Train Tickets MCP,或回答中出现 China 12306 Train Tickets MCP 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 OpenAI 帮助页面核实 · 你的界面可能因版本略有不同
可连接 Claude Code · 约 2 分钟
不需要密钥,不用安装程序
Mac:按 Command+空格,输入 Terminal · Windows:打开 PowerShell
claude mcp add --transport http --scope user 12306-train https://mcp.pianam.cn/train-mcp/mcp应能看到 China 12306 Train Tickets MCP 在列表中并显示已连接
用 China 12306 Train Tickets MCP 告诉我你能帮我做什么,然后做一件给我看✓ 如果 Claude Code 说正在使用 China 12306 Train Tickets MCP,或回答中出现 China 12306 Train Tickets MCP 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 Anthropic 帮助页面核实 · 你的界面可能因版本略有不同
可连接 Cursor · 约 2 分钟
不需要密钥,不用安装程序
用 China 12306 Train Tickets MCP 告诉我你能帮我做什么,然后做一件给我看✓ 如果 Cursor 说正在使用 China 12306 Train Tickets MCP,或回答中出现 China 12306 Train Tickets MCP 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 Cursor 帮助页面核实 · 你的界面可能因版本略有不同
可连接 VS Code · 约 2 分钟
不需要密钥,不用安装程序
用 China 12306 Train Tickets MCP 告诉我你能帮我做什么,然后做一件给我看✓ 如果 VS Code 说正在使用 China 12306 Train Tickets MCP,或回答中出现 China 12306 Train Tickets MCP 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 VS Code 帮助页面核实 · 你的界面可能因版本略有不同
其他支持 MCP 的应用(如 Windsurf、Zed、Gemini CLI)添加方式各不相同,请在应用列表中查看
通过网页连接的应用使用的地址
https://mcp.pianam.cn/train-mcp/mcpJSON 设置在下方“开发者专用”中
Claude Code
claude mcp add --transport http --scope user 12306-train https://mcp.pianam.cn/train-mcp/mcpCursor (~/.cursor/mcp.json)
{
"mcpServers": {
"12306-train": {
"url": "https://mcp.pianam.cn/train-mcp/mcp"
}
}
}VS Code (mcp.json)
{
"servers": {
"12306-train": {
"type": "http",
"url": "https://mcp.pianam.cn/train-mcp/mcp"
}
}
}这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
依据这个服务器的连接方式和各应用自己的文档,检查于 2026年11月10日。
通过互联网连接,适用于
ClaudeChatGPTGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatOpen WebUIRaycast
工具名称和描述与服务器在 2026年11月15日 报告的完全一致。这些内容由作者撰写,不是我们写的;我们以纯文本形式显示。
query_train_tickets查询中国大陆12306火车票余票信息。参数from_city出发城市/车站中文名,to_city到达城市/车站中文名,date出发日期格式YYYY-MM-DD;留空默认明天。
search_station按关键词搜索12306车站名称,返回匹配的车站中文名列表。不确定城市有哪些车站时使用。
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月19日
发布者(mcp.pianam.cn)不是仓库所有者(boy-373);可能是其他人代为上架的
代码最后更新于2个月前
使用 MIT
在 496 毫秒内响应(HTTP 200)
无需登录
已读取 2 个工具描述,未发现针对 AI 的隐藏指令
如果你是作者,可把这段代码贴到 README。徽章会链接回本页。
[](https://mcp.popnx.com/en/servers/cn-pianam-12306-train-mcp)提问、分享技巧或报告无法使用。按“有帮助”数量排序。
还没有评价
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
它在 5 项适用的基础检查中通过了 4 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。
它在作者的云端运行。通过互联网连接,无需安装,但你发送的内容会经过作者的服务器。
GitHub 仓库最后更新于2个月前,最新版本(1.0.0)于3个月前进入注册中心。
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。它通过 URL 连接,因此也能用于接受远程 MCP 的应用,例如网页版 ChatGPT(Business 及以上为完整 MCP;Pro 为只读)。
同一分类中有:World Monitor, openstatus, Oh My Posh Validator, Strata, Jitsu
同一分类、其他作者、命令已通过检查。官方的排在前面,再按星标排序。
如何看卡片:↓ 每周下载量i★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
Real-time global intelligence on conflict, markets, energy, trade, shipping and cyber. 100 tools.
Manage monitors, status pages, incidents and maintenances in your openstatus workspace.
Validate oh-my-posh configurations and segment snippets against the official schema.
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Manage Jitsu data pipelines: destinations, streams, connections, functions, live events.
| 本项 China 12306 Train Tickets MCP | World Monitor | openstatus | Oh My Posh Validator | Strata | Jitsu | |
|---|---|---|---|---|---|---|
| 运行位置 | 在云端运行,无需安装 | 在云端运行,无需安装 | 在云端运行,无需安装 | 在云端运行,无需安装 | 在云端运行,无需安装 | 在云端运行,无需安装 |
| 需要密钥 | 否 | 否 | 否 | 否 | 否 | 否 |
| 可在 Claude 中按 + 添加 | 否 | 否 | 否 | 否 | 否 | 否 |
| 基础检查 | 4/5 | 4/4 | 4/4 | 4/4 | 1/4 | 4/4 |
| 许可证 | MIT | AGPL-3.0 | AGPL-3.0 | MIT | Apache-2.0 | MIT |
| 价格 | 登记中未列出费用 | 登记中未列出费用 | 登记中未列出费用 | 登记中未列出费用 | 登记中未列出费用 | 登记中未列出费用 |
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
Query China Railway 12306 ticket availability from any MCP client — train schedules and remaining seats by Chinese station name and date. Read-only, no booking, no account.
https://mcp.pianam.cn/train-mcp/mcp
Transport: Streamable HTTP (MCP 2025-03-26 compatible). No authentication required.
Add this to your MCP client's mcpServers configuration (Claude Desktop claude_desktop_config.json, Cursor mcp.json, Cline, Cherry Studio, etc.):
{
"mcpServers": { "12306-train": { "type": "http", "url": "https://mcp.pianam.cn/train-mcp/mcp" } } }
Clients that do not accept
"type": "http"(some Cherry Studio / older
Cline versions) accept the same entry with just
"url".
| Tool | Parameters | Returns |
|---|
| query_train_tickets(from_city, to_city, date="") | from_city / to_city: Chinese city or station names, e.g. "青岛", "北京南". date: YYYY-MM-DD; empty defaults to tomorrow. 12306's booking window is usually 15 days. | Train list with train number, departure/arrival stations & times, duration, and remaining seats per class (business/first/second class, soft/hard sleeper, hard seat, no-seat). | | search_station(keyword) | keyword: e.g. "北京". | Fuzzy-matches station names (returns up to 30: 北京, 北京南, 北京西, 北京北 …) when you are not sure which station to use. |
kyfw.12306.cn/otn/leftTicket/...) — read-only queries only; this server cannot book tickets, please buy via the official 12306 app/website.git clone https://github.com/boy-373/12306-train-mcp.git
cd 12306-train-mcp pip install -r requirements.txt python train_mcp_server.py
Then point your MCP client at http://127.0.0.1:8003/mcp. No API keys or accounts are ever required.
Option A — pull the pre-built image (fastest, no build):
docker run -d -p 8000:8000 --name 12306-train-mcp ghcr.io/boy-373/12306-train-mcp:latest
Option B — build from source:
git clone https://github.com/boy-373/12306-train-mcp.git
cd 12306-train-mcp docker build -t 12306-train-mcp . docker run -d -p 8000:8000 --name 12306-train-mcp 12306-train-mcp
Then point your MCP client at http://127.0.0.1:8000/mcp. The container listens on 0.0.0.0:8000 by default (override with -e MCP_PORT=9000 and adjust -p accordingly). No API keys or accounts required.
train_stations.json — bundled 12306 station name → telegraph-code table (auto-refreshed from 12306 every 7 days).train_mcp_server.py — the MCP server (FastMCP, Streamable HTTP transport).rate_limit.py — lightweight per-IP sliding-window rate-limit middleware (200 req/min default).requirements.txt — mcp, uvicorn, starlette.server.json — official MCP Registry manifest (remote server entry, ready to publish with mcp-publisher).smithery.yaml / glama.json — directory listing metadata.`query_train_tickets(from_city, to_city, date="")`
| Parameter | What to pass | Notes |
|---|---|---|
from_city / to_city | Chinese station or city names, e.g. "青岛", "北京", "上海虹桥" | A city name works when the city has one main station; for multi-station cities use the exact station name. Not sure? Call search_station("北京") first — it returns 北京/北京南/北京西/北京北… |
date | YYYY-MM-DD, e.g. "2026-09-20" | Optional — defaults to tomorrow when empty. 12306's pre-sale window is 15 days (dates further out return an error or empty results). |
Why you may get an HTTP 400 / error result:
YYYY-MM-DD (2026/09/20, 2026年9月20日, Sep 20 all fail)."qingdao"), or a vague nickname the code table doesn't contain. Fix: call search_station with a keyword and copy the exact name."北京" usually resolves to 北京 station, but if you want a specific station pass "北京南" / "北京西" explicitly.Correct call examples:
query_train_tickets(from_city="青岛", to_city="北京", date="2026-09-20")
query_train_tickets(from_city="北京南", to_city="上海虹桥") # date omitted -> tomorrow search_station(keyword="上海") # -> 上海/上海南/上海虹桥/上海西…
A successful response returns 车次总数 plus a 车次 list (train number, departure/arrival station & time, duration, and remaining seats per class). An unrecognized station returns {"error": "出发站「…」无法识别,可用 search_station 工具查车站名"} — simply re-call with the exact name.
`query_train_tickets(from_city, to_city, date="")` 参数说明
| 参数 | 填什么 | 注意 |
|---|---|---|
from_city / to_city | 中文车站名或城市名,如 "青岛"、"北京"、"上海虹桥" | 城市只有一个主车站时填城市名即可;多车站城市建议填具体车站名。不确定时先调 search_station("北京"),会返回 北京/北京南/北京西/北京北 等准确站名 |
date | YYYY-MM-DD 格式,如 "2026-09-20" | 可留空,留空默认查明天;12306 预售期通常为 15 天,超出预售期的日期会查询失败或无结果 |
返回 400 / 错误结果的常见原因:
YYYY-MM-DD,2026/09/20、2026年9月20日、Sep 20 等写法都会失败;"qingdao")、或码表中没有的俗称都会无法识别。解决方法:先用 search_station 关键词搜索,复制返回的准确站名;"北京" 一般能匹配到「北京」站,但要去特定车站请明确传 "北京南"、"北京西" 等;正确调用示例:
query_train_tickets(from_city="青岛", to_city="北京", date="2026-09-20")
query_train_tickets(from_city="北京南", to_city="上海虹桥") # date 留空 -> 默认明天 search_station(keyword="上海") # 返回 上海/上海南/上海虹桥/上海西…
调用成功会返回 车次总数 和 车次 列表(车次号、出发/到达站与时间、历时、各席别余票);站名无法识别时返回 {"error": "出发站「…」无法识别,可用 search_station 工具查车站名"},换成准确站名重试即可。
一句话:直接用中文站名查 12306 余票,数据来自 12306 官方公开查询接口,纯只读。
在线直连地址(免费、无需 Key、开箱即用):https://mcp.pianam.cn/train-mcp/mcp
在 MCP 客户端(Claude Desktop / Cursor / Cherry Studio / Cline 等)的配置里加入:
{
"mcpServers": { "12306-train": { "type": "http", "url": "https://mcp.pianam.cn/train-mcp/mcp" } } }
工具:
query_train_tickets(from_city, to_city, date):查余票。出发/到达站直接给中文城市或车站名(如「青岛」「北京南」),日期格式 YYYY-MM-DD,留空默认明天;返回车次、出发到达时间、历时及商务座/一等座/二等座/软卧/硬卧/硬座/无座等余票。search_station(keyword):不确定城市有哪些车站时模糊搜索站名(如「北京」返回 北京/北京南/北京西/北京北 等)。服务特性:数据源全部为公开接口、无需注册/付费;服务端内存缓存、失败自动降级/切换备用通道;单 IP 限流 200 次/分钟。
本地部署:
git clone https://github.com/boy-373/12306-train-mcp.git
cd 12306-train-mcp pip install -r requirements.txt python train_mcp_server.py
Docker 自托管:
# 方式一:直接拉预构建镜像(最快,无需构建)
docker run -d -p 8000:8000 --name 12306-train-mcp ghcr.io/boy-373/12306-train-mcp:latest
git clone https://github.com/boy-373/12306-train-mcp.git && cd 12306-train-mcp docker build -t 12306-train-mcp . docker run -d -p 8000:8000 --name 12306-train-mcp 12306-train-mcp
容器默认监听 0.0.0.0:8000(可用 -e MCP_PORT=端口 改),无需任何 API Key 或账号。
MIT © 2026 boy-373
One-click install for Smithery-supported clients (Claude Desktop, Cursor, etc.):
Or run:
npx -y @smithery/cli install 1561852680/12306-train-mcp --client claude
We host a free MCP aggregation gateway: your AI assistant (Cherry Studio, Claude Desktop, Cursor, Cline — any MCP client) discovers and uses MCP tools through a single URL:
https://mcp.pianam.cn/ai/mcp
Add it once, then talk in plain language — the AI automatically searches → inspects → calls the right MCP for you.
📖 3-step setup guide / 中文接入教程: https://mcp.pianam.cn/ai-gateway