Joooook

12306 mcp

Built by Joooook • 759 stars

What is 12306 mcp?

A high-performance MCP server implementation for 12306-mcp that bridges the gap between the Model Context Protocol and external services. It allows Large Language Models to interact with your data and tools with low latency and native support.

How to use 12306 mcp?

1. Ensure you have an MCP-compatible client (like Claude Desktop) installed. 2. Configure your server with: npx @modelcontextprotocol/12306-mcp 3. Restart your client and verify the new tools are available in the system catalog.
🛡️ Scoped (Restricted)
npx @modelcontextprotocol/12306-mcp --scope restricted
🔓 Unrestricted Access
npx @modelcontextprotocol/12306-mcp

Key Features

Native MCP Protocol Support
High-performance Data Streaming
Type-safe Tool Definitions
Seamless Environment Integration

Optimized Use Cases

Connecting external databases to AI workflows
Automating workflow tasks via natural language
Augmenting developer productivity with specialized tools

12306 mcp FAQ

Q

What is an MCP server?

MCP is an open standard that enables developers to build secure, two-way integrations between AI models and local or remote data sources.

Q

Is this server ready for production?

Yes, this server follows standard MCP security patterns and tool-restricted access.

Official Documentation

View on GitHub

<div align="center">12306-mcp</div>

<div align="center">

</div>

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

<div align="center">🚩Features</div>

<div align="center">
功能描述状态
查询12306购票信息✅ 已完成
过滤列车信息✅ 已完成
过站查询✅ 已完成
中转查询✅ 已完成
其余接口,欢迎提feature🚧 计划内
</div> <div align="center"> <img src="https://s2.loli.net/2025/04/15/UjbrG5esaSEmJxN.jpg" width=800px/> </div> <div align="center"> <img src="https://s2.loli.net/2025/04/15/rm1j8zX7sqiyafP.jpg" width=800px/> </div>

<div align="center">⚙️Installation</div>

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

<div align="center">▶️Quick Start</div>

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

<div align="center">📚Documentation</div>

<div align="center">👉️Reference</div>

<div align="center">💭Murmurs</div>

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

<div align="center">🎫Badges</div>

<div align="center"> <a href="https://glama.ai/mcp/servers/@Joooook/12306-mcp"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@Joooook/12306-mcp/badge" alt="12306-mcp MCP server" /> </a>

MseeP.ai Security Assessment Badge

</div>

<div align="center">☕️Donate</div>

请我喝杯奶茶吧。

<div align="center"> <a href="https://afdian.com/item/2a0e0cdcadf911ef9f725254001e7c00"> <img src="https://s2.loli.net/2024/11/29/1JBxzphs7V6WcK9.jpg" width="500px"> </a> </div>

Global Ranking

6.8
Trust ScoreMCPHub Index

Based on codebase health & activity.

Manual Config

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