12306-MCP train ticket search server

12306-MCP train ticket search server

12306-mcp-service•byxpfyg

An MCP-based server that lets large models search 12306 train ticket availability and pricing information.

License: Not specified•Runtime: Awaiting documentation review•Category: search web

WHAT IT DOES

  • •Searches 12306 ticket information based on departure station, arrival station, and date.
  • •Returns train details including train number, stations, departure and arrival times, duration, and seat availability with prices.
  • •Provides real-time ticket information to clients such as Cursor via the MCP protocol.

BEST FOR

  • •Querying high-speed train tickets between two cities for a given date.
  • •Using an AI assistant to retrieve live train ticket availability and pricing.

ABOUT 12306-MCP-SERVICE

12306-MCP train ticket search server is cataloged as an MCP server attributed to xpfyg. An MCP-based server that lets large models search 12306 train ticket availability and pricing information. It is categorized under search web. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for 12306-MCP train ticket search server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What ticket information does the server return?

It returns the train number, departure and arrival stations, departure and arrival times, duration, and remaining tickets by seat type with prices.

Which other 12306 interfaces are planned?

The README lists remaining 12306 interfaces such as transfer and pass-through station queries as planned work.

Upstream README

View this exact version on GitHub

README.md · 57f40a8608b6 · Fetched 2026-11-13 12:19:53 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

12306-MCP

基于 Model Context Protocol (MCP) 的12306购票搜索服务器。提供了简单的API接口,允许大模型利用接口搜索12306购票信息。

功能特点

  • 查询12306购票信息

待办事项

  • 完成12306其余接口(中转,过站查询等)

安装

git clone https://github.com/xpfyg/12306-mcp-service.git
cd 12306-mcp
go mod init 12306-mcp
go mod tidy

快速开始

  1. 运行服务器
go run main.go

API 示例

查询车票信息:

{
    "from_station": "杭州",
    "to_station": "武汉",
    "date": "2025-04-30"
}

响应示例:

[
  {
	"车次": "G1442",
	"出发站": "杭州西",
	"到达站": "武汉",
	"出发时间": "2025-04-26 06:07:00",
	"到达时间": "2025-04-26 10:23:00",
	"历时": "04:16",
	"余票信息": [{
			"座位类型": "商务座",
			"余票数量": 3,
			"价格": 1018
		},
		{
			"座位类型": "一等座",
			"余票数量": 10,
			"价格": 528
		},
		{
			"座位类型": "二等座",
			"余票数量": 21,
			"价格": 329
		}
	]
}
]

在Cursor中使用

要在Cursor IDE中使用此MCP服务:

  1. 确保12306-MCP服务已在本地运行
  2. 在Cursor设置中启用MCP功能
  3. 本地mcp.json添加:
    "12306-mcp": {
      "url": "http://127.0.0.1:8080/sse"
    }
  1. 连接后即可通过对话框使用以下查询示例:
    请帮我查询杭州到武汉明天的高铁票
    
  2. Cursor将通过MCP协议调用本服务获取实时车票信息

参考

许可证

MIT License

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for 12306-MCP train ticket search server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/12306-mcp-service)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable
Site views (30 UTC days)1

Approximate reported site interactions from 2026-10-27 through 2026-11-25 UTC; not unique visitors or installations.

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related search web MCP Servers

Alternative and complementary servers in the same category

View all in search web →

An MCP server that merges Google Search Console history with a live first-party crawl of your site to produce a prioritised, evidence-backed technical SEO audit inside Claude, complete with paste-ready fixes.

Repository stats unavailable
Search & Web Research

An MCP server that offers intelligent web search using OpenAI reasoning models, with support for fast iterations and deep research.

94
Search & Web Research