Dobby — Train Booking MCP Server

An MCP (Model Context Protocol) server (dobby-train-booking) that lets you create Eurostar test bookings through natural conversation with Claude. Three transports: HTTP at the deployed dobby.diegoalto.app, HTTP at your local server, or stdio (binary or source).

What You Can Do

Tool Description
eurostar_list_stations Look up station codes by name, city, or country
eurostar_list_markets List available markets with currency and language info
eurostar_create_booking Create a test booking (search, cart, hold, and checkout)

Setup

Three transports are supported. Pick the one that matches how you want to talk to Dobby:

Transport When to use
HTTP (deployed) You don't want to install or run anything locally — point Claude at the hosted Dobby.
HTTP (local) You're running bun start or bun run docker on your own machine and want Claude to use that.
stdio (binary) You have the BookingBot desktop app installed and want a fully local stdio transport.
stdio (source) You have a clone of the repo and want a fully local stdio transport.

Scopes (Claude Code only)

claude mcp add accepts a --scope:

Option 1: HTTP — deployed Dobby (no setup)

The unified server is hosted at https://dobby.diegoalto.app/mcp. No install, no running anything yourself.

Claude Code (recommended):

claude mcp add --scope user --transport http dobby-booking-bot https://dobby.diegoalto.app/mcp

Verify with:

claude mcp list
# dobby-booking-bot ✓ Connected

Claude Desktop — edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "dobby-booking-bot": {
      "transport": "http",
      "url": "https://dobby.diegoalto.app/mcp"
    }
  }
}

Option 2: HTTP — local server

Run the unified server first (bun start, bun run dev, or bun run docker). It listens on http://localhost:4242/mcp by default.

Claude Code:

claude mcp add --scope user --transport http dobby-booking-bot-local http://localhost:4242/mcp

Claude Desktop:

{
  "mcpServers": {
    "dobby-booking-bot-local": {
      "transport": "http",
      "url": "http://localhost:4242/mcp"
    }
  }
}

Option 3: stdio — installed app

The compiled mcp-server binary ships inside the BookingBot desktop app.

Claude Code:

claude mcp add --scope user --transport stdio dobby-booking-bot /Applications/BookingBot.app/Contents/Resources/mcp-server

Claude Desktop:

{
  "mcpServers": {
    "dobby-booking-bot": {
      "command": "/Applications/BookingBot.app/Contents/Resources/mcp-server"
    }
  }
}

Option 4: stdio — from source

For development against a local clone. Prerequisites: Bun installed, bun install run, .env in the project root.

Claude Code (project scope — .mcp.json is committed so the team picks it up):

claude mcp add --scope project --transport stdio dobby-booking-bot -- bun run src/mcp/index.ts

Or user scope:

claude mcp add --scope user --transport stdio dobby-booking-bot -- bun run src/mcp/index.ts --cwd /absolute/path/to/booking-bot

Claude Desktop:

{
  "mcpServers": {
    "dobby-booking-bot": {
      "command": "bun",
      "args": ["run", "src/mcp/index.ts"],
      "cwd": "/absolute/path/to/booking-bot"
    }
  }
}

After any change: restart Claude Desktop, or start a fresh Claude Code session.

Making the Tools Discoverable

By default, Claude may not immediately recognise that it should use the booking-bot tools when you ask to book a train. MCP tools are loaded lazily - Claude needs to "discover" them first, which adds an awkward extra step. The sections below show how to fix this in Claude Code and Claude Desktop.

Claude Code: /book skill (this project only)

This project includes a /book skill in .claude/skills/book/. When you're working inside this project directory, type:

/book London to Bruges, Jun 14, around 2pm

Claude will immediately load the booking tools and execute the request - no discovery step.

Claude Code: /book skill (any project)

To use /book from any directory, copy the skill into your global Claude config:

mkdir -p ~/.claude/skills/book
cp .claude/skills/book/SKILL.md ~/.claude/skills/book/SKILL.md

The /book command will now appear in all Claude Code sessions, regardless of which project you're in.

Claude Code: global routing (without /book)

If you don't want a slash command but still want Claude to automatically use the booking tools when you mention trains/Eurostar, add this to ~/.claude/CLAUDE.md:

## MCP Routing: Dobby

When I ask about booking trains, Eurostar, or travel to European cities, use the dobby-booking-bot MCP tools:
- `mcp__dobby-booking-bot__eurostar_list_stations` — look up station codes
- `mcp__dobby-booking-bot__eurostar_list_markets` — list markets
- `mcp__dobby-booking-bot__eurostar_create_booking` — create a booking

Load these tools via ToolSearch immediately. Do not search for alternatives.

The mcp__<server>__<tool> prefix uses the server key you registered with claude mcp adddobby-booking-bot in the example above. If you registered with a different key (e.g. --scope user dobby ...), substitute it.

Claude Desktop: Custom Instructions

Claude Desktop doesn't support skills, but you can set Custom Instructions to achieve the same effect:

  1. Open Claude Desktop → Settings → your profile → Custom Instructions
  2. Add:

When I ask about booking trains, Eurostar, or travel to European cities, use the booking-bot MCP tools (eurostar_list_stations, eurostar_list_markets, eurostar_create_booking). These tools are already connected - use them directly without searching for alternatives.

This ensures Claude Desktop routes booking requests to your MCP tools immediately.

Claude Desktop: Projects

Alternatively, create a Project in Claude Desktop (e.g. "Travel Booking") with the same instruction text. This scopes the routing to conversations within that project only.

Example Conversation

You: Book me a London to Paris train for next Tuesday, 1 adult, standard class

Claude: Let me look up the station codes and create that booking. [calls eurostar_list_stations with query="london"] [calls eurostar_list_stations with query="paris"] [calls eurostar_create_booking with origin="7015400", destination="8727100", ...]

Booking created! Reference: ABC123

For snap and unallocated bookings, just say what you want - Claude maps the phrasing to the right flag:

You: Book a snap from London to Paris next Tuesday

Claude: [calls eurostar_create_booking with origin="7015400", destination="8727100", snap=true, ...]

You: Book me an unallocated seat from Paris to Brussels tomorrow

Claude: [calls eurostar_create_booking with origin="8727100", destination="8814001", unallocated=true, ...]

Troubleshooting

Claude Code: claude mcp list shows only the four claude.ai SaaS connectors and not your server. This is the most common pitfall. The CLI only reads MCP config that was added via claude mcp add (per scope). Hand-pasting an mcpServers block into ~/.claude.json or ~/.claude/settings.json is silently ignored. Fix: re-register via claude mcp add (see the Setup section above). Then claude mcp list should show ✓ Connected.

Claude Code: ToolSearch can't find mcp__dobby-booking-bot__*. Tools are only loaded if the harness registered the server at session start. After fixing the config (above), start a new Claude Code session — the running one won't pick up the change.

Tools not appearing in Claude Desktop?

SHOPPER_EMAIL error when running from source?

Booking fails with a checkout/payment error?

Feature Parity - CLI vs MCP

What the CLI can do and whether Claude can do it via the MCP server.

Supported

Feature CLI MCP Notes
Single/return bookings eil-book -t lon-par -d 14,21 outboundDate + inboundDate
Passenger types -p 2a,1c,1s adults, children, seniors, youths, infants
Wheelchair + companion -p 1w,1wcc adultsWheelchair, wheelchairCompanions
Class of service -c PLUS outClass, rtnClass STANDARD, PLUS, PREMIER
First/last train --first, --last outNth=0, outNth=-1
Nth train --nth 2 outNth=2
Specific train --train 9012 outTrain
Time preference --time 15:00 outTime
Direction-specific options --out:class PLUS --rtn:time 18:00 outClass, rtnClass, outTime, rtnTime, etc.
Market selection -m fr-fr market
Advanced Passenger Info --after-sales api api=true Auto-fills test travel docs
Gateway override --gateway 1202 gateway="1202" PR number or full URL
Custom shopper email --email template shopperEmail Supports {carrier}, {market}, {pax}, {od} templates
Custom CID template --cid template cid Supports {carrier}, {scenario}, {datetime}, etc.
All carriers -t lon-mar (SNCF), -t lon-bru (SNCB) Any station pair Carrier auto-detected
Snap booking --snap snap=true LASTMIN inventory, direct trains, STD only - say "snap booking"
Unallocated booking --unallocated unallocated=true RED_US inventory, direct trains, UNASSIGNED class - say "unallocated booking". Mutually exclusive with snap.
Product family override --product-family LASTMIN productFamily="LASTMIN" Advanced override; prefer snap/unallocated flags
Station lookup N/A eurostar_list_stations MCP-only feature
Market lookup N/A eurostar_list_markets MCP-only feature

Not yet supported via MCP

Feature CLI Notes
Multiple iterations -i 10 Create N bookings in a loop
Wait/jitter between bookings -w 5 -j 0.5 Delay between iterations
Dry run --dry-run Search only, don't book
Open browser links --open checkout Open results in browser
Save request/response files --save-to-file auto Save GraphQL .http files
Verbose/debug output --verbose, --debug Detailed pipeline logging
PR stack override --pr-stack 544 Override all servers for a PR stack
Specific server overrides --search 2991 --checkout 3196 Override individual servers
After-sales: tickets/PDF --after-sales ticket,pdf Download tickets or PDF
Results file output --results-file path Write results to specific file
Manual step mode -m search Pause at specific pipeline steps

⚠️ Don't hand-edit ~/.claude.json for Claude Code

This trips people up regularly, so it's worth its own footer.

The Claude Code CLI reads MCP config that was added via claude mcp add per scope. Entries you paste directly into ~/.claude.json or ~/.claude/settings.json are silently ignoredclaude mcp list won't show them, and ToolSearch won't surface their tools.

Always use the claude mcp add commands in the Setup section above. They put the config where the CLI actually reads it. After registering, verify with:

claude mcp list                            # the server should be ✓ Connected
claude mcp get dobby-booking-bot           # full details for a specific server

Hand-editing JSON is only correct for Claude Desktop, which reads ~/Library/Application Support/Claude/claude_desktop_config.json directly.