12306 Mcp
@xpfyg
关于 12306 Mcp
基于 Model Context Protocol (MCP) 的12306购票搜索服务器。提供了简单的API接口,允许大模型利用接口搜索12306购票信息。
基本信息
配置
工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
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.
其他 分类下的更多 MCP 服务器
Reactive Resume
amruthpillaiA one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!
MCP Registry
modelcontextprotocolA community driven registry service for Model Context Protocol (MCP) servers.
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.
IDA Pro MCP
mrexodiaAI-powered reverse engineering assistant that bridges IDA Pro with language models through MCP.
评论