tongchenglvxing
非官方的同程旅行网的火车票MCP Server,目前仅支持火车票车次查询
claude mcp add --transport stdio wuchubuzai2018-tongchenglvxing-mcp-server npx -y @wuchubuzai/tongchenglvxing-mcp-server
How to use
This MCP server provides two main tools for interacting with Tongcheng Lvxing's train ticket data. Tool 1 lets you query the list of train services for a given ticket route, enabling you to retrieve available train numbers and timing information. Tool 2 exposes a current time query utility, which can be useful for synchronization and time-based logic in client applications. The server is built with the MCP Typescript SDK and is designed to be used from MCP clients via Node.js (NPX) integration. To use it, deploy the MCP server package and configure your MCP client to load the server as a modular MCP service.
Typical usage involves loading the server through NPX in your MCP client configuration (as shown in the installation notes). Once loaded, you can call the provided MCP endpoints for: (1) train service lists for a route on a given date, and (2) the current server time. The Node.js-based approach is currently supported, with Java support planned for the future.
How to install
Prerequisites:
- Node.js and npm installed on your machine
- Basic familiarity with MCP client configuration
- Install Node.js if you haven't already: download from https://nodejs.org/ and verify with:
node -v
npm -v
- Install dependencies and build locally (if you are developing the MCP server):
git clone https://github.com/wuchubuzai2018/tongchenglvxing-mcp-server.git
cd tongchenglvxing-mcp-server
npm install
npm run build
- Use NPX to load the MCP server in your MCP client (published package):
{
"mcpServers": {
"tongchenglvxing-mcp-server": {
"command": "npx",
"args": [
"-y",
"@wuchubuzai/tongchenglvxing-mcp-server"
]
}
}
}
- Alternatively, run in development mode by pointing NPX at your built dist/index.js (local path):
{
"mcpServers": {
"tongchenglvxing-mcp-server": {
"command": "npx",
"args": [
"-y",
"/path/to/your/dist/index.js"
]
}
}
}
- Start your MCP client and verify the server is reachable through the configured MCP endpoints.
Additional notes
Tips and notes:
- The server currently supports two MCP tool methods: train ticket list retrieval and current time query.
- The published MCP package to use with NPX is @wuchubuzai/tongchenglvxing-mcp-server; you can also run a local build if you are developing against the TypeScript sources.
- Ensure your MCP client is configured to load external MCP servers and that network access to the package registry is allowed.
- If you encounter issues with Agent/User-Agent headers during HTTP requests, check for updates in the MCP SDK and ensure your environment variables are properly set if the server relies on them (e.g., timeouts, retries).
- When upgrading, review the release notes for changes to endpoints or input formats.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.