12306 Mcp
@xpfyg
About 12306 Mcp
基于 Model Context Protocol (MCP) 的12306购票搜索服务器。提供了简单的API接口,允许大模型利用接口搜索12306购票信息。
Basic information
Config
No standard config provided
This server doesn't expose a parseable MCP config block in its README. See the repository for install instructions.
RepositoryTools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is 12306 Mcp?
12306 Mcp is a Model Context Protocol (MCP) server that provides a simple API interface for searching 12306 train ticket information. It allows large language models to query real-time ticket availability and pricing data from China's official railway ticketing platform.
How to use 12306 Mcp?
Clone the repository, run go mod init 12306-mcp, go mod tidy, then go run main.go to start the server. For use in Cursor IDE, add a "12306-mcp" entry to your local mcp.json with the URL http://127.0.0.1:8080/sse, then ask natural language queries like "查询杭州到武汉明天的高铁票".
Key features of 12306 Mcp
- Query 12306 ticket purchase information in real time
- Supports searching by departure station, arrival station, and date
- Returns train number, departure/arrival times, and duration
- Provides seat type availability and pricing details
- Integrates with Cursor IDE via MCP protocol
Use cases of 12306 Mcp
- Ask an AI assistant to check available trains between two cities on a specific date
- Compare ticket prices and seat availability across different trains
- Quickly retrieve train schedules without manually visiting the 12306 website
FAQ from 12306 Mcp
What data does 12306 Mcp provide?
It returns real-time train schedules including train number, departure and arrival stations, departure/arrival times, journey duration, and seat-specific availability and prices (e.g., business class, first class, second class).
What are the runtime requirements?
The server requires Go to build and run. It is designed to work with MCP-compatible clients like Cursor IDE, connecting via SSE at http://127.0.0.1:8080/sse.
Does 12306 Mcp support transfer or intermediate station queries?
Not yet. The current version only supports direct station-to-station queries; transfer and pass-through station queries are listed as planned TODO items.
What authentication or credentials are needed?
The README does not mention any authentication — the server runs locally and connects to the public 12306 system without requiring user credentials.
What transport protocol does 12306 Mcp use?
It uses Server-Sent Events (SSE) transport. The client connects to the server's SSE endpoint to send queries and receive ticket data.
More Other MCP servers

Sequential Thinking
modelcontextprotocolModel Context Protocol Servers
Activepieces
activepiecesAI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
Inbox Zero AI
elie222The world's best AI personal assistant for email. Open source app to help you reach inbox zero fast.
FastMCP v2 🚀
jlowin🚀 The fast, Pythonic way to build MCP servers and clients.
ghidraMCP
LaurieWiredMCP Server for Ghidra
Comments