Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

12306-mcp

MCP.Pizza Chef: Joooook

12306-mcp is a server implementing the Model Context Protocol (MCP) to provide real-time train ticket search capabilities for the 12306 platform. It enables structured, model-driven access to ticket availability and scheduling data, facilitating seamless integration with LLM-based agents and applications. This server supports efficient querying and interaction with the 12306 ticketing system, enhancing automation and user experience in travel planning workflows.

Use This MCP server To

Query real-time train ticket availability from 12306 Integrate 12306 ticket search into AI-powered travel assistants Automate train schedule lookups for itinerary planning Enable LLMs to access structured 12306 ticket data Build chatbots that provide train ticket information on demand

README

12306-mcp

A 12306 ticket search server based on the Model Context Protocol (MCP). The server provides a simple API interface that allows users to search for 12306 tickets.

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

🚩Features

功能描述 状态
查询12306购票信息 ✅ 已完成
过滤列车信息 ✅ 已完成
过站查询 ✅ 已完成
中转查询 🚧 计划内
其余接口,欢迎提feature 🚧 计划内

⚙️Installation

git clone https://github.com/Joooook/12306-mcp.git
npm i

▶️Quick Start

CLI

npm run build
node ./build/index.js

MCP sever configuration

{
    "mcpServers": {
        "12306-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "12306-mcp"
            ]
        }
    }
}

👉️Reference

💭Murmurs

本项目仅用于学习,欢迎催更。

🎫Badges

☕️Donate

请我喝杯奶茶吧。

12306-mcp FAQ

How does 12306-mcp integrate with LLMs like OpenAI, Claude, or Gemini?
It exposes structured 12306 ticket data via MCP, allowing LLMs to query and reason about train schedules and availability in real time.
What data sources does 12306-mcp use?
It connects directly to the official 12306 ticketing platform to fetch up-to-date train ticket and schedule information.
Is 12306-mcp limited to any specific region or train types?
It focuses on the 12306 platform, which primarily covers China's railway ticketing system.
Can 12306-mcp handle high query volumes?
Yes, it is designed as a lightweight MCP server optimized for efficient ticket search queries.
What programming languages and technologies is 12306-mcp built with?
It is implemented using TypeScript and Python, leveraging MCP standards for interoperability.
How secure is the data handled by 12306-mcp?
The server follows MCP principles for secure, scoped, and observable model interactions to protect user data and queries.
Can 12306-mcp be extended to support other ticketing platforms?
While currently focused on 12306, its MCP-based architecture allows potential extension to other ticketing data sources.