Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

tongchenglvxing-mcp-server

MCP.Pizza Chef: wuchubuzai2018

The tongchenglvxing-mcp-server is an unofficial MCP server that interfaces with Tongcheng Travel's train ticket system. It currently supports querying train schedules and provides two main tool methods: train schedule listing and current time retrieval. Developed using the MCP Typescript SDK, it offers Node.js integration with plans for Java support. This server enables real-time access to train trip data from Tongcheng Travel's platform, facilitating travel planning and ticket information retrieval.

Use This MCP server To

Query train schedules from Tongcheng Travel website Retrieve current time for synchronization in travel apps Integrate train ticket data into travel planning tools Enable real-time train trip information in MCP clients Develop travel assistant features using train schedule data

README

非官方的同程旅行 MCP Server

概述

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

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

功能

目前支持2个工具方法:

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

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

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

开始

使用MCP Server主要通过两种形式,计划分别是javaTypescript,目前已支持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.1 MCP Server初始版本,简单支持下火车票车次查询 2025-04-29
V0.0.2 代码优化,增加UserAgent处理 2025-04-29

反馈

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

tongchenglvxing-mcp-server FAQ

How do I install the tongchenglvxing-mcp-server for Node.js?
Install Node.js from the official site, verify with 'node -v', then use npm to install dependencies.
Can I use this MCP server with Java?
Java support is planned but currently only TypeScript/Node.js integration is available.
What tool methods does this MCP server provide?
It provides train schedule listing and current time query methods.
How do I configure this MCP server in an MCP client?
Use the provided JSON configuration with 'npx' command and the server's path or package name.
Is this MCP server officially supported by Tongcheng Travel?
No, it is an unofficial implementation.
What SDK is used to develop this MCP server?
It is developed using the MCP Typescript SDK.
Can this server be used to book train tickets?
No, it currently only supports querying train schedules, not booking.
Where can I find more documentation?
Documentation is available in the GitHub repository under the typescript-mcp folder.