mcp server
Indian-Railway-MCP-Integration
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 24, 2026🚂 Indian Railway MCP Integration Project
A comprehensive integration of Indian Railway APIs using Model Context Protocol (MCP) to provide real-time train information, schedules, and booking status.
📋 Project Overview
This project demonstrates the successful integration of Indian Railway MCP (Model Context Protocol) to create a comprehensive train schedule system that provides real-time information about train schedules, live status, seat availability, and detailed train information.
🚀 Features
✅ Core Functionalities
- Train Schedule Search: Find trains between any two stations
- Live Train Status: Real-time tracking with delays and platform information
- Seat Availability: Check booking status across all classes
- Detailed Train Information: Complete route and schedule details
- Station Code Lookup: Find station codes by name
- Multi-class Support: 1A, 2A, 3A, 3E, SL, GN classes
📊 API Endpoints Covered
Search-trains: Route-based train discoveryGet-train-info: Detailed train route and scheduleGet-train-live-status: Live running status with delaysGet-seat-availability: Real-time booking statusGet-station-code: Station code lookupGet-train-code: Train code lookup by name
🛠️ Technical Implementation
MCP Configuration
{
"mcpServers": {
"indian-railway": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-indian-railway"],
"env": {}
}
}
}
Key Technologies
- Model Context Protocol (MCP): For API integration
- Indian Railway APIs: Real-time railway data
- Cursor IDE: Development environment
- RESTful APIs: Data communication
📸 Project Screenshots
1. Train Schedule Search
Searching for trains from Hyderabad to Tirupati on July 28, 2025
2. Detailed Train Information
Complete route and schedule for RAYALASEEMA EXP (12794)
3. Seat Availability Check
Real-time seat availability and waitlist status
4. Live Train Status (Part 1)
Live running status with platform information
5. Live Train Status (Part 2)
Detailed station-wise timing and status
💻 Usage Examples
1. Search Trains
Prompt: "Give me the Hyderabad to Tirupati scheduled trains list on 2025-07-28"
Result: 11 available trains including Vande Bharat Express, Krishna Express, Rayalaseema Express
2. Get Train Information
Prompt: "get the train info: RAYALASEEMA EXP"
Result: Complete route (Nizamabad→Tirupati, 892km, 28 stations, 16h journey)
3. Check Live Status
Prompt: "Get train live status on date: 2025-07-29"
Result: Perfect on-time performance across all 28 stations
4. Seat Availability
Prompt: "Get seat availability of RAYALASEEMA EXP"
Result: Waitlist status for upcoming dates across all classes
📈 Project Results
Sample Data Retrieved
- Route: Hyderabad (HYB) → Tirupati (TPTY)
- Date: July 28, 2025
- Trains Found: 11 trains
- Fastest Train: Vande Bharat Express (8h 25m)
- Live Status: Perfect on-time performance
- Availability: High demand with waitlists
Key Achievements
✅ Real-time data integration
✅ Multi-class booking support
✅ Platform and timing accuracy
✅ Comprehensive route information
✅ Live status tracking
✅ Waitlist management
🔮 Future Enhancements
Planned Features
- Fare calculation and comparison
- PNR status tracking
- Cancellation information
- Alternative route suggestions
- Mobile app integration
- Push notifications for delays
- Historical performance analytics
Technical Improvements
- Caching for better performance
- Error handling and retry mechanisms
- Rate limiting and API optimization
- Database integration for analytics
- User authentication and preferences
🛠️ Setup Instructions
Prerequisites
- Cursor IDE or compatible editor
- Node.js and npm installed
- Indian Railway MCP server access
Installation
- Clone this repository
- Configure MCP server settings
- Install required dependencies
- Test with sample queries
Configuration
# Install MCP server
npm install @modelcontextprotocol/server-indian-railway
# Configure in Cursor IDE
# Add MCP configuration to settings
📊 Data Accuracy
The project demonstrates high accuracy in:
- Schedule Information: 100% accurate station timings
- Live Status: Real-time updates with platform info
- Availability: Current booking status across quotas
- Route Details: Complete station list with distances
🤝 Contributing
Contributions are welcome! Please feel free to:
- Report bugs and issues
- Suggest new features
- Submit pull requests
- Improve documentation
📄 License
This project is open source and available under the MIT License.
🙏 Acknowledgments
- Indian Railways for providing the API access
- MCP community for the protocol specification
- Cursor IDE team for the development environment
📞 Contact
For questions or support, please open an issue in this repository.
Project Status: ✅ Complete and Functional
Last Updated: July 2025
API Status: Active and Operational