Skip to content
Back to search

12306-mcp

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

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/joooook--12306-mcp/badge.svg)](/listings/joooook--12306-mcp)

HTML

<a href="/listings/joooook--12306-mcp"><img src="/api/listings/joooook--12306-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

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

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 123 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # <div align="center">12306-mcp</div>
  2. <div align="center">
  3. [![](https://img.shields.io/badge/Joooook-blue.svg?logo=github&lable=python&labelColor=497568&color=497568&style=flat-square)](https://github.com/Joooook)
  4. [![](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)
  5. ![](https://img.shields.io/badge/typescript-blue.svg?logo=typescript&lable=typescript&logoColor=white&labelColor=192c3b&color=192c3b&style=flat-square)
  6. ![](https://img.shields.io/github/stars/Joooook/12306-mcp?logo=reverbnation&lable=python&logoColor=white&labelColor=ffc773&color=ffc773&style=flat-square)
  7. ![](https://img.shields.io/github/last-commit/Joooook/12306-mcp.svg?style=flat-square)
  8. ![](https://img.shields.io/github/license/Joooook/12306-mcp.svg?style=flat-square&color=000000)
  9. </div>
  10. 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.
  11. 基于 Model Context Protocol (MCP) 的12306购票搜索服务器。提供了简单的API接口,允许大模型利用接口搜索12306购票信息。
  12. **如需Skill -> https://github.com/Joooook/12306-skill**
  13. ## <div align="center">🚩Features</div>
  14. <div align="center">
  15. | 功能描述 | 状态 |
  16. |------------------------------|--------|
  17. | 查询12306购票信息 | ✅ 已完成 |
  18. | 过滤列车信息 | ✅ 已完成 |
  19. | 过站查询 | ✅ 已完成 |
  20. | 中转查询 | ✅ 已完成 |
  21. | 其余接口,欢迎提feature | 🚧 计划内 |
  22. </div>
  23. <div align="center">
  24. <img src="https://s2.loli.net/2025/04/15/UjbrG5esaSEmJxN.jpg" width=800px/>
  25. </div>
  26. <div align="center">
  27. <img src="https://s2.loli.net/2025/04/15/rm1j8zX7sqiyafP.jpg" width=800px/>
  28. </div>
  29. ## <div align="center">⚙️Installation</div>
  30. ~~~bash
  31. git clone https://github.com/Joooook/12306-mcp.git
  32. npm i
  33. ~~~
  34. ## <div align="center">▶️Quick Start</div>
  35. ### CLI-stdio
  36. ~~~bash
  37. npx -y 12306-mcp
  38. ~~~
  39. ### CLI-http
  40. ~~~bash
  41. npx -y 12306-mcp --port [端口号]
  42. ~~~
  43. ### Runtime requirements
  44. The server requires Node.js 18 or newer. The `npm run debug` command uses
  45. MCP Inspector 2.0.0, which requires Node.js 22.19.0 or newer.
  46. ### MCP sever configuration
  47. ~~~json
  48. {
  49. "mcpServers": {
  50. "12306-mcp": {
  51. "command": "npx",
  52. "args": [
  53. "-y",
  54. "12306-mcp"
  55. ]
  56. }
  57. }
  58. }
  59. ~~~
  60. ### Docker-stdio
  61. ~~~bash
  62. docker build . -t 12306-mcp
  63. docker run --rm -it 12306-mcp npx 12306-mcp
  64. ~~~
  65. ### Docker-http
  66. ~~~bash
  67. docker build . -t 12306-mcp
  68. docker run -p [your_port]:8080 -d 12306-mcp npx 12306-mcp --port 8080
  69. ~~~
  70. ## <div align="center">📚Documentation</div>
  71. - [服务原理详解](./docs/principle.md) 12306-MCP服务的工作原理
  72. - [架构图](./docs/architecture.md) 12306-MCP服务的架构图
  73. ![12306-MCP 服务架构图](./docs/architecture.png)
  74. ## <div align="center">👉️Reference</div>
  75. - [modelcontextprotocol/modelcontextprotocol](https://github.com/modelcontextprotocol/modelcontextprotocol)
  76. - [modelcontextprotocol/typescript-sdk](https://github.com/modelcontextprotocol/typescript-sdk)
  77. ## <div align="center">💭Murmurs</div>
  78. 本项目仅用于学习,欢迎催更。
  79. ## <div align="center">🎫Badges</div>
  80. <div align="center">
  81. <a href="https://glama.ai/mcp/servers/@Joooook/12306-mcp">
  82. <img width="380" height="200" src="https://glama.ai/mcp/servers/@Joooook/12306-mcp/badge" alt="12306-mcp MCP server" />
  83. </a>
  84. [![MseeP.ai Security Assessment Badge](https://mseep.net/pr/joooook-12306-mcp-badge.png)](https://mseep.ai/app/joooook-12306-mcp)
  85. </div>
  86. ## <div align="center">☕️Donate</div>
  87. 请我喝杯奶茶吧。
  88. <div align="center">
  89. <a href="https://afdian.com/item/2a0e0cdcadf911ef9f725254001e7c00">
  90. <img src="https://s2.loli.net/2024/11/29/1JBxzphs7V6WcK9.jpg" width="500px">
  91. </a>
  92. </div>

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.