How to Use Amtrak live train positions in Claude Code
Returns a snapshot of reported Amtrak train positions and status from Track Your Train. Use it to survey running services before inspecting one train’s stop-by-stop times.
Prompts to try with Amtrak live train positions in Claude Code
Copy an example into Claude Code, or ask in your own words.
Use Amtrak live train positions for Northeast Regional and plot the returned reported positions in the project’s map view.
Use Amtrak live train positions to look this up and give me the result as a table. Save the result in ./assets.
Pull the latest numbers from Amtrak live train positions and tell me what changed since last week.
Check Amtrak live train positions and summarize what you find in three bullet points.
Pull the newest data from Amtrak live train positions and give me the result as a table.
How to set up Amtrak live train positions in Claude Code
Pick the way that suits you. Each takes about two minutes.
Use Spiral's MCP server
- Add the hosted server
This adds Spiral to the current project. Add --scope user to use it in every project.
claude mcp add --transport http spiral https://api.spiral.ai/mcp
- Sign in
Start claude, type /mcp, choose spiral and Authenticate. Sign in to Spiral in the browser and click Authorize. No API key.
Use the Spiral skill
- Send Claude Code this message
Your agent reads Spiral's skill and sets itself up.
set up https://spiral.ai/SKILL.md
- Sign in or paste a key
Approve Spiral in the browser, or give the agent a key from the console.
Use the Spiral CLI
- Install and sign in
Installs the Spiral CLI, signs you in and adds its skill to your coding agents.
npx -y spiral-cli@latest init
Call the Spiral API
- Create an API key
In the console, under API keys.
- Run Amtrak live train positions
One request; the result comes back by polling or a webhook.
curl https://api.spiral.ai/v1/runs \ -H "Authorization: Bearer $SPIRAL_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "provider": "alexandria", "model": "amtrak-com/train-status/live_trains", "input": { "limit": 1 } }'
Then paste one of the prompts above: Claude Code finds Amtrak live train positions on Spiral, shows the price and runs it.
Amtrak live train positions providers and prices
Spiral runs Amtrak live train positions through Alexandria. Open a card for today's price, with every fee included.
Settings you can ask for
Ask Claude Code for any of these in your prompt.
| Setting | Allowed values | Default | Description |
|---|---|---|---|
| Limit | 1 to 500 | Return at most this many trains (feed order). Default: all. | |
| State | Active, Predeparture, or Completed | Filter by feed state |
Every API field of Amtrak · Live trains is on its tool page: open its card above.
What can you do with Amtrak live train positions in Claude Code?
Build a rail travel view that connects Amtrak station information, route stops, and reported train progress. A coding agent can use these responses to populate the project’s station pages and keep scheduled, estimated, and actual stop times distinct.
Time a station pickup
Find the relevant train in the reported position snapshot, then inspect its estimated or actual arrival at the pickup station. Use the stop times to explain whether the arrival estimate has changed.
Prepare a corridor status briefing
Survey reported train positions on Northeast Regional, then inspect individual runs for stop-level timing. Summarize which services have estimated arrivals later than their scheduled arrivals.
Review a connection
Locate the two relevant trains in the current snapshot and compare their reported arrival and departure times at the connecting station. Calculate the gap between the estimates without presenting it as a guaranteed connection.
Explain a train’s progress
Pair a train’s reported position with its scheduled, estimated, and actual stop times. Produce a plain-English account of where it was last reported and how its progress compares with the schedule.
More on Amtrak live train positions and Claude Code
Overview
Amtrak live train positions in other agents
Questions about Amtrak live train positions in Claude Code
Can Claude Code use Amtrak live train positions?
Yes. Add Spiral to Claude Code as an MCP server, and Claude Code can find and run Amtrak live train positions like any built-in tool.
How much does Amtrak live train positions cost in Claude Code?
$0.00873 per call. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Claude Code plan is separate.
Do I need an Alexandria account to use Amtrak live train positions in Claude Code?
No. Spiral runs Amtrak live train positions on its own Alexandria account. You sign in to Spiral once and never paste a key.
How long does it take to set up Amtrak live train positions in Claude Code?
About two minutes: add the hosted server, then sign in.
Does Claude Code wait while Amtrak live train positions runs?
Amtrak live train positions runs in the background. Claude Code starts the run, checks on it and gives you the json when it's ready.
Does the data cover Canadian stops?
Amtrak says Track Your Train represents its routes, stations, and active trains across the United States and into Canada. That is Amtrak coverage, rather than a directory of every Canadian rail operator.
Does this include fares or schedules for a future travel date?
The provider explicitly excludes fares, schedules by date, and booking. A route’s stop list or a currently tracked train’s times cannot establish what is available for a future trip.
What station information is available?
The provider documents station addresses, hours, and amenities alongside station discovery. For example, Amtrak lists Chicago Union Station at 255 South Clinton Street.
What is the difference between route information and train status?
Route information supplies ordered stops and train numbers for a named service. Train status supplies currently tracked runs with scheduled, estimated, and actual stop times.
Are reported arrival times actual arrivals?
The train status data distinguishes scheduled, estimated, and actual times. An estimated arrival is a prediction; use the actual arrival value when describing a stop the train has reached.
Start using Amtrak live train positions in Claude Code
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into Claude Code:
set up https://spiral.ai/SKILL.md


