Deutsche Bahn MCP server: let your AI agent search train connections with prices
Wield is an MCP server that gives your AI agent Deutsche Bahn tools. The main tool searches connections between two stations on a date and returns departure and arrival times, transfers and the cheapest fare for the class you choose. The search runs in your own browser, because bahn.de rejects requests that lack the browser's own cookies. Your passwords and cookies never leave your computer.
Deutsche Bahn Search train connections between two stations with prices
Read-only, no loginRuns in your browser only
Parameters (8)
| Metric | Wield recipe | Browser Use + Claude Sonnet 5.5 |
|---|---|---|
| Success | 100% | 0% |
| Median time | 2.1 s | 676 s |
| Cost per run | $0 | $0.589 |
9 runs each, 7 November 2026. How we measure
What your agent gets
A Wield recipe is a small public file that describes the request bahn.de's own search makes. Your agent runs it through wield-mcp, the local MCP server on your computer.
| Recipe | What it does | Login | Status (7 Nov 2026) |
|---|---|---|---|
bahn.de/search-connections | Finds connections by train, bus or S-Bahn, with times, duration, transfers, platforms and the cheapest fare | No | Pending: no live check from a user's browser yet |
bahn.de/my-bookings | Lists your upcoming trips and tickets | Yes | Untested. Skeleton only, not run |
The connection search takes two stations, a date, a time, depart-after or arrive-by mode, first or second class, and the number of adults. Station names are free text, and the first match is used. The how-to guide shows example prompts.
How a request flows
- You ask your agent for the fastest train from Berlin Hbf to München Hbf on a given morning.
- The agent calls
find_recipe, thenrunwithbahn.de/search-connections. wield-mcppasses the run through a local bridge to the Wield extension in your browser.- The extension sends the request from a bahn.de tab, with your own session.
- The results return to your agent. Nothing passes through wield.run.
What leaves your computer
- Three requests to
www.bahn.deper search. - Wield never reads, copies or sends your cookies or passwords.
- Results go to your AI app and are marked as website content, so your agent is told not to follow instructions found in them.
- Logs stay on your computer. They never record request bodies or query values.
Recipes are data, not code, and no JavaScript from the registry runs in the page. The registry signs every recipe with Ed25519, and wield-mcp refuses a recipe that is unsigned or has changed. Wield sends no Cookie or Host headers, and it redacts derived tokens from results and logs.
Deutsche Bahn terms, in plain words
The recipe's notes say bahn.de's terms do not allow automated bulk queries of timetable or fare data. This recipe runs one search at a time that you start, at human pace. Do not poll it or page through results in bulk. It never books. Booking and payment stay with you on bahn.de.
Limits and what is not working yet
- The connection search is pending. Its extraction was tested on sample responses, but a live check on bahn.de still needs a user's own browser.
- The bookings recipe is untested. It needs a recording from a logged-in session before it can be used.
- In our benchmark, Wield passed 9 of 9 runs. That benchmark covers one search task.
- If the site's bot protection shows a check, Wield stops and asks you to solve it in your own tab. Wield never tries to solve a check itself.
Every run stops at 12 steps, 40 requests, 5 MB per response or 60 seconds. Pacing is set per site, so a single search cannot run away.
FAQ
Is there an official Deutsche Bahn MCP server?
Not that we know of as of 7 November 2026.
Which AI apps work with it?
Any MCP client. npx -y wield-mcp init sets up Claude Desktop, Claude Code, Cursor and Codex. Claude Desktop also has a one-click bundle on wield.run/install.
Does it need a login?
The connection search needs no login. Listing your bookings does need one, and that recipe is still untested.
How fast is it compared with a browser agent?
As of 7 November 2026, in our preliminary benchmark, the recipe passed 9 of 9 runs with a median of 2,127 ms and no model cost. Browser Use driving Claude Sonnet 5.5 passed 0 of 1 runs. Bot protection blocked that one run, which took a median of 675.9 s and cost $0.59. One run is too few to draw a conclusion. The full method is on the benchmark page.