프로토타입 · 미리 보기: 공식 레지스트리의 모든 서버를 담고 있으며 30분마다 동기화해요. Google로 로그인하면 리뷰를 쓸 수 있어요.프로토타입 · 30분마다 업데이트
PopNx MCPAI를 쓰는 사람을 위한 MCP 서버 · 쉬운 말로 설명해요

China 12306 Train Tickets MCP

제작자: boy-373버전 1.0.0i★ 0i클라우드에서 실행공식 사이트 ↗
레지스트리 이름cn.pianam.mcp/12306-train-mcp

설치 방법

What it does

MCP server for China Railway 12306 ticket availability: schedules and seats by Chinese station name.

  • Connects 클라우드에서 실행
  • Account or key No key needed
  • Category 기타

이 순위인 이유

이 항목은 “AI와 연결되는 앱” 탭에 있으며, 이 탭은 별 없이 다음 순서로 정렬합니다

1. Claude 커넥터 디렉터리에 있음아니요
2. 팀이 직접 써 봄아니요
3. 태국 사용자에게 맞음아니요
4. 별을 뺀 사용량15/100인기 0 · 최신성 7 · 응답 중 8 · 사용자 좋아요 +0
5. 등록일2026-09-03

사용자 좋아요: 0 · 순위에 최대 5점(1인 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)가 추가

  1. Claude의 Connectors 페이지 열기

    CustomizeConnectors

    CustomizeConnectors1Add2https://…3Add4
  2. “Add” → “Custom” → “Web”를 누르고 이 2칸 채우기

    여기서 복사해 Claude의 같은 이름 칸에 붙여 넣고 Continue를 누르세요

    Name · 이름China 12306 Train Tickets MCP
    Remote MCP server URL · 주소https://mcp.pianam.cn/train-mcp/mcp

    Claude가 찾은 로그인 설정 화면에서 Continue를 누르고 · Authentication은 제작자 안내대로(Sign in now, Sign in when needed, No sign in) 고른 뒤 Add를 누르세요

  3. 채팅에서 켜기

    +ConnectorsChina 12306 Train Tickets MCP

  4. 해 보기

    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 추가 항목이 보이면 시도해 볼 수 있어요 · 웹만

  1. 웹 ChatGPT에서 MCP 추가 페이지 열기

    Plugins+Add custom MCP server

    ChatGPTPlugins1+2https://…3Create4
  2. 이름과 주소 입력

    이름을 넣고 Connection에 주소를 붙여 넣은 뒤 경고에 체크하고 Create as a plugin을 누르세요

    Name · 이름China 12306 Train Tickets MCP
    Connection · 주소https://mcp.pianam.cn/train-mcp/mcp
  3. 채팅에서 China 12306 Train Tickets MCP 고르기

    새 채팅을 열고 입력 전에 플러그인 목록에서 China 12306 Train Tickets MCP을 고르세요

  4. 해 보기

    China 12306 Train Tickets MCP을 써서 나에게 무엇을 해 줄 수 있는지 알려 주고, 하나 해 봐

    ✓ ChatGPT가 China 12306 Train Tickets MCP을 쓰고 있다고 하거나 답에 China 12306 Train Tickets MCP 도구 이름이 나오면 연결된 거예요

메뉴 이름은 2026년 11월 11일에 OpenAI 도움말에서 확인 · 앱 버전에 따라 화면이 조금 다를 수 있어요

Claude Code에 연결할 수 있어요 · 약 2분

키 필요 없음, 설치 필요 없음

  1. 터미널 열기

    Mac: Command+스페이스를 누르고 Terminal 입력 · Windows: PowerShell 열기

  2. 이 명령을 붙여 넣고 Enter

    claude mcp add --transport http --scope user 12306-train https://mcp.pianam.cn/train-mcp/mcp
  3. Claude Code에서 /mcp 입력

    China 12306 Train Tickets MCP이 목록에 있고 연결됨으로 보이면 돼요

  4. 해 보기

    China 12306 Train Tickets MCP을 써서 나에게 무엇을 해 줄 수 있는지 알려 주고, 하나 해 봐

    ✓ Claude Code가 China 12306 Train Tickets MCP을 쓰고 있다고 하거나 답에 China 12306 Train Tickets MCP 도구 이름이 나오면 연결된 거예요

메뉴 이름은 2026년 11월 11일에 Anthropic 도움말에서 확인 · 앱 버전에 따라 화면이 조금 다를 수 있어요

Cursor에 연결할 수 있어요 · 약 2분

키 필요 없음, 설치 필요 없음

  1. 이 버튼으로 Cursor 열기

    Cursor에서 열기

    Cursor가 설치를 확인하면 Install을 누르세요

  2. Cursor에서 AI 채팅을 Agent 모드로 열기

  3. 해 보기

    China 12306 Train Tickets MCP을 써서 나에게 무엇을 해 줄 수 있는지 알려 주고, 하나 해 봐

    ✓ Cursor가 China 12306 Train Tickets MCP을 쓰고 있다고 하거나 답에 China 12306 Train Tickets MCP 도구 이름이 나오면 연결된 거예요

메뉴 이름은 2026년 11월 11일에 Cursor 도움말에서 확인 · 앱 버전에 따라 화면이 조금 다를 수 있어요

VS Code에 연결할 수 있어요 · 약 2분

키 필요 없음, 설치 필요 없음

  1. 이 버튼으로 VS Code 열기

    VS Code에서 열기

    VS Code가 설치를 확인하면 Install을 누르세요

  2. VS Code에서 AI 채팅을 Agent 모드로 열기

  3. 해 보기

    China 12306 Train Tickets MCP을 써서 나에게 무엇을 해 줄 수 있는지 알려 주고, 하나 해 봐

    ✓ VS Code가 China 12306 Train Tickets MCP을 쓰고 있다고 하거나 답에 China 12306 Train Tickets MCP 도구 이름이 나오면 연결된 거예요

메뉴 이름은 2026년 11월 11일에 VS Code 도움말에서 확인 · 앱 버전에 따라 화면이 조금 다를 수 있어요

Windsurf, Zed, Gemini CLI 같은 다른 MCP 앱은 추가 방법이 저마다 달라요. 앱 목록에서 확인하세요

MCP를 쓰는 앱 모두 보기 →

웹으로 연결하는 앱용 주소

주소https://mcp.pianam.cn/train-mcp/mcp

JSON 설정은 아래 “개발자용”에 있어요

막혔나요? China 12306 Train Tickets MCP을 쓰는 사람에게 물어보세요💬 토론 →
개발자용: 터미널 명령과 JSON 설정

웹으로 연결

Claude Code

claude mcp add --transport http --scope user 12306-train https://mcp.pianam.cn/train-mcp/mcp

Cursor (~/.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를 따르세요.

한눈에 보기

주간 다운로드i
npm/PyPI에 없음
확인된 도메인
✓ mcp.pianam.cn
연결 방식
클라우드에서 실행
전송 방식
streamable-http
최신 버전i
1.0.0
카테고리i
기타
레지스트리 공개i
2026년 9월 3일
코드 마지막 변경i
2026년 9월 9일
마지막 확인
2026년 11월 15일
제작자
boy-373
레지스트리 상태
활성

어떤 앱에서 쓸 수 있나요

이 서버의 연결 방식과 각 앱의 공식 문서를 바탕으로 했어요. 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车站名称,返回匹配的车站中文名列表。不确定城市有哪些车站时使用。

기본 점검i

누구나 볼 수 있는 정보를 점검했고, 코드는 읽지 않았어요. 해당하지 않는 항목은 개수에서 뺐어요. · 2026년 11월 19일 점검

  • ! 주의

    제작자와 저장소 일치

    게시자(mcp.pianam.cn)가 저장소 소유자(boy-373)가 아니에요. 다른 사람이 등록했을 수 있어요

  • ✓ 통과

    계속 관리되고 있음

    코드 마지막 변경: 2개월 전

  • ✓ 통과

    라이선스 있음

    MIT 사용

  • ✓ 통과

    엔드포인트 응답

    496ms 만에 응답(HTTP 200)

  • – 해당 없음

    OAuth로 로그인

    로그인 필요 없음

  • ✓ 통과

    도구 설명에 숨겨진 지시 없음

    도구 설명 2개를 읽었고, AI에게 보내는 숨겨진 지시는 없었어요

우리가 확인하는 것 → · JSON

제작자: 재확인 요청 또는 잘못된 정보 신고
제작자용: README에 배지 달기

제작자라면 이 코드를 README에 붙여 넣으세요. 배지는 이 페이지로 연결됩니다.

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/cn-pianam-12306-train-mcp.svg)](https://mcp.popnx.com/en/servers/cn-pianam-12306-train-mcp)

토론

질문하고, 팁을 나누고, 안 되는 점을 알려 주세요. "도움이 됨"이 많은 순서예요.

아직 글이 없어요. 처음으로 질문하거나 공유해 보세요.

이곳의 글은 사용자가 쓴 것으로, PopNx 팀의 글이 아니에요.

로그인하고 글쓰기

사용자 리뷰

아직 리뷰가 없어요

로그인하고 리뷰 쓰기

기타 카테고리의 다른 서버와 비교i

  • 이 카테고리의 다른 서버 20613개 중 0%보다 스타가 많아요
  • 이 카테고리의 다른 서버 20613개 중 27%보다 최근에 레지스트리에 공개됐어요
  • 기본 점검 결과가 이 카테고리의 다른 서버 20613개 중 60%와 같거나 더 좋아요

레지스트리에서 이 카테고리의 활성 서버 전체와 비교했어요. 스타는 게시자가 저장소를 소유한 경우에만 세요.

자주 묻는 질문

China 12306 Train Tickets MCP, 안전한가요?

해당하는 기본 점검 5개 중 4개를 통과했어요. 코드는 읽지 않았어요. 키나 토큰을 넣기 전에 서버가 어떤 권한을 요구하는지 확인하고, 꼭 필요한 권한만 있는 키를 쓰세요.

어떤 키나 코드가 필요한가요?

레지스트리에 필수 키가 나와 있지 않아요. 다만 처음 쓸 때 로그인을 요구하는 서버도 있어요.

내 컴퓨터에서 실행되나요, 클라우드에서 실행되나요?

제작자의 클라우드에서 실행돼요. 설치 없이 인터넷으로 연결하지만, 보내는 내용은 제작자의 서버를 거쳐요.

아직 관리되고 있나요?

GitHub 저장소는 마지막으로 2개월 전 변경됐고, 최신 버전(1.0.0)은 3개월 전 레지스트리에 올라왔어요.

어떤 앱에서 쓸 수 있나요?

Claude Desktop, Claude Code, Cursor, VS Code처럼 MCP를 지원하는 앱에서 쓸 수 있어요. URL로 연결되므로 원격 MCP를 받는 앱에서도 쓸 수 있어요. 예: 웹 ChatGPT(Business 이상은 전체 MCP, Pro는 읽기 전용).

대신 쓸 수 있는 건 뭐가 있나요?

같은 카테고리에는: World Monitor, openstatus, Oh My Posh Validator, Strata, Jitsu

비슷하게 동작하는 다른 것

같은 카테고리, 다른 제작자, 명령 확인 완료. 공식이 먼저, 그다음 스타 순.

카드 보는 법:↓ 주간 다운로드i★ GitHub 스타i세 기둥: 리뷰 · 점검 · 사용 정도i업데이트 = 최신 버전을 레지스트리에 공개한 날i

World Monitor

Real-time global intelligence on conflict, markets, energy, trade, shipping and cyber. 100 tools.

제작자: koala73널리 사용됨★ 9.1만3일 전 업데이트

클라우드에서 실행✓ 서비스 회사 · worldmonitor.app

openstatus

Manage monitors, status pages, incidents and maintenances in your openstatus workspace.

제작자: openstatusHQ널리 사용됨★ 9.3천2개월 전 업데이트

클라우드에서 실행✓ 서비스 회사 · openstatus.dev

Strata

MCP server for progressive tool usage at any scale (see https://klavis.ai)

제작자: Klavis-AI성장 중★ 5.8천14개월 전 업데이트

클라우드에서 실행저장소 보관됨✓ klavis.ai

Jitsu

Manage Jitsu data pipelines: destinations, streams, connections, functions, live events.

제작자: jitsucom널리 사용됨★ 5.1천4개월 전 업데이트

클라우드에서 실행✓ 서비스 회사 · jitsu.com
비슷한 항목과 비교
이 항목
China 12306 Train Tickets MCP
World MonitoropenstatusOh My Posh ValidatorStrataJitsu
실행 위치클라우드에서 동작, 설치 불필요클라우드에서 동작, 설치 불필요클라우드에서 동작, 설치 불필요클라우드에서 동작, 설치 불필요클라우드에서 동작, 설치 불필요클라우드에서 동작, 설치 불필요
키 필요아니요아니요아니요아니요아니요아니요
Claude에서 +로 추가아니요아니요아니요아니요아니요아니요
기본 점검4/54/44/44/41/44/4
라이선스MITAGPL-3.0AGPL-3.0MITApache-2.0MIT
가격등록 정보에 비용 없음등록 정보에 비용 없음등록 정보에 비용 없음등록 정보에 비용 없음등록 정보에 비용 없음등록 정보에 비용 없음

제작자의 README

README 열기

제작자의 저장소에서 쓰인 그대로 가져왔어요. PopNx MCP가 검토하거나 보증한 내용이 아니에요. HTML, 이미지, 스크립트는 제거했어요. 링크를 누르면 이 사이트를 벗어나요.

China 12306 Train Tickets MCP

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.

  • Try it in 30 seconds: a free public MCP endpoint is already running — just paste the URL into your MCP client (no install, no API key).
  • Or self-host: a single Python file, stdlib HTTP + FastMCP, zero paid dependencies.

⚡ Use the hosted endpoint (no setup)

https://mcp.pianam.cn/train-mcp/mcp

Transport: Streamable HTTP (MCP 2025-03-26 compatible). No authentication required.

🔌 Client configuration

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".

🧰 Tools

ToolParametersReturns

| 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. |

📡 Data sources, caching & limits

  • Data comes from 12306's own public query endpoints (kyfw.12306.cn/otn/leftTicket/...) — read-only queries only; this server cannot book tickets, please buy via the official 12306 app/website.
  • Station code table cached locally for 7 days; ticket queries cached for 300 seconds.
  • No API key, no login required.
  • The hosted endpoint is rate-limited to 200 requests / minute / IP.

🐢 Self-hosting

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

the server listens on 127.0.0.1:8003 by default; override with:

MCP_HOST=0.0.0.0 MCP_PORT=9000 python train_mcp_server.py

MCP_ALLOWED_HOSTS="your-domain.com,127.0.0.1:*"

MCP_ALLOWED_ORIGINS="https://your-domain.com"

Then point your MCP client at http://127.0.0.1:8003/mcp. No API keys or accounts are ever required.

🐳 Self-host with Docker

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).

🗂️ Files

  • 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.

🧯 Parameter guide & common errors (read this if a call fails)

`query_train_tickets(from_city, to_city, date="")`

ParameterWhat to passNotes
from_city / to_cityChinese 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 北京/北京南/北京西/北京北…
dateYYYY-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:

  1. Bad date format — must be exactly YYYY-MM-DD (2026/09/20, 2026年9月20日, Sep 20 all fail).
  2. Station name not found — typo, pinyin ("qingdao"), or a vague nickname the code table doesn't contain. Fix: call search_station with a keyword and copy the exact name.
  3. City-level name for a multi-station city — e.g. "北京" usually resolves to 北京 station, but if you want a specific station pass "北京南" / "北京西" explicitly.
  4. Date outside the 15-day pre-sale window — 12306 has not released those tickets yet.

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("北京"),会返回 北京/北京南/北京西/北京北 等准确站名
dateYYYY-MM-DD 格式,如 "2026-09-20"可留空,留空默认查明天;12306 预售期通常为 15 天,超出预售期的日期会查询失败或无结果

返回 400 / 错误结果的常见原因:

  1. 日期格式错误:必须严格为 YYYY-MM-DD,2026/09/20、2026年9月20日、Sep 20 等写法都会失败;
  2. 站名不存在:错别字、拼音(如 "qingdao")、或码表中没有的俗称都会无法识别。解决方法:先用 search_station 关键词搜索,复制返回的准确站名;
  3. 多车站城市用了城市通称:如 "北京" 一般能匹配到「北京」站,但要去特定车站请明确传 "北京南"、"北京西" 等;
  4. 日期超出 15 天预售期:12306 尚未放票,查询会返回失败提示。

正确调用示例:

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):不确定城市有哪些车站时模糊搜索站名(如「北京」返回 北京/北京南/北京西/北京北 等)。
  • 仅查票,不能购票;12306 预售期通常 15 天。

服务特性:数据源全部为公开接口、无需注册/付费;服务端内存缓存、失败自动降级/切换备用通道;单 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

默认监听 127.0.0.1:8003,可用环境变量 MCP_HOST / MCP_PORT / MCP_ALLOWED_HOSTS / MCP_ALLOWED_ORIGINS 覆盖

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

MCP 地址填:http://127.0.0.1:8000/mcp

容器默认监听 0.0.0.0:8000(可用 -e MCP_PORT=端口 改),无需任何 API Key 或账号。

📄 License

MIT © 2026 boy-373

Install via Smithery

One-click install for Smithery-supported clients (Claude Desktop, Cursor, etc.):

Or run:

npx -y @smithery/cli install 1561852680/12306-train-mcp --client claude

🔌 Use with Any AI Client — One-Click MCP Gateway

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.

  • 🔍 Search across 22,000+ indexed MCP servers (Chinese & English)
  • ⚡ 50+ live hosted MCPs callable directly out of the box (weather, exchange rates, hot trends, IP geo, train tickets…)
  • 📦 GitHub-based MCPs: search finds them with links to install locally
  • ✅ Servers health-checked weekly — alive ones ranked first
  • 🆓 Free to use, no key required

📖 3-step setup guide / 中文接入教程: https://mcp.pianam.cn/ai-gateway