irctc
🚂 irctc-mcp — Indian Railways Model Context Protocol (MCP) Server
Official Model Context Protocol (MCP) server for irctc.dev. Connects Cursor, Windsurf, Claude Code, and Claude Desktop to authoritative Indian Railways real-time telemetry with sub-second execution.
When you ask your AI IDE:
"Check if my train 12557 is on time" or "Are there vacant seats on Rajdhani from Delhi to Patna?"
Your AI agent automatically invokes irctc-mcp tools to inspect live PRS reservation charts, seat availability forecasts, and GPS delay metrics.
⚡ 1-Minute Quickstart
1. Cursor IDE Integration (.cursor/mcp.json)
Add the following to your project's .cursor/mcp.json or global Cursor settings:
{
"mcpServers": {
"irctc": {
"command": "npx",
"args": ["-y", "irctc-mcp"],
"env": {
"IRCTC_API_KEY": "YOUR_IRCTC_DEV_API_KEY"
}
}
}
}(Get 10,000 Free Credits in 5 seconds at https://irctc.dev/dashboard)
2. Claude Desktop (claude_desktop_config.json)
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"indian-railways": {
"command": "npx",
"args": ["-y", "irctc-mcp"],
"env": {
"IRCTC_API_KEY": "YOUR_IRCTC_DEV_API_KEY"
}
}
}
}3. Claude Code CLI
claude mcp add irctc-mcp -- npx -y irctc-mcp4. Windsurf / Cascade
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"irctc": {
"command": "npx",
"args": ["-y", "irctc-mcp"],
"env": {
"IRCTC_API_KEY": "YOUR_IRCTC_DEV_API_KEY"
}
}
}
}Related MCP server: db-mcp
🛠️ Available Agent Tools (14 Production Tools)
Tool Name | Parameters | Capabilities |
|
| Real-time passenger manifest, coach & berth allocations ( |
|
| Live GPS train running position, current delay in minutes, next halt, platform numbers, and estimated timings. |
|
| Direct trains between any two stations with duration, distance in km, running days, and base fares. |
|
| Official 14-day continuous calendar forecast across travel classes ( |
|
| Post-charting vacant berths from online reservation charts for Current Booking and TTE allocation. |
|
| Calculate official IRCTC train fare breakdown across travel classes (1A, 2A, 3A, 3E, SL, CC, 2S) and quotas. |
|
| Full train route schedule, intermediate halt stations, arrival/departure timings, stop durations, and distance. |
|
| Quick train basic details by train number, including train name, type, origin, destination, and running days. |
|
| Partial name train search (e.g., "Rajdhani", "Vande Bharat", "Shatabdi", "Garib Rath"). |
|
| Station timetable: arrivals & departures board of all trains passing through a station on a given date. |
|
| Fast autocomplete search for Indian Railways stations by station code or city name. |
|
| Detailed station information by station code (e.g. "NDLS"), including station name, state, and railway division. |
| none | Real-time list of today's cancelled, fully cancelled, and partially cancelled Indian Railways trains. |
| none | Check irctc.dev Rail Engine health, offline corpus status, and in-memory index performance. |
💡 Example Prompts to Ask Your AI Agent
"Is PNR 2265248473 confirmed? What are the coach and berth numbers?"
"What is the current delay and next station for train 12557 today?"
"Find all trains from New Delhi (NDLS) to Patna (PNBE) for this Friday."
"Check 14-day 3A seat availability for train 12557 from NKE to ANVT starting 17-11-2026."
"Are there any vacant berths on Vande Bharat 26501 departing Gorakhpur?"
🔐 Environment Variables
Variable | Description | Default |
| Your secret API key from irctc.dev. If omitted, checks |
|
| Production Rail Engine Gateway. |
|
📄 License
MIT © IRCTC API Platform
Available Tools
14 toolscheck_pnrA
Check real-time Indian Railways PNR status, passenger manifest, coach & berth allocations (e.g. S4 65 LOWER BERTH), confirmation probability, and chart preparation status.
Inputs: pnr (required).
check_seat_availabilityA
Fetch official 14-day continuous seat availability calendar forecast across travel classes (1A, 2A, 3A, 3E, SL) and quotas (GN, TQ, PT, LD) directly from PRS.
Inputs: to (required), date (required), from (required), train_no (required), +2 more.
get_cancelled_trainsA
Get real-time list of today's cancelled, fully cancelled, and partially cancelled Indian Railways trains.
Inputs: no named parameters.
get_engine_healthA
Check irctc.dev Rail Engine health, offline corpus status, and in-memory index performance.
Inputs: no named parameters.
get_live_running_statusA
Get real-time live running GPS status of any Indian Railways train, including current delay in minutes, last crossed station, upcoming halts, platform numbers, and estimated arrival/departure times.
Inputs: train_no (required), date.
get_station_by_codeB
Get detailed station information by station code, including station name, state, and railway division.
Inputs: station_code (required).
get_station_timetableA
Get all trains passing through, arriving at, or departing from a station on a given date (station timetable / arrivals & departures board).
Inputs: date (required), station_code (required).
get_train_by_numberA
Get quick train basic details by train number, including official train name, train type, origin, destination, running days, and total distance.
Inputs: train_no (required).
get_train_fareA
Calculate official IRCTC train fare breakdown across travel classes (1A, 2A, 3A, 3E, SL, CC, 2S) and quotas between origin and destination stations.
Inputs: to (required), from (required), train_no (required), quota, +1 more.
get_train_scheduleA
Get full train route schedule, intermediate halt stations, arrival/departure timings, stop durations, and total distance in km.
Inputs: train_no (required).
get_vacant_berths_post_chartB
Find real-time vacant berths and seats after chart preparation from online reservation charts for Current Booking and TTE allocation onboard.
Inputs: train_no (required), boarding_station (required), date, class_code.
search_stationsA
Autocomplete search Indian Railways stations by station code or partial city name (e.g. "NDLS", "delhi", "patna").
Inputs: query (required).
search_trainsA
Search running trains between any two Indian Railways station codes with departure/arrival times, travel duration, distance in kilometers, running days, and base fare estimates.
Inputs: to (required), from (required), date.
search_trains_by_nameA
Search Indian Railways trains by train name query (partial match, e.g. "Rajdhani", "Shatabdi", "Vande Bharat", "Garib Rath").
Inputs: name (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Each tool targets a clearly distinct railway query: PNR status, train details, live running, route search, seat availability, vacant berths, fare, schedule, station timetable, station lookup, cancellations, and engine health. The few superficially similar tools (search_trains vs. search_trains_by_name, get_train_by_number vs. get_train_schedule) are cleanly separated by their descriptions.
All names use consistent snake_case with a clear verb prefix (check_, get_, search_) followed by the resource or action. No mixed casing or conflicting verb styles appear across the set.
With 14 tools, the server stays within a well-scoped range for an Indian Railways information service. Each tool covers a distinct query type and none appear redundant or unnecessary.
The surface covers most core railway inquiry workflows: PNR, train search, schedules, live status, fares, availability, station data, and cancellations. Minor gaps exist for adjacent cases like rescheduled/diverted trains or booking-related actions, but the core informational lifecycle is strong.
Related MCP Connectors
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Hosted X (Twitter) MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
AI-native mock API server with MCP. Create REST/SOAP mocks from Claude, Cursor, or Windsurf.
Hosted Amazon Seller and Vendor MCP server for Claude, ChatGPT, Cursor, Codex, Gemini, Copilot.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables real-time Indian Railways information retrieval, including live train running status, station schedules, and upcoming arrivals/departures.ISC
- AlicenseAqualityDmaintenanceAn MCP server that exposes the Deutsche Bahn public transport API to any MCP-compatible client (Claude Desktop, Cursor, Cline, Continue, etc.). Five tools cover station search, departures, journey planning, trip details, and nearby stations.61MIT
- AlicenseAqualityDmaintenanceAn (unofficial) MCP server for the Deutsche Bahn Timetables API — station search, planned departures, and real-time changes (delays, platform changes, cancellations) as tools for Claude and other MCP clients.42MIT
- AlicenseAqualityDmaintenanceMCP server for Indian Railways data, enabling AI agents to search trains, get schedules, live status, PNR info, and more without an API key.117 npmMIT