Connect your AI Agents to Duffel in minutes

Available tools
create_batch_offer_request
Create a batch flight search. Searches multiple airlines asynchronously and returns results as they come in.
get_batch_offer_request
Get batch offer request status and results by ID. Poll until status is complete to get all offers.
create_offer_request
Search for flights by creating an offer request. Specify origin, destination, dates, passengers, and cabin class. Returns available offers.
list_offer_requests
List offer requests with pagination. Use cursor from page_info for next page.
get_offer_request
Get offer request details by ID. Returns the original search parameters and any returned offers.
list_offers
List offers for an offer request with pagination. Sort by total_amount or total_duration. Use cursor from page_info for next page.
get_offer
Get offer details by ID. Optionally return available services like bags and seats.
update_offer_passenger
Update passenger details on an offer. Set name, loyalty accounts, or identity documents before booking.
create_order_cancellation
Initiate cancellation of an order. Returns refund details and expiry. Must confirm with confirm_order_cancellation before expiry.
list_order_cancellations
List order cancellations with pagination. Optionally filter by order ID. Use cursor from page_info for next page.
get_order_cancellation
Get order cancellation details by ID. Returns refund amount, status, and expiry time.
confirm_order_cancellation
Confirm an order cancellation. Must be confirmed before expiry. This action is irreversible.
create_order_change_request
Request to change an order's flights. Specify slices to add and remove. Returns available change offers.
get_order_change_request
Get order change request details by ID. Returns available change offers.
list_order_change_offers
List change offers for an order change request. Compare prices and penalties. Use cursor from page_info for next page.
create_order_change
Select an order change offer to proceed with. Must confirm with confirm_order_change before expiry.
get_order_change
Get order change details by ID. Returns change costs, new total, and confirmation status.
confirm_order_change
Confirm an order change. Optionally provide payment if the change costs extra. This action is irreversible.
create_order
Book a flight by creating an order. Requires offer IDs, payment details, and passenger information. Use list_offers to find offers first.
list_orders
List orders with pagination. Filter by booking reference or awaiting payment status. Use cursor from page_info for next page.
get_order
Get order details by ID. Returns booking reference, passengers, slices, services, and payment status.
update_order
Update order metadata. Only custom metadata can be changed after booking.
create_partial_offer_request
Search for flights with partial offers. Returns offers grouped by slice, allowing mix-and-match of airlines per leg.
get_partial_offer_request
Get partial offer request details by ID. Returns partial offers grouped by slice.
create_payment
Create a payment for an order. Required for orders with awaiting_payment status. Use get_order to check payment status first.
list_payments
List payments with pagination. Optionally filter by order ID. Use cursor from page_info for next page.
get_payment
Get payment details by ID. Returns amount, currency, type, and associated order.
list_airlines
List airlines with pagination. Use cursor from page_info for next page.
get_airline
Get airline details by ID. Returns name, IATA code, logos, and conditions of carriage URL.
list_airports
List airports with pagination. Use cursor from page_info for next page.
get_airport
Get airport details by ID. Returns name, IATA/ICAO codes, city, country, coordinates, and timezone.
list_aircraft
List aircraft types with pagination. Use cursor from page_info for next page.
get_aircraft
Get aircraft type details by ID. Returns name and IATA code.
list_cities
List cities with pagination. Use cursor from page_info for next page.
get_city
Get city details by ID. Returns name, IATA code, and country code.
suggest_places
Search airports and cities by name. Returns matching places for use in flight searches.
list_loyalty_programs
List airline loyalty programmes with pagination. Use cursor from page_info for next page.
get_loyalty_program
Get loyalty programme details by ID. Returns airline name and programme name.
get_seat_maps
Get seat maps for an offer. Returns cabin layouts with rows, seats, and availability for each flight segment.
validate_credential
Validate Duffel API credentials by testing authentication with a lightweight API call. Returns {success, message}.

How to set up Merge Agent Handler
In an mcp.json file, add the configuration below, and restart Cursor.
Learn more in the official documentation ↗
1{
2 "mcpServers": {
3 "agent-handler": {
4 "url": "https://ah-api-develop.merge.dev/api/v1/tool-packs/{TOOL_PACK_ID}/registered-users/{REGISTERED_USER_ID}/mcp",
5 "headers": {
6 "Authorization": "Bearer yMt*****"
7 }
8 }
9 }
10}
11Open your Claude Desktop configuration file and add the server configuration below. You'll also need to restart the application for the changes to take effect.
Make sure Claude is using the Node v20+.
Learn more in the official documentation ↗
1{
2 "mcpServers": {
3 "agent-handler": {
4 "command": "npx",
5 "args": [
6 "-y",
7 "mcp-remote@latest",
8 "https://ah-api-develop.merge.dev/api/v1/tool-packs/{TOOL_PACK_ID}/registered-users/{REGISTERED_USER_ID}/mcp",
9 "--header",
10 "Authorization: Bearer ${AUTH_TOKEN}"
11 ],
12 "env": {
13 "AUTH_TOKEN": "yMt*****"
14 }
15 }
16 }
17}Open your Windsurf MCP configuration file and add the server configuration below.
Click on the refresh button in the top right of the Manage MCP server page or in the top right of the chat box in the box icon.
Learn more in the official documentation ↗
1{
2 "mcpServers": {
3 "agent-handler": {
4 "command": "npx",
5 "args": [
6 "-y",
7 "mcp-remote@latest",
8 "https://ah-api.merge.dev/api/v1/tool-packs/<tool-pack-id>/registered-users/<registered-user-id>/mcp",
9 "--header",
10 "Authorization: Bearer ${AUTH_TOKEN}"
11 ],
12 "env": {
13 "AUTH_TOKEN": "<ah-production-access-key>"
14 }
15 }
16 }
17 }In Command Palette (Cmd+Shift+P on macOS, Ctrl+Shift+P on Windows), run "MCP: Open User Configuration".
You can then add the configuration below and press "start" right under servers. Enter the auth token when prompted.
Learn more in the official documentation ↗
1{
2 "inputs": [
3 {
4 "type": "promptString",
5 "id": "agent-handler-auth",
6 "description": "Agent Handler AUTH_TOKEN", // "yMt*****" when prompt
7 "password": true
8 }
9 ],
10 "servers": {
11 "agent-handler": {
12 "type": "stdio",
13 "command": "npx",
14 "args": [
15 "-y",
16 "mcp-remote@latest",
17 "https://ah-api-develop.merge.dev/api/v1/tool-packs/{TOOL_PACK_ID}/registered-users/{REGISTERED_USER_ID}/mcp",
18 "--header",
19 "Authorization: Bearer ${input:agent-handler-auth}"
20 ]
21 }
22 }
23}FAQs on using Merge's Duffel MCP server
FAQs on using Merge's Duffel MCP server
Explore other MCP servers built and managed by Merge
























Ready to try it out?
Whether you're an engineer experimenting with agents or a product manager looking to add tools, you can get started for free now

