12306 Mcp
@Joooook
About 12306 Mcp
This is a 12306 ticket search server based on the Model Context Protocol (MCP).
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"12306-mcp": {
"command": "npx",
"args": [
"-y",
"12306-mcp"
]
}
}
}Tools
8获取当前日期,以上海时区(Asia/Shanghai, UTC+8)为准,返回格式为 "yyyy-MM-dd"。主要用于解析用户提到的相对日期(如“明天”、“下周三”),提供准确的日期输入。
通过中文城市名查询该城市 **所有** 火车站的名称及其对应的 `station_code`,结果是一个包含多个车站信息的列表。
通过中文城市名查询代表该城市的 `station_code`。
通过具体的中文车站名查询其 `station_code` 和车站名。
通过车站的 `station_telecode` 查询车站的详细信息,包括名称、拼音、所属城市等。此接口主要用于在已知 `telecode` 的情况下获取更完整的车站数据,或用于特殊查询及调试目的。一般用户对话流程中较少直接触发。
查询12306余票信息。
查询12306中转余票信息。尚且只支持查询前十条。
查询特定列车车次在指定区间内的途径车站、到站时间、出发时间及停留时间等详细经停信息。当用户询问某趟具体列车的经停站时使用此接口。
Overview
What is 12306 Mcp?
12306 Mcp is a ticket search server for the Chinese railway system (12306) built on the Model Context Protocol (MCP). It provides a simple API interface that allows large language models to search for 12306 ticket information. The project is intended for developers integrating train ticket lookup into AI applications and is described as for learning purposes.
How to use 12306 Mcp?
Clone the repository and run npm i. Use npx -y 12306-mcp to start with stdio transport, or npx -y 12306-mcp --port [port] for HTTP transport. Docker images can be built and run with similar commands. The MCP server configuration for clients requires setting the command and args as shown in the README.
Key features of 12306 Mcp
- Query 12306 ticket information
- Filter train information
- Pass-through station query
- Transfer (connecting) query
Use cases of 12306 Mcp
- Search for available trains between two stations
- Filter trains by criteria
- Find trains that pass through a specific intermediate station
- Plan journeys involving train transfers
FAQ from 12306 Mcp
How is 12306 Mcp installed and run?
Install by cloning the repository and running npm i. Run via npx -y 12306-mcp for stdio transport or with --port [port] for HTTP transport. Docker images can be built with docker build . -t 12306-mcp and run accordingly.
What transport protocols does 12306 Mcp support?
It supports both stdio (standard input/output) and HTTP transport. HTTP transport requires specifying a port number.
What runtime does 12306 Mcp require?
The README indicates a Node.js environment (TypeScript-based) and npm. Docker is also supported as an alternative deployment method.
Is 12306 Mcp production-ready?
The README states the project is for learning purposes only ("本项目仅用于学习") and welcomes feature requests, indicating it is an experimental/educational project.
Frequently asked questions
How is 12306 Mcp installed and run?
Install by cloning the repository and running `npm i`. Run via `npx -y 12306-mcp` for stdio transport or with `--port [port]` for HTTP transport. Docker images can be built with `docker build . -t 12306-mcp` and run accordingly.
What transport protocols does 12306 Mcp support?
It supports both stdio (standard input/output) and HTTP transport. HTTP transport requires specifying a port number.
What runtime does 12306 Mcp require?
The README indicates a Node.js environment (TypeScript-based) and npm. Docker is also supported as an alternative deployment method.
Is 12306 Mcp production-ready?
The README states the project is for learning purposes only ("本项目仅用于学习") and welcomes feature requests, indicating it is an experimental/educational project.
Basic information
More Other MCP servers
MCP Registry
modelcontextprotocolA community driven registry service for Model Context Protocol (MCP) servers.
AutoBrowser MCP
autobrowser-aiBrowser MCP is a Model Context Provider (MCP) server that allows AI applications to control your browser

DeepMark
DeepMark helps teachers deliver rapid, consistent marking with meaningful feedback for every student — in a fraction of the time. What once took a week, now takes one free period.
MaxKB
1Panel-dev🔥 MaxKB is an open-source platform for building enterprise-grade agents. 强大易用的开源企业级智能体平台。
MCP Toolbox for Databases
googleapisMCP Toolbox for Databases is an open source MCP server for databases.
Comments