@hyphonical/irail-mcp
v1.0.0
Published
MCP server for the Belgian Railway (NMBS/SNCB) iRail API
Downloads
106
Readme
iRail-MCP
MCP server for the Belgian Railway (NMBS/SNCB) iRail API. Enables LLMs to look up train schedules, track delays, plan routes, monitor disruptions, and search stations.
Installation
bun installUsage
Run directly
bun run src/index.tsRegister with opencode
Add to your opencode.json:
{
"mcp": {
"irail": {
"command": "bun",
"args": ["run", "C:\\Users\\joris\\Desktop\\iRail-MCP\\src\\index.ts"]
}
}
}Tools
| Tool | Description |
|------|-------------|
| search_connections | Find train routes between two stations |
| get_liveboard | Real-time departures or arrivals at a station |
| get_vehicle | Track a specific train's route and delays |
| search_stations | Look up station names and IDs |
| get_disturbances | Current disruptions and planned track works |
| get_composition | Train carriage layout (experimental) |
Development
Type checking
bun run typecheckManual testing
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_connections","arguments":{"from":"Antwerpen-Berchem","to":"Mechelen","results":2}}}' | bun run src/index.tsAPI Reference
- Base URL:
https://api.irail.be - Documentation: https://docs.irail.be/
- Rate limit: 3 requests per second per IP
- Authentication: None required
License
MIT
