- Explore MCP Servers
- irctc-mcp
Irctc Mcp
What is Irctc Mcp
irctc-mcp is a Model Context Protocol (MCP) server designed for integration with the Indian Railways Catering and Tourism Corporation (IRCTC) using RapidAPI. It provides functionalities such as train searches, PNR status checks, and more.
Use cases
Use cases for irctc-mcp include developing travel booking applications, creating dashboards for train status monitoring, integrating with chatbots for customer support, and providing real-time updates for passengers.
How to use
To use irctc-mcp, clone the repository, install dependencies, configure your RapidAPI key in the .env file, build the project, and run the server in either development or production mode. You can also integrate it into applications like Cascade or Claude by updating their configuration files.
Key features
Key features of irctc-mcp include searching for trains between stations, checking seat availability, obtaining train schedules, checking PNR status, and getting live train status. It is built with TypeScript for type safety and supports environment-based configuration.
Where to use
irctc-mcp can be used in applications that require integration with Indian Railways services, such as travel booking platforms, mobile applications, and other software solutions that need real-time train information.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Irctc Mcp
irctc-mcp is a Model Context Protocol (MCP) server designed for integration with the Indian Railways Catering and Tourism Corporation (IRCTC) using RapidAPI. It provides functionalities such as train searches, PNR status checks, and more.
Use cases
Use cases for irctc-mcp include developing travel booking applications, creating dashboards for train status monitoring, integrating with chatbots for customer support, and providing real-time updates for passengers.
How to use
To use irctc-mcp, clone the repository, install dependencies, configure your RapidAPI key in the .env file, build the project, and run the server in either development or production mode. You can also integrate it into applications like Cascade or Claude by updating their configuration files.
Key features
Key features of irctc-mcp include searching for trains between stations, checking seat availability, obtaining train schedules, checking PNR status, and getting live train status. It is built with TypeScript for type safety and supports environment-based configuration.
Where to use
irctc-mcp can be used in applications that require integration with Indian Railways services, such as travel booking platforms, mobile applications, and other software solutions that need real-time train information.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
IRCTC MCP Server
A Model Context Protocol (MCP) server for IRCTC (Indian Railways) integration using RapidAPI. This server provides tools for searching trains, checking PNR status, and other IRCTC-related functionalities.
Features
- Search trains between stations
- Check seat availability
- Get train schedules
- Check PNR status
- Get live train status
- Built with TypeScript for type safety
- Environment-based configuration
Prerequisites
- Node.js 18+
- npm or yarn
- RapidAPI key for IRCTC API
Setup
-
Clone the repository:
git clone <repository-url> cd irctc-mcp
-
Install dependencies:
npm install
-
Copy
.env.example
to.env
and update with your RapidAPI key:cp .env.example .env
-
Build the project:
npm run build
Running the Server
Development Mode
npm run dev
Production Mode
npm run build npm start
Using the MCP in Your Applications
Adding to Cascade
To add the IRCTC MCP to Cascade, you need to update your MCP configuration file located at ~/.codeium/windsurf/mcp_config.json
:
{
"mcpServers": {
"irctc": {
"command": "node",
"args": [
"/path/to/irctc-mcp/dist/index.js"
],
"env": {
"RAPIDAPI_KEY": "your_rapidapi_key_here",
"RAPIDAPI_HOST": "irctc1.p.rapidapi.com"
}
}
}
}
Replace /path/to/irctc-mcp
with the actual path to your project directory and update the RAPIDAPI_KEY
with your actual API key.
Adding to Claude or Other MCP-Compatible Applications
You can add this MCP to Claude or other MCP-compatible applications by creating a JSON configuration file:
{
"name": "IRCTC MCP",
"description": "MCP server for IRCTC integration with RapidAPI",
"transport": {
"type": "http",
"url": "http://localhost:3000"
}
}
Adding to Claude Desktop
macOS:
- Open Claude Desktop
- Click on “Claude” in the menu bar
- Select “Settings” (or “Preferences”)
- Go to the “Developer” tab
- Click on “Edit Config”
- This will open the configuration file at:
~/Library/Application Support/Claude/claude_desktop_config.json
- This will open the configuration file at:
Windows:
- Open Claude Desktop
- Click on the hamburger menu (☰) in the top-left corner
- Go to “File” > “Settings”
- Navigate to the “Developer” tab
- Click on “Edit Config”
- This will open the configuration file at:
%APPDATA%\Claude\claude_desktop_config.json
- This will open the configuration file at:
Configuration Example:
Add the following JSON to your Claude Desktop configuration file:
{
"mcpServers": {
"irctc": {
"command": "node",
"args": [
"/path/to/irctc-mcp/dist/index.js"
],
"env": {
"RAPIDAPI_KEY": "your_rapidapi_key_here",
"RAPIDAPI_HOST": "irctc1.p.rapidapi.com"
}
}
}
}
After making changes, completely close and restart Claude Desktop for the changes to take effect.
Adding to Claude Web
- Save the above JSON configuration to a file (e.g.,
irctc-mcp.json
) - In Claude Web, click on the ‘+’ button in the sidebar
- Select ‘Add MCP Server’ and upload your JSON configuration file
- The IRCTC MCP will now be available in your Claude conversations
Example Usage in Claude
Once connected, you can ask Claude to use the IRCTC MCP with prompts like:
Can you search for trains from NDLS to PNBE on 2023-12-25?
Or:
Check the PNR status for 1234567890
Available Tools
Train Tools
searchTrains
: Search for trains between two stationscheckSeatAvailability
: Check seat availability for a specific traingetTrainSchedule
: Get the complete schedule of a traingetLiveTrainStatus
: Get live status of a running train
PNR Tools
getPnrStatus
: Get the current status of a PNRgetPnrHistory
: Get booking history for a PNR (placeholder)checkPnrChartStatus
: Check if the chart has been prepared for a PNR
RapidAPI Integration
This project uses the IRCTC API available on RapidAPI. To use this API:
- Sign up for a free account at RapidAPI
- Subscribe to the IRCTC API
- Get your API key from the RapidAPI dashboard
Environment Variables
RAPIDAPI_KEY
: Your RapidAPI key (required)RAPIDAPI_HOST
: Set toirctc1.p.rapidapi.com
PORT
: Server port (default: 3000)NODE_ENV
: Environment (development/production)
Credits
If you use this project in your work, we’d appreciate a shoutout! While not required, it helps the project grow and helps others discover it. You can mention it like this:
IRCTC MCP - A Model Context Protocol server for Indian Railway IRCTC API integration https://github.com/nayanraj210401/irctc-mcp
License
This project is licensed under the MIT License - see the LICENSE file for details.
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.