📦Joooook / 12306-mcp
← 返回首页
This is a 12306 ticket search server based on the Model Context Protocol (MCP).
⚖️ MIT#12306#mcp#mcp-server#train-tickets📅 创建于 2025-04-14🔄 更新于 2026-07-31
🔗 GitHub JavaScript

📄 仓库 README

在 GitHub 查看 ↗
来自 GitHub 仓库自述文件 · 版权归原作者所有

12306-mcp

[![](https://img.shields.io/badge/Joooook-blue.svg?logo=github&lable=python&labelColor=497568&color=497568&style=flat-square)](https://github.com/Joooook) [![](https://img.shields.io/badge/Joooook-blue.svg?logo=bilibili&logoColor=white&lable=python&labelColor=af7a82&color=af7a82&style=flat-square)](https://space.bilibili.com/3546386788255839) ![](https://img.shields.io/badge/typescript-blue.svg?logo=typescript&lable=typescript&logoColor=white&labelColor=192c3b&color=192c3b&style=flat-square) ![](https://img.shields.io/github/stars/Joooook/12306-mcp?logo=reverbnation&lable=python&logoColor=white&labelColor=ffc773&color=ffc773&style=flat-square) ![](https://img.shields.io/github/last-commit/Joooook/12306-mcp.svg?style=flat-square) ![](https://img.shields.io/github/license/Joooook/12306-mcp.svg?style=flat-square&color=000000)

A 12306 ticket search server based on the Model Context Protocol (MCP). The server provides a simple API interface that allows users to search for 12306 tickets.

基于 Model Context Protocol (MCP) 的12306购票搜索服务器。提供了简单的API接口,允许大模型利用接口搜索12306购票信息。

如需Skill -> https://github.com/Joooook/12306-skill

🚩Features

| 功能描述 | 状态 | |------------------------------|--------| | 查询12306购票信息 | ✅ 已完成 | | 过滤列车信息 | ✅ 已完成 | | 过站查询 | ✅ 已完成 | | 中转查询 | ✅ 已完成 | | 其余接口,欢迎提feature | 🚧 计划内 |

⚙️Installation

git clone https://github.com/Joooook/12306-mcp.git
npm i

▶️Quick Start

CLI-stdio

npx -y 12306-mcp

CLI-http

npx -y 12306-mcp --port [端口号]

Runtime requirements

The server requires Node.js 18 or newer. The npm run debug command uses MCP Inspector 2.0.0, which requires Node.js 22.19.0 or newer.

MCP sever configuration

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

Docker-stdio

docker build . -t 12306-mcp
docker run --rm -it 12306-mcp npx 12306-mcp

Docker-http

docker build . -t 12306-mcp
docker run -p [your_port]:8080 -d 12306-mcp npx 12306-mcp --port 8080

📚Documentation

👉️Reference

💭Murmurs

本项目仅用于学习,欢迎催更。

🎫Badges

12306-mcp MCP server [![MseeP.ai Security Assessment Badge](https://mseep.net/pr/joooook-12306-mcp-badge.png)](https://mseep.ai/app/joooook-12306-mcp)

☕️Donate

请我喝杯奶茶吧。

📈 近 7 天 Star 趋势

每日新增 Star(柱)与累计 Star(线)· 数据来自 GitHub

🏆 排名变化趋势

在各榜单中的排名历史(数字越小越靠前)

📋 历史上榜记录

每次快照的详细数据
日期 榜单 排名 周期新增 总 STAR