Skip to content
Conduit

mcp server

railbharat-mcp-server

MCP Server that brings the entire Indian Railways ecosystem to AI assistants. Ask about train status, PNR bookings, find trains, explore stations, and navigate India's 68,000+ km rail network — all co

bhayanak/railbharat-mcp-servercommunitylistedunreviewed

Set up

Runs on your computer. Pick your agent and operating system.

This project does not publish an install method we can turn into a config. Follow the README instead.

README

synced Oct 23, 2026

A Model Context Protocol (MCP) server that brings the entire Indian Railways ecosystem to AI assistants. Ask about train status, PNR bookings, find trains, explore stations, and navigate India's 68,000+ km rail network — all conversationally.

Features

CategoryToolsWhat You Can Do
🚂 Live Tracking3Real-time train position, delay status, ETA
🎫 PNR & Booking2PNR status, seat availability
🔍 Train Search2Find trains between stations, train details
🏗️ Station Intel3Station info, board, fuzzy search
🗺️ Route & Schedule2Full route with stops, fare enquiry
📊 Historical2Punctuality stats, busiest routes
📍 Geospatial2Nearby stations, route map geometry

Data Sources

All data sources are optional — the server works with whatever is configured and tells you how to enable more features.

SourceKey RequiredWhat It Enables
IRCTC API (RapidAPI)YesPNR, live status, schedule, trains, seats, fares
Indian Rail APIYesAlternative source for live status and schedules
OpenStreetMap OverpassNo (free)Nearby stations, station coordinates, route geometry
data.gov.inNo (optional)Historical statistics, punctuality data

Monorepo Structure

├── packages/
│   ├── railbharat-server/          # MCP server (npm package)
│   └── railbharat-vscode-extension/ # VS Code extension (VSIX)
├── .github/workflows/              # CI + Release pipelines
├── CHANGELOG.md
└── logo.svg

Quick Start

Option 1: VS Code Extension (Recommended)

  1. Install the .vsix extension from Releases
  2. Open VS Code Settings and configure railbharat.rapidApiKey
  3. The server auto-registers in the MCP panel — click Start
  4. Use any of the 16 tools from Copilot Chat

Option 2: Standalone Server

# Install
npm install -g railbharat-server

# Configure
export RAILBHARAT_MCP_RAPIDAPI_KEY="your-key"

# Run
railbharat-server

Option 3: VS Code mcp.json

{
  "servers": {
    "railbharat": {
      "type": "stdio",
      "command": "npx",
      "args": ["railbharat-server"],
      "env": {
        "RAILBHARAT_MCP_RAPIDAPI_KEY": "your-key"
      }
    }
  }
}

Example Prompts

PromptTools Used
"What's the status of train 12301?"rail_live_status
"Check PNR 4567891230"rail_pnr_status
"Find trains from Delhi to Mumbai tomorrow"rail_search_trains
"Show me stations near 28.6°N, 77.2°E"rail_nearby_stations
"What's the route of Rajdhani Express?"rail_train_route
"Is seat available in 3A on 12301 for Dec 25?"rail_seat_availability

Development

# Install dependencies
pnpm install

# Run all CI checks
pnpm run ci

# Build everything
pnpm run build

# Package VSIX
pnpm run package

License

MIT — see LICENSE

↑↓ navigate openesc close