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.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

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.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 57f40a8608b6 · 采集于 2026-11-13 12:19:53 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

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.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

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