YHT Bilet MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
YHT Bilet MCP Server
A Model Context Protocol (MCP) server for searching Turkish train (YHT/High-Speed Train) tickets via TCDD API.
Built with MCP TypeScript SDK
✨ Features
🚄 Real-time ticket availability from TCDD API
🗺️ Station name to ID mapping - automatic station resolution
📅 Smart date formatting - automatically formats dates for API (1 day prior at 21:00)
👥 Passenger count support - search for multiple passengers
♿ Wheelchair accessibility filter - option to include/exclude wheelchair-accessible seats
✅ Schema validation with Zod
🎯 Future train filtering - only shows trains that haven't departed yet
📦 Object-oriented architecture - clean, maintainable, and testable code
Related MCP server: Czech Railways (České dráhy) MCP Server
📋 Table of Contents
🚀 Quick Start
# 1. Clone the repository
git clone https://github.com/yourusername/yht-bilet-mcp.git
cd yht-bilet-mcp
# 2. Install dependencies
npm install
# 3. Create environment file
cp .env.example .env
# 4. Add your TCDD authorization token to .env
# (See "Getting Authorization Token" section below)
# 5. Build the project
npm run build
# 6. Add to Claude Desktop config (see Configuration section)📦 Installation
Prerequisites
Node.js 18+
npm or yarn
Claude Desktop or any MCP-compatible client
Steps
1. Install Dependencies
npm install2. Set Up Environment Variables
Copy the example environment file:
cp .env.example .env3. Get Your Authorization Token
Visit TCDD E-Ticket Website
Open your browser's Developer Tools (F12)
Go to the Network tab
Perform a ticket search
Find the
train-availabilityrequestCopy the
Authorizationheader value from Request HeadersPaste it into your
.envfile:
AUTH_TOKEN=eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldU...Note: Authorization tokens expire after some time. If you get authentication errors, get a fresh token.
4. Build the Project
npm run build🎮 Usage
Adding to Claude Desktop
Add the server to your MCP client configuration:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"yht-bilet": {
"command": "node",
"args": [
"/absolute/path/to/yht-bilet-mcp/build/index.js"
]
}
}
}Important: Use absolute paths, not relative paths!
Available Tools
The server provides one tool: search_train_ticket
Parameters
Parameter | Type | Required | Default | Description |
| string | Yes | - | Departure station name (e.g., "Ankara") |
| string | Yes | - | Arrival station name (e.g., "Eskişehir") |
| string | Yes | - | Travel date in YYYY-MM-DD format (e.g., "2025-12-25") |
| number | No | 1 | Number of passengers |
| boolean | No | true | Include wheelchair-accessible seats in results |
Example Usage
In Claude Desktop, you can ask:
Are there any train tickets from Ankara to Eskişehir on December 25, 2025 for 2 passengers?MCP client will translate this to:
{
"from": "Ankara",
"to": "Eskişehir",
"date": "2025-12-25",
"passengerCount": 2,
"includeWheelchairSeats": true
}To exclude wheelchair seats:
Find train tickets from Ankara to Eskişehir on December 25, 2025, but don't show wheelchair seats.Response Format
The server returns a formatted text response with:
✅/✗ Success/failure indicator
🚂 Train commercial name
⏰ Departure and arrival times
💰 Minimum price
📍 Available cabin classes with seat counts
Example Response:
✓ Ankara - Eskişehir arası 27.12.2025 tarihi için 3 adet tren sefer bulundu.
🚂 YHT ESKİŞEHİR - ANKARA (11:30 - 12:54):
Minimum Fiyat: 390 TL
📍 Müsait Kabinler:
• BUSİNESS: 39 koltuk
• EKONOMİ: 86 koltuk
• TEKERLEKLİ SANDALYE: 2 koltuk
...📝 License
MIT License - see LICENSE file for details
Made with ❤️ for the Turkish rail community
Need help? Open an issue
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Omio MCP server for ChatGPT, Claude and any AI agent: search trips, find the cheapest day and start booking in your own Omio account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Omio yourself; Cotlet does not store your password and you need no Omio API key. About the official Omio API: Omio has no public API for your own account (checked 24 Oct 2026). Its affiliate programme lists a Search API for partners, and its app in ChatGPT searches trips; Your Bookings, saved travelers and checkout work only on omio.com and in the Omio app. Setup and FAQ: https://cotlet.dev/integrations/omio-api-mcp-server
Tiqets MCP server for ChatGPT, Claude and any AI agent: search tickets, check availability, book tickets, list my bookings, download e-tickets and cancel booking in your own Tiqets account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Tiqets yourself; Cotlet does not store your password and you need no Tiqets API key. About the official Tiqets API: Tiqets has an API only for distribution partners such as travel agencies, not for customers (checked 11 Oct 2026). It lists the orders a partner generated, so it cannot see the bookings or tickets of your own Tiqets account. Setup and FAQ: https://cotlet.dev/integrations/tiqets-api-mcp-server
Search award flights and cash fares, optimize points, and predict fares inside ChatGPT and Claude.
The Ferryhopper MCP server is a connector for LLMs and AI Agents in maritime travel that exposes ferry routes, schedules, and booking options. It enables AI assistants to search ports and connections across 33 countries and 190+ ferry operators, provide real-time ferry itineraries with indicative prices, and assist users with planning island-hopping or multi-leg journeys by processing natural language queries about ferry times, passenger counts, and travel durations.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables searching for train tickets on China's 12306 railway system, including ticket availability queries, train filtering, station stopover information, and transfer route planning.9,691 npm2MIT
- AlicenseAqualityDmaintenanceEnables 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.55MIT
- AlicenseAqualityDmaintenanceProvides access to Saudi passenger rail schedules and fares, including Haramain High-Speed Railway and intercity East/North lines, enabling natural language queries for train times and prices.4MIT
- FlicenseNot gradedqualityDmaintenanceEnables checking railway seat availability, berth types, and pricing for Indian trains through natural language queries.-