12306 Mcp
@Joooook
About 12306 Mcp
This is a 12306 ticket search server based on the Model Context Protocol (MCP).
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"12306-mcp": {
"command": "npx",
"args": [
"-y",
"12306-mcp"
]
}
}
}Tools
5通过城市名查询该城市所有车站的station_code
通过城市名查询该城市对应的station_code
通过车站名查询station_code
查询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.
More Other MCP servers
ghidraMCP
LaurieWiredMCP Server for Ghidra
Inbox Zero AI MCP
elie222The world's best AI personal assistant for email. Open source app to help you reach inbox zero fast.
Awesome-MCP-ZH
yzflyMCP 资源精选, MCP指南,Claude MCP,MCP Servers, MCP Clients
Blender
ahujasidOpen-source MCP to use Blender with any LLM
XcodeBuildMCP
cameroncookeA Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
Comments