Skip to content

markpenaranda/amadeus-mcp-server

Repository files navigation

Amadeus MCP Server

A Model Context Protocol (MCP) server implementation that integrates with the Amadeus API to provide flight and hotel search capabilities. This server allows AI agents to perform real-time travel data queries.

Features

This MCP server exposes the following tools:

  • search_flights: Searches for flight offers based on origin, destination, dates, and number of passengers.
  • search_hotels: Searches for hotel offers in a specific city.

Prerequisites

Configuration

You need to configure your Amadeus API credentials. You can set them in src/main/resources/application.properties or via environment variables.

application.properties

amadeus.client-id=YOUR_AMADEUS_CLIENT_ID
amadeus.client-secret=YOUR_AMADEUS_CLIENT_SECRET

Environment Variables

It is recommended to use environment variables for sensitive keys:

export AMADEUS_CLIENT_ID=your_client_id
export AMADEUS_CLIENT_SECRET=your_client_secret

And update src/main/resources/application.properties to reference them:

amadeus.client-id=${AMADEUS_CLIENT_ID}
amadeus.client-secret=${AMADEUS_CLIENT_SECRET}

Running the Application

Using Gradle

You can run the application directly using the Gradle wrapper:

./gradlew bootRun

The server will start on port 8080 (default).

Building the JAR

To build the executable JAR file:

./gradlew build

The JAR will be located in build/libs/.

Docker

Note: The project uses Gradle, but the included Dockerfile might be set up for Maven. Please verify before building.

To build and run with Docker (assuming a correct Dockerfile):

docker build -t amadeus-mcp .
docker run -p 8080:8080 amadeus-mcp

Tools Usage

search_flights

Parameters:

  • originLocationCode (String): Origin IATA code (e.g., "JFK").
  • destinationLocationCode (String): Destination IATA code (e.g., "LHR").
  • departureDate (String): Departure date in YYYY-MM-DD format.
  • returnDate (String): Return date in YYYY-MM-DD format.
  • adults (Int): Number of adult passengers.

search_hotels

Parameters:

  • cityCode (String): City IATA code (e.g., "PAR" for Paris).
  • adults (Int): Number of adults.
  • date (String): Check-in date in YYYY-MM-DD format.

Troubleshooting

  • 401 Unauthorized: Check if your Amadeus API keys are correct and active.
  • Connection Refused: Ensure the server is running and the port is accessible.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors