Install mcp-server-12306 from PyPI
Install exact version 0.5.0.post20260822. The executable name has not been verified, so it is intentionally not guessed.
python -m pip install 'mcp-server-12306==0.5.0.post20260822'A high-performance FastAPI backend for train ticket queries in China, supporting real-time ticket availability, station information, transfers, and train schedules through the Model Context Protocol for AI assistants and automation
Detailed security scan evidence is not public for this MCP yet. Public identity, registry metadata, and independently observed protocol inventory remain available.
Installation and connection instructions are shown only when supported by retained package, repository, or endpoint evidence.
Install exact version 0.5.0.post20260822. The executable name has not been verified, so it is intentionally not guessed.
python -m pip install 'mcp-server-12306==0.5.0.post20260822'Clone the canonical public repository, then follow its version-specific setup documentation.
git clone https://github.com/drfccv/mcp-server-12306| Canonical slug | 12306-mcp-server-1556e80b | Deployment | Local Only |
|---|---|---|---|
| Canonical package | pypi:mcp-server-12306 | Repository | https://github.com/drfccv/mcp-server-12306 |
| First published | Aug 7, 2026 | Latest release | Aug 22, 2026 |
| Last security verification | — | Classification confidence | 90% |
| Publication | Draft | Official distribution | Not verified |
| Channel | Identifier | Current version | Versions | Source |
|---|---|---|---|---|
| pypi | mcp-server-12306 | 0.5.0.post20260822 | 2 | Repository |
| Package | Version | Published / observed | Inventory | Security scan |
|---|---|---|---|---|
| pypimcp-server-12306 | 0.5.0.post20260822Current | Aug 22, 2026 | 7 toolsSucceeded · 0 resources · 0 prompts | Evidence restricted |
Independently scan the exact version your agents use, receive alerts when its risk changes, and investigate every finding with retained version evidence.
No public current-version evidence is available yet.
| Tool | Category | Annotations | Risk |
|---|---|---|---|
get-current-time获取当前日期和时间信息,支持相对日期计算。返回当前日期、时间,以及常用的相对日期(明天、后天等),方便用户在查询火车票时选择正确的日期。Input schema{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"timezone": {
"type": "string",
"title": "时区",
"description": "时区设置,默认为中国时区",
"default": "Asia/Shanghai"
},
"format": {
"type": "string",
"title": "日期格式",
"description": "返回的日期格式,默认为YYYY-MM-DD",
"default": "YYYY-MM-DD"
}
},
"type": "object",
"title": "获取当前时间参数",
"description": "获取当前时间和日期信息",
"additionalProperties": false
} | — | — | |
get-train-no-by-train-code车次号转官方唯一编号(train_no),支持三字码/全名。常用于经停站查询前置转换。Input schema{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"train_code": {
"type": "string",
"title": "车次号",
"minLength": 1
},
"from_station": {
"type": "string",
"title": "出发站id或全名",
"minLength": 1
},
"to_station": {
"type": "string",
"title": "到达站id或全名",
"minLength": 1
},
"train_date": {
"type": "string",
"title": "出发日期",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
"required": [
"train_code",
"from_station",
"to_station",
"train_date"
],
"type": "object",
"title": "车次号转编号参数",
"additionalProperties": false
} | — | — | |
get-train-route-stations列车经停站全表查询。支持输入车次号或官方编号,自动转换,返回所有经停站、到发时刻、停留时间。支持三字码/全名。Input schema{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"train_no": {
"type": "string",
"title": "车次编码",
"minLength": 1
},
"from_station": {
"type": "string",
"title": "出发站id",
"minLength": 1
},
"to_station": {
"type": "string",
"title": "到达站id",
"minLength": 1
},
"train_date": {
"type": "string",
"title": "出发日期",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
"required": [
"train_no",
"from_station",
"to_station",
"train_date"
],
"type": "object",
"title": "列车经停站查询参数",
"additionalProperties": false
} | — | — | |
query-ticket-price查询火车票价信息。输入出发站、到达站、日期,返回各车次的票价详情。支持指定车次号过滤。
【智能筛选指南】返回结果通常包含出发/到达城市的所有相关车站(如北京/北京西/北京南)。请根据用户输入语境灵活处理:
1. 用户仅输入城市名(如'九江'):请展示所有相关站点的车次,不要过滤。
2. 用户指定具体车站(如'九江站'):优先展示匹配车站的车次,但若其他同城车站有更优方案(如时间更短、有票),也应作为补充选项提供。
请避免机械地仅通过字符串匹配过滤车次,以免遗漏用户可能感兴趣的出行方案。Input schema{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"from_station": {
"type": "string",
"title": "出发站",
"minLength": 1
},
"to_station": {
"type": "string",
"title": "到达站",
"minLength": 1
},
"train_date": {
"type": "string",
"title": "出发日期",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"train_code": {
"type": "string",
"title": "车次号(可选)",
"description": "指定车次号(如G123),若提供则只返回该车次信息"
},
"purpose_codes": {
"type": "string",
"title": "乘客类型",
"description": "ADULT=成人, 0X=学生",
"default": "ADULT"
}
},
"required": [
"from_station",
"to_station",
"train_date"
],
"type": "object",
"title": "票价查询参数",
"additionalProperties": false
} | — | — | |
query-tickets官方12306余票/车次/座席/时刻一站式查询。输入出发站、到达站、日期,返回所有可购车次、时刻、历时、各席别余票等详细信息。支持中文名、三字码。
【智能筛选指南】返回结果通常包含出发/到达城市的所有相关车站(如北京/北京西/北京南)。请根据用户输入语境灵活处理:
1. 用户仅输入城市名(如'九江'):请展示所有相关站点的车次,不要过滤。
2. 用户指定具体车站(如'九江站'):优先展示匹配车站的车次,但若其他同城车站有更优方案(如时间更短、有票),也应作为补充选项提供。
请避免机械地仅通过字符串匹配过滤车次,以免遗漏用户可能感兴趣的出行方案。Input schema{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"from_station": {
"type": "string",
"title": "出发站",
"description": "出发车站名称,例如:北京、上海、广州",
"minLength": 1
},
"to_station": {
"type": "string",
"title": "到达站",
"description": "到达车站名称,例如:北京、上海、广州",
"minLength": 1
},
"train_date": {
"type": "string",
"title": "出发日期",
"description": "出发日期,格式:YYYY-MM-DD",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
"required": [
"from_station",
"to_station",
"train_date"
],
"type": "object",
"title": "车票查询参数",
"description": "查询火车票所需的参数",
"additionalProperties": false
} | — | — | |
query-transfer官方中转换乘方案查询。输入出发站、到达站、日期,可选中转站/无座/学生票,自动分页抓取全部中转方案,输出每段车次、时刻、余票、等候时间、总历时等详细信息。Input schema{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"from_station": {
"type": "string",
"title": "出发站"
},
"to_station": {
"type": "string",
"title": "到达站"
},
"train_date": {
"type": "string",
"title": "出发日期",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"middle_station": {
"type": "string",
"title": "中转站(可选)",
"description": "指定中转站名称或三字码,可选"
},
"isShowWZ": {
"type": "string",
"title": "是否显示无座车次(Y/N)",
"description": "Y=显示无座车次,N=不显示,默认N",
"default": "N"
},
"purpose_codes": {
"type": "string",
"title": "乘客类型(00=普通,0X=学生)",
"description": "00为普通,0X为学生,默认00"
}
},
"required": [
"from_station",
"to_station",
"train_date"
],
"type": "object",
"title": "中转查询参数",
"description": "查询A到B的中转换乘(含一次换乘)",
"additionalProperties": false
} | — | — | |
search-stations智能车站搜索。支持中文名、拼音、简拼、三字码(Code)。可用于模糊搜索(如'北京'),也可用于精确获取车站代码(如输入'BJP'返回北京站信息)。Input schema{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"query": {
"type": "string",
"title": "搜索关键词",
"description": "车站搜索关键词,支持:车站名称、拼音、简拼等",
"minLength": 1,
"maxLength": 20
},
"limit": {
"type": "integer",
"title": "结果数量限制",
"description": "返回结果的最大数量",
"minimum": 1,
"maximum": 50,
"default": 10
}
},
"required": [
"query"
],
"type": "object",
"title": "车站搜索参数",
"description": "搜索火车站所需的参数",
"additionalProperties": false
} | — | — |
| Endpoint | Transport | Authentication | Health | Observed |
|---|---|---|---|---|
| No verified remote endpoint is linked. | ||||
Install the selected package version with: python -m pip install 'mcp-server-12306==0.5.0.post20260822'
12306 MCP Server exposed 7 tools during independent protocol observation, including get-current-time, get-train-no-by-train-code, get-train-route-stations, query-ticket-price, query-tickets, query-transfer, search-stations.
The selected current version does not yet have completed public verification. Unknown does not mean clean or vulnerable.
Curated product and capability guides containing this catalog record.