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.
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.
- Java 21
- Amadeus Developer Account (to get API keys)
You need to configure your Amadeus API credentials. You can set them in src/main/resources/application.properties or via environment variables.
amadeus.client-id=YOUR_AMADEUS_CLIENT_ID
amadeus.client-secret=YOUR_AMADEUS_CLIENT_SECRETIt is recommended to use environment variables for sensitive keys:
export AMADEUS_CLIENT_ID=your_client_id
export AMADEUS_CLIENT_SECRET=your_client_secretAnd update src/main/resources/application.properties to reference them:
amadeus.client-id=${AMADEUS_CLIENT_ID}
amadeus.client-secret=${AMADEUS_CLIENT_SECRET}You can run the application directly using the Gradle wrapper:
./gradlew bootRunThe server will start on port 8080 (default).
To build the executable JAR file:
./gradlew buildThe JAR will be located in build/libs/.
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-mcpParameters:
originLocationCode(String): Origin IATA code (e.g., "JFK").destinationLocationCode(String): Destination IATA code (e.g., "LHR").departureDate(String): Departure date inYYYY-MM-DDformat.returnDate(String): Return date inYYYY-MM-DDformat.adults(Int): Number of adult passengers.
Parameters:
cityCode(String): City IATA code (e.g., "PAR" for Paris).adults(Int): Number of adults.date(String): Check-in date inYYYY-MM-DDformat.
- 401 Unauthorized: Check if your Amadeus API keys are correct and active.
- Connection Refused: Ensure the server is running and the port is accessible.