railway-reservation-system-mcp

railway-reservation-system-mcp

Enables checking railway seat availability, berth types, and pricing for Indian trains through natural language queries.

Category
Visit Server

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

  1. Install the MCP library:
pip install mcp
  1. 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 format
  • start_station (string): Starting station name or code
  • end_station (string): Destination station name or code
  • travel_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:

  1. Modify the check_seat_availability function to connect to real railway APIs
  2. Add new tools for booking, cancellation, or PNR status
  3. Implement authentication for accessing real booking systems
  4. Add caching for better performance

Files

  • mcp-server.py: Main MCP server implementation
  • requirements.txt: Python dependencies
  • claude_desktop_config.json: Sample Claude configuration
  • README.md: This documentation

License

This project is provided as-is for educational and development purposes.

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
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
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
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

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