NS MCP server: let your AI agent plan Dutch train trips
Wield is an MCP server that gives your AI agent one NS tool, ns.nl/search-trains. It plans trains between two Dutch stations, from now or from a date and time, like the journey planner on ns.nl. Each trip shows planned and live times, transfers, status, a crowding forecast and the fares for second and first class. No login is needed.
NS (Nederlandse Spoorwegen) Plan a train trip in the Netherlands (NS)
Read-only, no loginPasses the daily check
Parameters (4)
What your agent gets
| Recipe | What it does | Login | Status (7 Nov 2026) |
|---|---|---|---|
ns.nl/search-trains | Trips between two stations from now or a date and time, with planned and live times, status, crowding, fares and each leg | No | OK, 6 of 6 checks, about 1.0 s |
The recipe is read only. Tickets are bought on ns.nl, not in the tool.
How the tool works
The tool takes a departure station and an arrival station. You can add a date and a time. Without a date, it plans trips from now. NS returns a few trips around the requested time.
| Param | Required | What it is |
|---|---|---|
from | yes | Station, such as Amsterdam Centraal, Utrecht or Schiphol Airport. The first match of NS's station search is used |
to | yes | Station, such as Rotterdam Centraal or Den Haag Centraal |
date | no | Travel day as YYYY-MM-DD. Leave out to travel now |
time | no | Departure time as HH:MM, Dutch local time. Default 08:00. Used together with date |
Each trip in the result has planned and actual departure and arrival times, duration_min, transfers and status. Status shows whether a trip is normal, cancelled or disrupted. The result also has crowding, the fares in price_eur (second class) and price_first_class_eur (first class), the fare used, every legs entry and a url to the trip on ns.nl.
Example prompts
- "Plan an NS train from Amsterdam Centraal to Rotterdam Centraal on 26 November 2026 at 17:30, and show the fares."
- "Show the next NS trains from Utrecht to Schiphol Airport and flag any trip that is cancelled or disrupted."
- "Find a train from Den Haag Centraal to Amsterdam Centraal tomorrow morning with the lowest crowding."
What leaves your computer
The recipe reads the planner page on www.ns.nl. It then makes three requests to NS's own API gateway, gateway.apiportal.ns.nl. These are the same requests the planner on ns.nl makes, sent from your browser. Nothing passes through wield.run.
Wield logs each request on your computer, with method, host, path, status and timing. It never logs bodies or query values. Telemetry is off by default. Wield never reads, copies or sends your cookies or passwords. A status check on 7 November 2026 from Amsterdam Centraal to Utrecht Centraal used three requests and finished in about one second.
NS's terms, in plain words
We have not reviewed NS's terms for automated access yet. The recipe makes one person's search at a time, the same requests the planner on ns.nl makes. It does not buy tickets. Buying stays on ns.nl.
This is not legal advice. Read NS's terms yourself before you automate anything else.
Limits
- Read only. The tool never sells tickets. Open the
urlon a trip to see it on ns.nl. - Current timetable only. NS plans only within the current timetable. The new timetable is published shortly before mid-December. Dates after that change return an error.
- Departure time only. There is no arrive-by parameter. The tool plans from a departure time.
- Station names are matched. The first match of NS's station search is used. Check
fromandtoin the result. - Run limits apply. A run has at most 12 steps, 40 requests, 5 MB per response and 60 seconds.
FAQ
Does it need an NS login?
No. The recipe runs without an account.
Does it show live delays?
It shows planned and actual times for each trip, and a status of normal, cancelled or disrupted.
Can it plan a trip that ends abroad?
Some trips reach stations abroad, as the planner on ns.nl does. Check the to value in the result.
Which AI apps work with it?
Any MCP client. npx -y wield-mcp init sets up Claude Desktop, Claude Code, Cursor and Codex. Other MCP clients work with the standard stdio config. Claude Desktop also has a one-click bundle on wield.run/install.