MCP.so
登录

12306 Mcp

@Joooook

关于 12306 Mcp

This is a 12306 ticket search server based on the Model Context Protocol (MCP).

基本信息

分类

其他

许可证

MIT

运行时

node

传输方式

stdio

发布者

Joooook

提交者

Jok

配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "12306-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "12306-mcp"
      ]
    }
  }
}

工具

5

通过城市名查询该城市所有车站的station_code

通过城市名查询该城市对应的station_code

通过车站名查询station_code

查询12306余票信息。

查询列车途径车站信息。

概览

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.

评论

其他 分类下的更多 MCP 服务器