MCP Server 12306

● Active

io.github.drfccv/mcp-server-12306

An MCP server that provides 12306 ticket query

Connect this server

One click to install, or copy the config below. Suits: Claude Desktop · Cursor.

Add to Cursor Add to VS CodeClaude Desktop / Claude Code: paste the config below.

Or add it manually — claude_desktop_config.json (Claude Desktop) or .cursor/mcp.json (Cursor):

{
  "mcpServers": {
    "mcp-server-12306": {
      "command": "uvx",
      "args": [
        "mcp-server-12306"
      ]
    }
  }
}
One line, from the terminal
Claude Code
claude mcp add mcp-server-12306 -- uvx mcp-server-12306
OpenAI Codex CLI
codex mcp add mcp-server-12306 -- uvx mcp-server-12306
VS Code
code --add-mcp '{"name":"mcp-server-12306","type":"stdio","command":"uvx","args":["mcp-server-12306"]}'

Syntax from each client's docs (Claude Code: claude mcp add; Codex: codex mcp add; VS Code: code --add-mcp). Placeholders in angle brackets are values you fill in.

A starting point — check the repository for exact arguments and setup. Restart your client after editing the config.

Category
Business & CRM
Version
0.3.1
Registry
active
Published
Feb 9, 2026
Listed in:Official MCP registry ↗how this is checked

Is it safe? Is it maintained?

Serverdex check: Nov 26, 2026

Looks healthy: MCP Server 12306 is maintained, open source.

Maintained
Active
Last commit 6 days ago (Nov 23, 2026), 1 open issues.
Official registry
Active
Published as io.github.drfccv/mcp-server-12306 in the official MCP registry, version 0.3.1.
Source
Open source, MIT
Public repository under the MIT licence, 426 stars, 59 forks.
Runs
On your machine
A local PyPI package started by your client; it can reach whatever your user account can.
Credentials
None declared
The registry entry declares no required environment variables.
Owner
Unclaimed
Nobody has claimed this page yet; the data above comes from the registry, GitHub and the live check.

Facts only: last commit and licence from GitHub, the entry's status from the official registry, credentials from the live check. Not a code audit — run the security scan on the endpoint yourself.

A

Grade A · Production-ready

Maintenance & production-readiness — 94/100 from the six repository signals below. A comparable rollup, not a code audit.

  • Recent commits+30/30

    Last commit 6 days ago.

  • Open licence+15/15

    MIT on GitHub.

  • Documentation+15/15

    The repository ships a README.

  • Adoption+14/20

    426 GitHub stars.

  • Registry status+12/12

    Active in the official MCP registry.

  • Product surface+8/8

    Has a homepage or a published package/endpoint.

Own this server? Add the grade badge — it links back here

<a href="https://serverdex.io/server/io-github-drfccv-mcp-server-12306?utm_source=report-badge"><img src="https://serverdex.io/server/io-github-drfccv-mcp-server-12306/report-badge.svg" alt="MCP Server 12306 — Serverdex Report Card A" height="22"></a>

Compare every server's grade on best-maintained MCP servers.

On GitHub

read Nov 24, 2026
Stars
426
Forks
59
Last push
Nov 23, 2026
License
MIT

Python12306agentaimcpmcp-serversmcp-tools

From the README

🚄 MCP Server 12306 基于 Model Context Protocol (MCP) 的 12306 火车票查询服务 支持 余票 / 票价 / 车站 / 经停 / 换乘 / 时间 六大查询能力,开箱即用,适配 AI 助手、自动化脚本、智能终端等场景。 📑 目录 • 🚄 MCP Server 12306 • 📑 目录 • ✨ 功能特性 • 🚀 快速开始 • 环境要求 • 方式一:Stdio 模式(本地客户端推荐) • 方式二:Streamable HTTP 模式(远程部署) • 方式三:Docker 部署 • 🛠️ 工具一览 • ⚙️ 配置项 • 🏗️ 项目结构 • 🧑‍💻 开发指南 • 📚 详细文档 • ⚠️ 免责声明 • 📄 License ✨ 功能特性 🚀 快速开始 环境要求 | Python | >= 3.10, 💡 推荐使用 uv:环境隔离、安装快、锁文件管理依赖版本。 方式一:Stdio 模式(本地客户端推荐) MCP Server 通过标准输入/输出与客户端通信,不占用网络端口,适合 Claude Desktop、Cursor 等本地 MCP 客户端。 安装: 客户端配置(如 claudedesktopconfig.json): 其他安装方式(点击展开) pipx: 本地源码(开发者调试): 方式二:Streamable HTTP 模式(远程部署) Server 启动 Web 服务(默认 8000 端口),通过 MCP Streamable HTTP 协议通信:POST 发送 JSON-RPC、GET 订阅流式响应、DELETE 结束会话。 启动: 客户端配置: 内置 HTTP 端点: 方式三:Docker 部署 🛠️ 工具一览 📖 每个工具的参数说明、返回示例、调用示例详见 📚 详细文档。 ⚙️ 配置项 通过环境变量或项目根目录 .env 文件配置: 🏗️ 项目结构 🧑‍💻 开发指南 架构要点: • server.py 是传输无关的核心模块——工具注册(TOOLHANDLERS)与业务分发(calltool)都在此,stdio 与 HTTP 复用同一实例,保证两种模式行为完全一致。 • 工具 Schema 单一来源于 ticketservice.MCPTOOLS,HTTP 的 /schema/tools 端点与 MCP 工具列表同源。 • 网络请求统一走 requestwith_retry`(自动重试 + init 会话保持),业务错误与网络错误分离处理。 📚 详细文档 每份文档均包含:功能说明、实现方法、请求参数、返回示例与典型调用方式。 ⚠️ 免责声明 • 本项目仅供学习、研究与技术交流,严禁用于任何商业用途。 • 本项目仅作为官方公开接口的智能聚合与转发。 • 使用本项目造成的任何后果(包括但不限于账号封禁、数据异常、法律风险等)均由使用者本人承担,项目作者不承担任何责任。 • 请遵守中国法律法规及 12306 官方相关规定,合理合规使用。 📄 License MIT © Drfccv ⭐ 如果这个项目对你有帮助,欢迎 Star 支持!

Read the full README on GitHub →

The most-starred Business & CRM servers in the index, with their live-check result.

ServerStarsLast pushLive check
JobSpy4,817Nov 2026Local / not checked
Relaticle1,944Nov 2026Needs sign-in
ChatbotX1,281Nov 2026Needs sign-in
Spanish Top Tech Companies617Nov 2026Working
MCP Odoo435Aug 2026Local / not checked

MCP Server 12306: questions people ask

Is MCP Server 12306 a remote or a local MCP server?
According to its entry in the official MCP registry, MCP Server 12306 ships as a local package (PyPI) that your client starts on your machine.
Is MCP Server 12306 safe to use?
Looks healthy: MCP Server 12306 is maintained, open source. In detail — maintained: Active; official registry: Active; source: Open source, MIT; runs: On your machine; credentials: None declared. Serverdex check of Nov 26, 2026. This is a reading of the repository, the registry entry and the live check, not a code audit; run the Serverdex security scan on the endpoint before trusting it with real data.
Is MCP Server 12306 still maintained?
Active: the repository's last commit 6 days ago. Last push Nov 23, 2026, 426 GitHub stars, MIT licence. Read from GitHub on Nov 24, 2026.
How do I add MCP Server 12306 to Claude, Cursor or VS Code?
Copy the config in "Connect this server" into your client's MCP config file (claude_desktop_config.json, ~/.cursor/mcp.json or .vscode/mcp.json), or use the one-click Add to Cursor / Add to VS Code buttons and the one-line commands for Claude Code and Codex; then restart the client.
Browse all Business & CRM →

Add the badge to your site

Show visitors that MCP Server 12306 is listed here — it’s also the link we check for a free listing.

MCP Server 12306 — listed on Serverdex

HTML — for your website

<a href="https://serverdex.io/server/io-github-drfccv-mcp-server-12306?utm_source=badge"><img src="https://serverdex.io/brand/badge.svg" alt="MCP Server 12306 — listed on Serverdex" width="123" height="40" loading="lazy"></a>

Recommended. A dofollow link from your own domain is the one that counts for search engines, and it's the link we check for a free listing.

Markdown — for your README

[![MCP Server 12306 — listed on Serverdex](https://serverdex.io/brand/badge.svg)](https://serverdex.io/server/io-github-drfccv-mcp-server-12306?utm_source=badge)

Nice for visibility, but GitHub marks README links nofollow, so it doesn't pass authority. Use the HTML badge on your site as well.

Add to CursorAdd to VS CodeOpen in Claude Code

Install buttons — for your README

[![Add to Cursor](https://serverdex.io/brand/install-cursor.svg)](https://serverdex.io/install/cursor/io-github-drfccv-mcp-server-12306) [![Add to VS Code](https://serverdex.io/brand/install-vscode.svg)](https://serverdex.io/install/vscode/io-github-drfccv-mcp-server-12306) [![Open in Claude Code](https://serverdex.io/brand/install-claude-code.svg)](https://serverdex.io/install/claude-code/io-github-drfccv-mcp-server-12306)

One click opens Cursor or VS Code with this server's config prefilled; the Claude Code button lands on the one-line command. The links point at Serverdex, so when your config changes the buttons keep working.

Install buttons — HTML for your docs

<a href="https://serverdex.io/install/cursor/io-github-drfccv-mcp-server-12306"><img src="https://serverdex.io/brand/install-cursor.svg" alt="Add to Cursor — via Serverdex" width="140" height="28"></a>
<a href="https://serverdex.io/install/vscode/io-github-drfccv-mcp-server-12306"><img src="https://serverdex.io/brand/install-vscode.svg" alt="Add to VS Code — via Serverdex" width="147" height="28"></a>
<a href="https://serverdex.io/install/claude-code/io-github-drfccv-mcp-server-12306"><img src="https://serverdex.io/brand/install-claude-code.svg" alt="Open in Claude Code — via Serverdex" width="180" height="28"></a>

Same buttons as plain links for a docs page or website.

Prefer a live badge with the score, stars and live check? Score badge (links to a page that explains the number and back to this listing).