@striderlabs/mcp-amtrak
v1.0.0
Published
MCP connector for Amtrak train travel — search trains, check status, and book tickets
Maintainers
Readme
@striderlabs/mcp-amtrak
MCP (Model Context Protocol) connector for Amtrak train travel. Enables AI assistants to search for trains, check real-time status, and initiate ticket bookings on Amtrak.com using browser automation.
Features
- Search Trains — Find available trains between any two Amtrak stations on a given date, with prices for Coach, Business, and Sleeper classes.
- Get Train Status — Real-time status including current location, delays, and stop-by-stop schedule.
- Book Ticket — Navigate to the Amtrak booking page for a given route and date, ready for the user to complete payment.
Installation
npm install -g @striderlabs/mcp-amtrak
# Install Playwright browser
npx playwright install chromiumUsage with Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"amtrak": {
"command": "mcp-amtrak"
}
}
}Or with npx:
{
"mcpServers": {
"amtrak": {
"command": "npx",
"args": ["-y", "@striderlabs/mcp-amtrak"]
}
}
}Tools
search_trains
Search for available Amtrak trains between two stations.
Parameters:
| Name | Type | Required | Description |
|------|------|----------|-------------|
| from | string | Yes | Origin station name or code (e.g. "New York", "NYP") |
| to | string | Yes | Destination station name or code (e.g. "Washington", "WAS") |
| date | string | Yes | Travel date (YYYY-MM-DD or MM/DD/YYYY) |
| passengers | number | No | Number of adult passengers (1–8, default 1) |
Example response:
{
"success": true,
"from": "New York",
"to": "Washington",
"date": "03/20/2026",
"passengers": 1,
"trains": [
{
"train_number": "2150",
"train_name": "Acela",
"departure_time": "6:00 AM",
"arrival_time": "9:20 AM",
"duration": "3h 20m",
"price_coach": null,
"price_business": "$189",
"price_sleeper": null,
"seats_available": true
}
],
"booking_url": "https://www.amtrak.com/..."
}get_train_status
Get real-time status for an Amtrak train.
Parameters:
| Name | Type | Required | Description |
|------|------|----------|-------------|
| train_number | string | Yes | Train number (e.g. "2150", "20", "Acela 2150") |
| date | string | No | Date in YYYY-MM-DD format (defaults to today) |
Example response:
{
"success": true,
"train_number": "20",
"train_name": "Cardinal",
"status": "On Time",
"scheduled_departure": "7:05 AM",
"actual_departure": "7:05 AM",
"scheduled_arrival": "8:05 PM",
"actual_arrival": null,
"current_location": "Cincinnati, OH",
"delay_minutes": 0,
"stations": [...]
}book_ticket
Initiate an Amtrak ticket booking (navigates to checkout page).
Parameters:
| Name | Type | Required | Description |
|------|------|----------|-------------|
| from | string | Yes | Origin station name or code |
| to | string | Yes | Destination station name or code |
| date | string | Yes | Travel date (YYYY-MM-DD or MM/DD/YYYY) |
| train_number | string | No | Specific train to book (books first available if omitted) |
| passengers | number | No | Number of adult passengers (1–8, default 1) |
| rail_pass | boolean | No | Use Rail Pass instead of purchasing (default false) |
Note: This tool navigates to the Amtrak booking page but cannot process payment. The user must complete checkout in their browser.
How It Works
This MCP server uses Playwright to automate a headless Chromium browser that interacts with Amtrak.com. Results are scraped from the live website, so they reflect real-time availability and pricing.
Requirements
- Node.js 18+
- Chromium (installed via
npx playwright install chromium)
License
MIT
