12306-mcp icon

12306-mcp

by Joooook

communityMultiplenpm
2.3kstars
Works withClaude DesktopCursorVS CodeWindsurf
12306-mcp preview

Screenshots

12306-mcp screenshot 1

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 tools

Functions 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 available

This server does not expose read-only data resources.

Prompts

Not available

This 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_search

Search China Railway 12306 train ticket information.

Frequently Asked Questions