projects / duffel-mcp

Duffel MCP server

An MCP server that lets an agent search, book, manage and cancel flights through the Duffel API from any MCP client, with tools for Duffel Stays. A proof of concept: sandbox only, not production-ready.

MCP server Travel 12 tools Node.js MIT ● PoC · sandbox

What it does

Gives an AI agent the full flight lifecycle through Duffel: search for offers, inspect an offer, create an order, check its status, get a cancellation quote and cancel. A second group of tools covers Duffel Stays (search, rates, quote, book, retrieve, cancel).

It runs over stdio in any MCP client, such as Claude Desktop, with your own Duffel test token.

Tools

GroupTools
Flightssearch_flights, get_offer, create_order, get_order, get_cancellation_quote, cancel_order
Stayssearch_stays, get_stays_rates, create_stays_quote, create_stays_booking, get_stays_booking, cancel_stays_booking

The Stays tools are built but depend on Duffel enabling Stays access for the account.

What I learned building it

  1. An order’s real status lives in its payment fields. Deriving status from the confirmation timestamp told the agent a booking was done when it wasn’t. The fix was to read the payment status instead.
  2. Exit cleanly on Windows. Calling process.exit(1) crashed Node during socket teardown. Setting process.exitCode = 1 and letting the process finish fixed it.
  3. Building the server was the easy part. A working MCP server for airline connectivity is an afternoon’s work now. That makes the build table stakes; distribution, differentiation and trust are where the hard problems are.

Limitations

This is a proof of concept. It runs against Duffel’s test environment, has no production error handling, retries, rate limiting or payment flow, and isn’t supported. Don’t point it at a live token.