{"_id":"@bachstudio/12306-mcp","_rev":"2-313876acee8705f19567198f0ea2041f","name":"@bachstudio/12306-mcp","dist-tags":{"latest":"0.3.8"},"versions":{"0.3.7":{"name":"@bachstudio/12306-mcp","version":"0.3.7","keywords":["mcp","12306","mcp-server"],"author":{"name":"bachstudio"},"license":"MIT","_id":"@bachstudio/12306-mcp@0.3.7","maintainers":[{"name":"bachstudio","email":"bach_mcp_studio@bach.team"}],"bin":{"12306-mcp":"build/index.js"},"dist":{"shasum":"fe8a29353952a5931b330973190ac7a28366b0a2","tarball":"https://registry.npmjs.org/@bachstudio/12306-mcp/-/12306-mcp-0.3.7.tgz","fileCount":5,"integrity":"sha512-9NsbriJfSSHkiE0/1uMM95Zqi3YDI9ViowYTRyOTQxiga2x68RN794UlwFbhnl+ebuMgewrA3x+c8MESHJqrjA==","signatures":[{"sig":"MEYCIQCUa+MAIrWfC8iJER18GKb5p4Q5Z8Pa97GLNUKSW+Dk/gIhAJIH3EgYBWgrVExyELJ6RR85XfwIgyP4MhwWpEOyg9PM","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":53647},"main":"build/index.js","type":"module","gitHead":"3ba060e8711d92494c1f5549554b0fbd7e5e746b","scripts":{"test":"tsc && node ./build/index.js","build":"tsc","debug":"tsc && npx @modelcontextprotocol/inspector node ./build/index.js","prepare":"npm run build","prebuild":"run-script-os","postbuild":"run-script-os","test:http":"tsc && node ./build/index.js --port 8080","prebuild:win32":"del /q /s build\\* >nul 2>&1","prebuild:default":"rm -rf build/*","postbuild:default":"","postbuild:darwin:linux":"chmod +x build/index.js"},"_npmUser":{"name":"bachstudio","email":"bach_mcp_studio@bach.team"},"_npmVersion":"9.6.7","description":"This is a 12306 ticket search server based on the Model Context Protocol (MCP). ","directories":{},"_nodeVersion":"18.17.1","dependencies":{"zod":"^3.24.2","axios":"^1.8.4","date-fns":"^4.1.0","commander":"^14.0.0","date-fns-tz":"^3.2.0","mcp-http-server":"^1.1.5","@modelcontextprotocol/sdk":"^1.9.0","@modelcontextprotocol/inspector":"^0.16.5"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.3","@types/node":"^22.14.1","run-script-os":"^1.1.6"},"_npmOperationalInternal":{"tmp":"tmp/12306-mcp_0.3.7_1763631677859_0.4633375151136292","host":"s3://npm-registry-packages-npm-production"}},"0.3.8":{"name":"@bachstudio/12306-mcp","version":"0.3.8","main":"build/index.js","scripts":{"prebuild":"run-script-os","prebuild:win32":"del /q /s build\\* >nul 2>&1","prebuild:default":"rm -rf build/*","build":"tsc","postbuild":"run-script-os","postbuild:darwin:linux":"chmod +x build/index.js","postbuild:default":"","prepare":"npm run build","test":"tsc && node ./build/index.js","test:http":"tsc && node ./build/index.js --port 8080","debug":"tsc && npx @modelcontextprotocol/inspector node ./build/index.js"},"keywords":["mcp","12306","mcp-server"],"author":{"name":"bachstudio"},"license":"MIT","description":"This is a 12306 ticket search server based on the Model Context Protocol (MCP). ","dependencies":{"@modelcontextprotocol/inspector":"^0.16.5","@modelcontextprotocol/sdk":"^1.9.0","axios":"^1.8.4","commander":"^14.0.0","date-fns":"^4.1.0","date-fns-tz":"^3.2.0","mcp-http-server":"^1.1.5","zod":"^3.24.2"},"devDependencies":{"@types/node":"^22.14.1","run-script-os":"^1.1.6","typescript":"^5.8.3"},"type":"module","bin":{"12306-mcp":"build/index.js"},"gitHead":"3ba060e8711d92494c1f5549554b0fbd7e5e746b","_id":"@bachstudio/12306-mcp@0.3.8","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-W2LCf+5n7Kh0PWuYCIML5BBuuNmY/FINzUnThOfsTIAWaoK/xsEqnTWhGH4MgRFnKzAxFVQce1Vy9TxbFMKLIw==","shasum":"d609c2fc23ad7df1c95c5e7ebafc1bc4bac92605","tarball":"https://registry.npmjs.org/@bachstudio/12306-mcp/-/12306-mcp-0.3.8.tgz","fileCount":5,"unpackedSize":53647,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICLCm80MNXNPYLruQC7lqC7dU0+84aNbr3o6Q81mNrZKAiEAnzBxqKxL0VW0GI3fcS0l5/g5ZNBD4GVRsRbehnnXlUU="}]},"_npmUser":{"name":"bachstudio","email":"bach_mcp_studio@bach.team"},"directories":{},"maintainers":[{"name":"bachstudio","email":"bach_mcp_studio@bach.team"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/12306-mcp_0.3.8_1763631727758_0.30527556782443055"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-20T09:41:17.749Z","modified":"2025-11-20T09:42:08.445Z","0.3.7":"2025-11-20T09:41:18.034Z","0.3.8":"2025-11-20T09:42:07.933Z"},"author":{"name":"bachstudio"},"license":"MIT","keywords":["mcp","12306","mcp-server"],"description":"This is a 12306 ticket search server based on the Model Context Protocol (MCP). ","maintainers":[{"name":"bachstudio","email":"bach_mcp_studio@bach.team"}],"readme":"# <div align=\"center\">12306-mcp</div>\n\n<div align=\"center\">\n\n[![](https://img.shields.io/badge/Joooook-blue.svg?logo=github&lable=python&labelColor=497568&color=497568&style=flat-square)](https://github.com/Joooook)\n[![](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)\n![](https://img.shields.io/badge/typescript-blue.svg?logo=typescript&lable=typescript&logoColor=white&labelColor=192c3b&color=192c3b&style=flat-square)\n![](https://img.shields.io/github/stars/Joooook/12306-mcp?logo=reverbnation&lable=python&logoColor=white&labelColor=ffc773&color=ffc773&style=flat-square)\n![](https://img.shields.io/github/last-commit/Joooook/12306-mcp.svg?style=flat-square)\n![](https://img.shields.io/github/license/Joooook/12306-mcp.svg?style=flat-square&color=000000)\n</div>\n\nA 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.\n\n基于 Model Context Protocol (MCP) 的12306购票搜索服务器。提供了简单的API接口，允许大模型利用接口搜索12306购票信息。\n\n## <div align=\"center\">🚩Features</div>\n<div align=\"center\"> \n\n| 功能描述                         | 状态     |\n|------------------------------|--------|\n| 查询12306购票信息              | ✅ 已完成  |\n| 过滤列车信息                   | ✅ 已完成  |\n| 过站查询                      | ✅ 已完成 |\n| 中转查询                      | ✅ 已完成 |\n| 其余接口，欢迎提feature         | 🚧 计划内 |\n\n</div>\n<div align=\"center\"> \n  <img src=\"https://s2.loli.net/2025/04/15/UjbrG5esaSEmJxN.jpg\" width=800px/>\n</div>\n<div align=\"center\"> \n  <img src=\"https://s2.loli.net/2025/04/15/rm1j8zX7sqiyafP.jpg\" width=800px/>\n</div>\n\n## <div align=\"center\">⚙️Installation</div>\n\n~~~bash\ngit clone https://github.com/Joooook/12306-mcp.git\nnpm i\n~~~\n\n\n## <div align=\"center\">▶️Quick Start</div>\n\n### CLI-stdio\n~~~bash\nnpx -y 12306-mcp\n~~~\n\n### CLI-http\n~~~bash\nnpx -y 12306-mcp --port [端口号]\n~~~\n\n### MCP sever configuration\n\n~~~json\n{\n    \"mcpServers\": {\n        \"12306-mcp\": {\n            \"command\": \"npx\",\n            \"args\": [\n                \"-y\",\n                \"12306-mcp\"\n            ]\n        }\n    }\n}\n\n~~~\n\n### Docker-stdio\n~~~bash\ndocker build . -t 12306-mcp\ndocker run --rm -it 12306-mcp npx 12306-mcp\n~~~\n\n### Docker-http\n~~~bash\ndocker build . -t 12306-mcp\ndocker run -p [your_port]:8080 -d 12306-mcp npx 12306-mcp --port 8080\n~~~\n\n\n\n## <div align=\"center\">📚Documentation</div>\n\n- [服务原理详解](./docs/principle.md)  12306-MCP服务的工作原理\n- [架构图](./docs/architecture.md)  12306-MCP服务的架构图\n   ![12306-MCP 服务架构图](./docs/architecture.png)\n\n## <div align=\"center\">👉️Reference</div>\n- [modelcontextprotocol/modelcontextprotocol](https://github.com/modelcontextprotocol/modelcontextprotocol)\n- [modelcontextprotocol/typescript-sdk](https://github.com/modelcontextprotocol/typescript-sdk)\n\n## <div align=\"center\">💭Murmurs</div>\n本项目仅用于学习，欢迎催更。\n\n## <div align=\"center\">🎫Badges</div>\n<div align=\"center\"> \n<a href=\"https://glama.ai/mcp/servers/@Joooook/12306-mcp\">\n  <img width=\"380\" height=\"200\" src=\"https://glama.ai/mcp/servers/@Joooook/12306-mcp/badge\" alt=\"12306-mcp MCP server\" />\n</a>\n\n[![MseeP.ai Security Assessment Badge](https://mseep.net/pr/joooook-12306-mcp-badge.png)](https://mseep.ai/app/joooook-12306-mcp)\n\n</div>\n\n## <div align=\"center\">☕️Donate</div>\n请我喝杯奶茶吧。\n<div align=\"center\"> \n<a href=\"https://afdian.com/item/2a0e0cdcadf911ef9f725254001e7c00\">\n  <img src=\"https://s2.loli.net/2024/11/29/1JBxzphs7V6WcK9.jpg\" width=\"500px\">\n</a>\n</div>\n","readmeFilename":"README.md"}