About
MCP server for querying China Railway 12306 ticket data from AI clients.
Features
- Search 12306 train tickets from MCP-compatible AI clients
- Run with `npx -y 12306-mcp` in stdio mode
- Expose an HTTP mode with a configurable port
- Includes an MCP client JSON configuration example
Use Cases
Travel planning agent builder
Let an assistant check railway options while planning trips in China.
MCP integrator
Add ticket-search capability to a local client without building a custom 12306 integration.
What This Server Can Do
MCP servers expose three types of capabilities to AI clients. Here's what 12306-mcp supports.
Tools
Supported3 toolsFunctions your AI client can call to perform actions — like querying a database, creating a file, or calling an API.
How to use: Tools run automatically when your AI client decides they're needed. Ask your AI assistant to perform a task, and it will invoke the right tool.
Resources
Not availableThis server does not expose read-only data resources.
Prompts
Not availableThis server does not provide pre-built prompt templates.
For the full list of available tools, resources, and prompts, check the README on GitHub.
Available Tools (1)
ticket_searchSearch China Railway 12306 train ticket information.