irctc-mcp
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.
irctc-mcp
An MCP server that exposes tools for looking up Indian Railway data from IRCTC — station details, train schedules, and PNR status.
Tools
Tool | What it does | Data source |
| Look up a station by code (e.g. | Static — bundled offline dataset, always works |
| A train's full route and stop-by-stop schedule (arrival/departure, distance, platform, day). | Live — IRCTC's own |
| PNR booking status — coach/seat/current status per passenger. | Live — IRCTC's own |
Data source note
station_lookupis static/offline. It readsdata/stations.json, a small bundled dataset of ~200 major Indian Railway stations. It needs no network, API key, or login, so it always works — even when IRCTC is down.train_scheduleandpnr_statusare live. They call IRCTC's own website endpoint (https://www.irctc.co.in/netTicket/v3/trains/listByTrainNo, the same one IRCTC's web/app use). IRCTC has no official public API, so this endpoint is unofficial and can change its request format, add bot protection, or go down at any time. If it's unavailable, the tool reports the error clearly rather than returning wrong data.
Related MCP server: Indian Railway MCP
Quick start
Requires Node.js >= 18 (uses ESM and native fetch).
cd irctc-mcp
npm install # installs @modelcontextprotocol/sdk
npm start # runs: node server.js (stdio transport)
npm test # runs the station-lookup testsnpm run dev runs the server with --watch for development.
MCP client configuration (stdio)
Add this to your MCP client's config (e.g. Claude Desktop claude_desktop_config.json):
{
"mcpServers": {
"irctc": {
"command": "node",
"args": ["/absolute/path/to/irctc-mcp/server.js"],
"transportType": "stdio"
}
}
}Replace
/absolute/path/to/irctc-mcp/server.jswith the real path on your machine. On Windows use a forward-slash absolute path, e.g.C:/Users/Aditya Shah/Desktop/Code/india-mcp/irctc-mcp/server.js.
Tool examples
station_lookup
Input: { "code": "NDLS" }
{
"code": "NDLS",
"name": "New Delhi",
"city": "New Delhi",
"state": "Delhi",
"zone": "Northern Railway"
}You can also search by name or city: { "code": "Pune" } or { "code": "Howrah" }.
train_schedule
Input: { "trainNo": "12301" }
Returns the train's route with each stop's arrival/departure time, distance,
platform, and day count. Pass the train number without its date suffix
(12301, not 12301-241120).
pnr_status
Input: { "pnr": "4688452310" }
Returns the PNR's train, date, class, and each passenger's booking / current status, coach, and seat.
Development
node scripts/test.mjs # run the tests directlyThe tests cover the offline station-lookup path (no network needed). The live IRCTC tools are not asserted in the test suite because they depend on a third-party service.
License
MIT — see LICENSE.
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
Indian Railways IRCTC helps you to view, track trains schedules, ticket status and more.
Indian Railways API docs and code samples, plus your RailCore usage, keys and live test requests.
iRail MCP — Belgian rail (SNCB/NMBS) real-time via the community iRail API (https://api.irail.be…
MCP server for China Railway 12306 ticket availability: schedules and seats by Chinese station name.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables real-time Indian Railways information retrieval, including live train running status, station schedules, and upcoming arrivals/departures.ISC
- AlicenseNot gradedqualityDmaintenanceEnables searching and tracking Indian Railways trains, checking seat availability, live status, delays, and station/train codes.28MIT
- FlicenseNot gradedqualityDmaintenanceProvides transit concierge tools for Indian Railways, including live train status, platform numbers, delay alerts, food options, and cab services, with offline fallback support.-
- AlicenseAqualityDmaintenanceMCP server for Indian Railways data, enabling AI agents to search trains, get schedules, live status, PNR info, and more without an API key.1115 npmMIT