12306购票搜索服务器
1

12306购票搜索服务器

A 12306 train ticket query service based on the MCP protocol, providing function interfaces related to ticket purchasing such as station query, remaining ticket search, and transfer ticket query.
2 points
4.1K

What is the 12306 Ticket Purchase Search Server?

This is a dedicated train ticket query tool designed for AI assistants. Through the standardized MCP protocol, AI assistants can query 12306 train ticket information like humans, including train numbers, remaining tickets, station codes, and stop - over stations, helping users quickly obtain travel information.

How to use the 12306 Ticket Purchase Search Server?

You only need to configure this service in an AI assistant that supports MCP (such as Claude Desktop, Cursor, etc.). The AI assistant can then automatically call the relevant tools. When you ask questions related to train tickets, the AI will use this service to query the latest information and give answers.

Applicable Scenarios

• Query the remaining tickets and fares of train tickets • Find station codes and station information • Plan travel routes, including direct and transfer options • Query the stop - over stations and timetables of specific trains • Help users understand the specific dates corresponding to relative dates (such as “tomorrow”, “next Wednesday”)

Main Functions

Intelligent Date Parsing
Automatically convert relative dates (such as “tomorrow”, “next Wednesday”) mentioned by users into accurate date formats to ensure query accuracy.
Multi - dimensional Station Query
Support multiple query methods, such as querying all stations by city name, obtaining representative station codes by city name, and querying codes by specific station names.
Real - time Remaining Ticket Query
Query the remaining ticket information of train tickets for a specified date, departure place, and destination, including train numbers, seat types, fares, and the number of remaining tickets.
Intelligent Transfer Scheme
When direct tickets are sold out, provide transfer scheme queries to help users find feasible travel routes.
Train Details Query
Query the detailed stop - over information of a specific train within a specified section, including arrival time, departure time, and stop time.
Standardized Interface
Based on the MCP protocol, provide a standardized tool call interface for AI assistants to ensure compatibility and ease of use.
Advantages
No manual operation required: The AI assistant calls automatically, and users only need to ask questions in natural language.
Accurate information: Based on official 12306 data to ensure information reliability.
Comprehensive functions: Cover various query functions required for the entire ticket - purchasing process.
Easy to integrate: Support multiple MCP connection methods (SSE, HTTP, STDIO).
Intelligent processing: Automatically handle complex logic such as date conversion and station code mapping.
Limitations
API key required: You need to register with Xiaobenyang Technology to obtain the XBY - APIKEY.
Transfer query limitation: Currently, only the top ten transfer schemes can be queried.
Network dependence: A stable network connection is required.
No direct ticket purchase: Only provide query functions, not including payment and ticket issuance.
AI assistant support required: Must be used in an AI environment that supports MCP.

How to Use

Get an API Key
Visit the Xiaobenyang Technology website (https://xiaobenyang.com) to register an account and obtain your XBY - APIKEY.
Configure the MCP Server
In the configuration file of the AI assistant you are using (such as Claude Desktop), add this service according to the configuration example provided in the README. Select one of the connection methods: SSE, Streamable HTTP, or STDIO.
Restart the AI Assistant
After saving the configuration file, restart your AI assistant application to ensure that the configuration takes effect.
Start Using
Now you can directly ask questions related to train tickets in natural language, and the AI assistant will automatically call this service to obtain the latest information.

Usage Examples

Example 1: Query Direct Tickets
A user wants to query high - speed train tickets from Beijing to Shanghai tomorrow.
Example 2: Query City Stations
A user wants to know which railway stations there are in Wuhan.
Example 3: Query Train Details
A user wants to know the stop - over stations of Train G1.
Example 4: Query Transfer Schemes
Direct tickets are sold out, and the user needs transfer schemes.

Frequently Asked Questions

Is this service free?
Is the data real - time?
Which AI assistants are supported?
How far in advance can I query tickets?
Why does the transfer query only show the top ten results?
How can I test if the tool is working properly?

Related Resources

Xiaobenyang Technology Official Website
Register to obtain an API key and view detailed documentation
Online Testing Tool
Test all tool functions online
MCP Protocol Documentation
Understand the technical specifications of the Model Context Protocol
12306 Official Website
The official ticketing website of Chinese railways

Installation

Copy the following command to your Client for configuration
{
  "mcpServers": {
    "12306购票搜索服务器": {
      "headers": {
        "XBY-APIKEY": "<YOUR_XBY_APIKEY>"
      },
      "type": "sse",
      "url": "https://mcp.xiaobenyang.com/1777316659202051/sse"
    }
  }
}

{
  "mcpServers": {
    "12306购票搜索服务器": {
      "headers": {
        "XBY-APIKEY": "<YOUR_XBY_APIKEY>"
      },
      "type": "streamable_http",
      "url": "https://mcp.xiaobenyang.com/1777316659202051/mcp"
    }
  }
}

{
    "mcpServers": {
        "12306购票搜索服务器": {
          "command": "npx",
          "args": [
            "-y",
            "xiaobenyang-mcp"
          ],
          "env": {
            "XBY_APIKEY": "<YOUR_XBY_APIKEY>",
            "mcpId": "1777316659202051",
          },
          "transport": "stdio"
        }
      }
}
Note: Your key is sensitive information, do not share it with anyone.

Alternatives

H
Haiku.rag
Haiku RAG is an intelligent retrieval - augmented generation system built on LanceDB, Pydantic AI, and Docling. It supports hybrid search, re - ranking, Q&A agents, multi - agent research processes, and provides local - first document processing and MCP server integration.
Python
6.0K
5 points
C
Claude Context
Claude Context is an MCP plugin that provides in - depth context of the entire codebase for AI programming assistants through semantic code search. It supports multiple embedding models and vector databases to achieve efficient code retrieval.
TypeScript
14.8K
5 points
A
Acemcp
Acemcp is an MCP server for codebase indexing and semantic search, supporting automatic incremental indexing, multi-encoding file processing, .gitignore integration, and a Web management interface, helping developers quickly search for and understand code context.
Python
14.4K
5 points
M
MCP
The Microsoft official MCP server provides search and access functions for the latest Microsoft technical documentation for AI assistants
13.2K
5 points
A
Annas MCP
The MCP server and CLI tool of Anna's Archive are used to search for and download documents on the platform and support access through an API key.
Go
9.8K
4.5 points
S
Search1api
The Search1API MCP Server is a server based on the Model Context Protocol (MCP), providing search and crawling functions, and supporting multiple search services and tools.
TypeScript
16.7K
4 points
D
Duckduckgo MCP Server
Certified
The DuckDuckGo Search MCP Server provides web search and content scraping services for LLMs such as Claude.
Python
63.0K
4.3 points
M
MCP Server Airbnb
Certified
MCP service for Airbnb listing search and details query
TypeScript
15.8K
4 points
N
Notion Api MCP
Certified
A Python-based MCP Server that provides advanced to-do list management and content organization functions through the Notion API, enabling seamless integration between AI models and Notion.
Python
18.9K
4.5 points
M
Markdownify MCP
Markdownify is a multi-functional file conversion service that supports converting multiple formats such as PDFs, images, audio, and web page content into Markdown format.
TypeScript
32.1K
5 points
G
Gitlab MCP Server
Certified
The GitLab MCP server is a project based on the Model Context Protocol that provides a comprehensive toolset for interacting with GitLab accounts, including code review, merge request management, CI/CD configuration, and other functions.
TypeScript
20.6K
4.3 points
D
Duckduckgo MCP Server
Certified
The DuckDuckGo Search MCP Server provides web search and content scraping services for LLMs such as Claude.
Python
63.0K
4.3 points
F
Figma Context MCP
Framelink Figma MCP Server is a server that provides access to Figma design data for AI programming tools (such as Cursor). By simplifying the Figma API response, it helps AI more accurately achieve one - click conversion from design to code.
TypeScript
58.4K
4.5 points
U
Unity
Certified
UnityMCP is a Unity editor plugin that implements the Model Context Protocol (MCP), providing seamless integration between Unity and AI assistants, including real - time state monitoring, remote command execution, and log functions.
C#
28.0K
5 points
G
Gmail MCP Server
A Gmail automatic authentication MCP server designed for Claude Desktop, supporting Gmail management through natural language interaction, including complete functions such as sending emails, label management, and batch operations.
TypeScript
18.8K
4.5 points
M
Minimax MCP Server
The MiniMax Model Context Protocol (MCP) is an official server that supports interaction with powerful text-to-speech, video/image generation APIs, and is suitable for various client tools such as Claude Desktop and Cursor.
Python
42.2K
4.8 points
AIBase
Zhiqi Future, Your AI Solution Think Tank
© 2026AIBase