CD
- typescript
0
GitHub Stars
typescript
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"janprovaznik-cd-mcp": {
"command": "node",
"args": [
"/path/to/cd-mcp/dist/index.js"
]
}
}
}You run a lightweight MCP server that lets AI assistants look up Czech Railways locations, connections, passenger types, and prices using a read-only set of tools. It’s designed for safe integration with MCP clients via simple stdio commands, making it easy to build conversational flows around train schedules and fares.
How to use
You can connect an MCP client to the cd-mcp server to search locations, find connections, get connection details, discover passenger types, and fetch price offers. The server focuses on read-only operations for safety, and delivers results in a readable, emoji-enhanced format. For local integration, start the server with a standard runtime command and point your MCP client at it through the appropriate interface.
Typical usage patterns include: searching for stations or cities by name, looking up available train connections between two stations with a departure time, retrieving details about a specific connection, listing passenger types and discounts, and requesting price offers for a selected connection. Each operation returns structured data that your client can present in UI components or chat responses.
How to install
Prerequisites you need: Node.js installed on your system. You will also need a runtime environment capable of executing JavaScript/TypeScript builds.
Install dependencies and build the project:
npm install
npm run build
Configuration and runtime notes
Two ready-to-use runtime examples show how to connect MCP clients to this server. The commands are executed in your shell and passed to the MCP client configuration.
{
"mcpServers": {
"cd_mcp": {
"command": "node",
"args": ["/path/to/cd-mcp/dist/index.js"]
}
}
}
Additional runtime usage
You can also run the inspector variant to test MCP client interactions using the MCP Inspector tool. This runs a command via npx and launches the inspector against the local server code.
npx @modelcontextprotocol/inspector node dist/index.js
Available tools
search_locations
Find train stations and cities by name. Supports optional type filtering (station or city) and a query string.
search_connections
Search for train connections between two stations given a departure time and, optionally, the number of passengers.
get_connection_details
Retrieve detailed information about a specific connection using a search handle and connection identifier.
get_passenger_types
List available passenger types and discount categories for pricing.
get_price_offer
Fetch a price offer for a given connection and a set of passenger types/counts without booking.