mcpField
非
非官方的同程旅行 MCP Server

非官方的同程旅行 MCP Server

Local
github.com/wuchubuzai2018Maps & Travel9Updated 78w ago

About 非官方的同程旅行 MCP Server

An unofficial Tongcheng Travel MCP server for clients that need train-service listings and the current time. It currently supports integration through TypeScript and Node.js.

Key features

  1. 01Query train service listings
  2. 02Retrieve the current time
  3. 03TypeScript integration

Use cases

  1. 01Check train services for a planned trip
  2. 02Get the current time during travel queries

MCP support

As an MCP server, it exposes train-service lookup and current-time tools to MCP clients.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"tongchenglvxing": {
"command": "npx",
"args": [
"-y",
"@wuchubuzai/tongchenglvxing-mcp-server"
]
}
}
}
Run commandnpx -y @wuchubuzai/tongchenglvxing-mcp-server

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@wuchubuzai/tongchenglvxing-mcp-server

Tools

2

Saved tool list · updated 3w ago

ParameterTypeRequiredDescription
depStationNamestringYesName of the departure railway station or departure city. Accepts the full station name (e.g., Beijing West Railway Station) or city name (e.g., Beijing).
arrStationNamestringYesName of the destination railway station or destination city. Accepts the full station name (e.g., Beijing West Railway Station) or city name (e.g., Beijing).
depDatestringYesDeparture date: must use the format yyyy-MM-dd

Details

From the project README

非官方的同程旅行 MCP Server

概述

目前支持对接同程旅行网站上的的火车票的接口,获取指定火车票的车次列表信息。

依赖MCP Typescript SDK开发,目前提供Node方式的对接,Java方式后续提供。

功能

目前支持2个工具方法:

工具方法1:火车票车次列表查询功能

工具方法2:当前时间查询功能

具体查看:https://github.com/wuchubuzai2018/tongchenglvxing-mcp-server/tree/main/typescript-mcp

开始

使用MCP Server主要通过两种形式,计划分别是java和Typescript,目前已支持TypeScript方式。

Typescript接入

详细信息可以参考typescript-mcp文件夹下的说明。

nodejs安装

通过Typescript接入,你只需要安装node.js。

当你在终端可以运行

node -v

则说明你的node.js已经安装成功。

NPX本地开发环境接入

下载项目后,执行npm install进行项目构建,然后再MCP Client中进行配置。

{
  "mcpServers": {
    "tongchenglvxing-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "/Users/tongchenglvxing-mcp-server/dist/index.js"
      ]
    }
  }
}
NPX已发布环境/支持MCP的客户端接入
{
  "mcpServers": {
    "tongchenglvxing-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@wuchubuzai/tongchenglvxing-mcp-server"
      ]
    }
  }
}

更新

版本功能说明更新日期
V0.0.1MCP Server初始版本,简单支持下火车票车次查询2025-04-29
V0.0.2代码优化,增加UserAgent处理2025-04-29

反馈

在使用MCP Server时遇到的任何问题,欢迎通过issue或是反馈给我,非常感谢各位的支持与贡献❤️

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.