Czech Railways (České dráhy) MCP Server

Czech Railways (České dráhy) MCP Server

Enables searching for train connections, stations, and ticket pricing on the Czech railway network via the official České dráhy API. It supports retrieving detailed connection information and passenger discount categories for travel planning.

Category
Visit Server

README

cd-mcp

MCP (Model Context Protocol) server for Czech Railways (České dráhy) API.

This server provides AI assistants with tools to search for train connections, stations, and prices on the Czech railway network.

Features

  • Search Locations: Find train stations and cities in the Czech Railways network
  • Search Connections: Search for train connections between two stations
  • Get Connection Details: Get detailed information about a specific connection
  • Get Passenger Types: List available passenger types and discount categories
  • Get Price Offers: Get pricing information for connections

Installation

npm install
npm run build

Usage

With Claude Desktop

Add to your Claude Desktop configuration (claude_desktop_config.json):

{
  "mcpServers": {
    "cd-mcp": {
      "command": "node",
      "args": ["/path/to/cd-mcp/dist/index.js"]
    }
  }
}

With MCP Inspector

npx @modelcontextprotocol/inspector node dist/index.js

Development

npm run dev

Available Tools

search_locations

Search for train stations and cities by name.

Parameters:

  • query (string, required): Search query (e.g., "Praha", "Brno")
  • type (string, optional): Location type filter (e.g., "station", "city")

search_connections

Search for train connections between two stations.

Parameters:

  • from (string, required): Departure station
  • to (string, required): Arrival station
  • departure (string, required): Departure date/time in ISO 8601 format
  • passengers (number, optional): Number of passengers (1-9, default: 1)

get_connection_details

Get detailed information about a specific connection.

Parameters:

  • handle (string, required): Connection search handle from previous search
  • connectionId (string, required): Connection identifier

get_passenger_types

Get available passenger types and discount categories.

Parameters: None

get_price_offer

Get a price offer for a connection (read-only, does not book tickets).

Parameters:

  • connectionId (string, required): Connection identifier
  • passengers (array, required): Array of passenger types and counts

Design Decisions

As a Principal Architect, the following design decisions were made:

  1. Read-only operations only: The server only exposes read operations (search, get details, pricing). Booking, payment, and refund operations are intentionally excluded for security reasons - these should require explicit user action through official channels.

  2. Stdio transport: Uses stdio transport for simple integration with MCP clients like Claude Desktop. HTTP transport can be added if needed.

  3. Error handling: All tools include proper error handling and return user-friendly error messages.

  4. Type safety: Full TypeScript implementation with proper type definitions for API responses.

  5. Formatting: Results are formatted for readability with emojis and structured text output.

API Reference

This server interfaces with the Czech Railways Ticket API:

  • Documentation: https://ticket-api.cd.cz/swaggerUI/cdapi-1.0.0.yml
  • Base URL: https://ticket-api.cd.cz/api/v1

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured