Searches 12306 China railway ticket availability, train schedules and stops for AI agents.
Setup
Choose your client, copy the config, then fill in any required environment variables.
Local
claude mcp add 12306 -- npx -y 12306-mcp~/.codex/config.toml
[mcp_servers.12306]
command = "npx"
args = ["-y", "12306-mcp"]
# codex mcp add 12306 -- npx -y 12306-mcp~/.cursor/mcp.json
{
"mcpServers": {
"12306": {
"command": "npx",
"args": [
"-y",
"12306-mcp"
]
}
}
}.vscode/mcp.json
{
"servers": {
"12306": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"12306-mcp"
]
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"12306": {
"command": "npx",
"args": [
"-y",
"12306-mcp"
]
}
}
}claude_desktop_config.json
{
"mcpServers": {
"12306": {
"command": "npx",
"args": [
"-y",
"12306-mcp"
]
}
}
}.trae/mcp.json
{
"mcpServers": {
"12306": {
"command": "npx",
"args": [
"-y",
"12306-mcp"
]
}
}
}Remote
claude mcp add --transport http 12306 https://rail--deniselewis200081.run.tools~/.codex/config.toml
[mcp_servers.12306]
url = "https://rail--deniselewis200081.run.tools"
# codex mcp add 12306 --url https://rail--deniselewis200081.run.tools~/.cursor/mcp.json
{
"mcpServers": {
"12306": {
"url": "https://rail--deniselewis200081.run.tools"
}
}
}.vscode/mcp.json
{
"servers": {
"12306": {
"type": "http",
"url": "https://rail--deniselewis200081.run.tools"
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"12306": {
"httpUrl": "https://rail--deniselewis200081.run.tools"
}
}
}claude_desktop_config.json · Customize › Connectors › Add custom connector
{
"mcpServers": {
"12306": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://rail--deniselewis200081.run.tools"
]
}
}
}.trae/mcp.json
{
"mcpServers": {
"12306": {
"url": "https://rail--deniselewis200081.run.tools"
}
}
}