db-timetable-mcp

db-timetable-mcp

1

The DB Timetable MCP Server is a tool designed to access Deutsche Bahn's timetable data via its API through a Model Context Protocol (MCP) Server. It features tools for retrieving current and planned timetable data, tracking changes, and searching for stations. The server is highly configurable and can be extended with various advanced features.

DB Timetable MCP Server

A Model Context Protocol (MCP) Server for the Deutsche Bahn Timetable API offering MCP tools and resources to access timetable data, station information, and train changes.

Features

  • Current Timetables: Retrieve current timetable data for a station
  • Timetable Changes: Track the latest changes
  • Planned Timetables: Access scheduled timetable data for a specific time
  • Station Search: Search for stations by names or codes

Prerequisites

  • Node.js 18 or higher
  • API credentials for the DB Timetable API (Client-ID and Client-Secret)

Installation

  1. Clone the repository
  2. Install dependencies

Configuration

Create a .env file with necessary environment variables like DB_TIMETABLE_CLIENT_ID, DB_TIMETABLE_CLIENT_SECRET, and others.

Usage

Start the server in stdio or SSE mode for web clients. Test using FastMCP Inspector.

Development

Project structured with sources, tools, resources, and utils.

Potential Extensions

  • Data processing and enrichment
  • Advanced MCP tools

License

MCP Server: MIT License

DB Timetable API: Creative Commons 4.0 License