railway-reservation-system-mcp
Enables checking railway seat availability, berth types, and pricing for Indian trains through natural language queries.
README
Railway Reservation System - MCP Server
A Model Context Protocol (MCP) server for checking railway seat availability. This server provides Claude with the ability to check train seat availability, berth types, and pricing information.
Features
- Seat Availability Checking: Get real-time availability for different train classes
- Berth Type Information: Upper, middle, and lower berth availability and pricing
- Comprehensive Details: Train schedules, route information, and booking status
- Alternative Options: Suggested alternative trains when preferred options are unavailable
Installation
For MCP Server Usage with Claude
- Install the MCP library:
pip install mcp
- Install dependencies:
pip install -r requirements.txt
For Standalone Usage
The server can also run independently without MCP for testing:
python mcp-server.py
Configuration for Claude Desktop
Add this configuration to your Claude Desktop config file:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"railway-reservation-system": {
"command": "python",
"args": ["mcp-server.py"],
"cwd": "t:\\code\\mcp\\railway-reservation-system"
}
}
}
Available Tools
check_seat_availability
Check seat availability for railway reservations.
Parameters:
train_name(string): Name of the train (e.g., "Rajdhani Express")travel_date(string): Date of travel in YYYY-MM-DD formatstart_station(string): Starting station name or codeend_station(string): Destination station name or codetravel_class(string): Class of travel (AC1, AC2, AC3, Sleeper, CC, EC, 2S)
Returns: Comprehensive JSON with:
- Train details and schedule
- Seat availability by berth type (upper, middle, lower)
- Pricing information
- Booking status and policies
- Alternative train options
Example Usage with Claude
Once configured, you can ask Claude:
- "Check seat availability for Rajdhani Express from Delhi to Mumbai on July 15th in AC2 class"
- "What are the available berths in Shatabdi Express for tomorrow?"
- "Show me pricing for different berth types in AC3 class"
Sample Response
{
"train_details": {
"train_name": "Rajdhani Express",
"train_number": "12001",
"travel_date": "2025-07-15",
"route": {
"start_station": "New Delhi (NDLS)",
"end_station": "Mumbai Central (BCT)",
"departure_time": "08:30",
"arrival_time": "14:45",
"duration": "6h 15m"
}
},
"class_availability": {
"AC2": {
"total_seats": 72,
"available_seats": 18,
"berth_availability": {
"upper": {
"total": 24,
"available": 6,
"price": 1250.0
},
"middle": {
"total": 24,
"available": 4,
"price": 1275.0
},
"lower": {
"total": 24,
"available": 8,
"price": 1300.0
}
}
}
}
}
Development
To extend this server:
- Modify the
check_seat_availabilityfunction to connect to real railway APIs - Add new tools for booking, cancellation, or PNR status
- Implement authentication for accessing real booking systems
- Add caching for better performance
Files
mcp-server.py: Main MCP server implementationrequirements.txt: Python dependenciesclaude_desktop_config.json: Sample Claude configurationREADME.md: This documentation
License
This project is provided as-is for educational and development purposes.
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.