Airbnb MCP Server

repository·main·Indexed 19 days ago

https://github.com/openbnb-org/mcp-server-airbnb

An MCP (Model Context Protocol) server that enables AI applications to search Airbnb listings and retrieve detailed property information. It features the airbnb_search tool for filtered searches and the airbnb_listing_details tool for comprehensive property data. The server includes international geocoding support via Photon and Nominatim, and can be installed as an MCP Bundle for Claude Desktop or via npx for clients like Cursor.

Tokens
2.1K
Snippets
3
Records
12
Agent score
17%

What's inside @openbnb/mcp-server-airbnb

  1. How geocoding works in the Airbnb MCP Server

    main

    To ensure accurate international results (e.g., "Copenhagen, Denmark"), the server uses third-party geocoders to translate location strings into map bounding boxes before querying Airbnb.

    Geocoding Workflow

    1. Primary: The server calls Photon (an OSM-based service).
    2. Fallback: If Photon fails to return a bounding box, the server calls Nominatim.
    3. Direct Fallback: If both fail, the server sends the raw location string directly to Airbnb.

    Privacy & Opting Out

    • Privacy: Only the location string is sent to geocoders; no IP or tracking data is shared.
    • Opt-out (Per-request): Provide a placeId (Google Maps Place ID) in your tool call. This skips geocoding entirely.
    • Opt-out (Global): Set the environment variable DISABLE_GEOCODING=true. This forces all searches to use Airbnb's internal geocoder, which may result in inaccurate international locations.
  2. Install the Airbnb MCP Server for Cursor and other MCP clients

    main

    For clients like Cursor, you can install the server using npx. Ensure Node.js is installed on your system.

    1. Open Cursor Settings > Tools & Integrations > New MCP Server.
    2. Add the following configuration to your mcp.json file.

    To ignore robots.txt for all requests, include the --ignore-robots-txt argument in the args array.

    {
      "mcpServers": {
        "airbnb": {
          "command": "npx",
          "args": [
            "-y",
            "@openbnb/mcp-server-airbnb"
          ]
        }
      }
    }
  3. Build and test the Airbnb MCP Server from source

    main

    If you are developing or testing the server locally, use the following commands.

    Build commands:

    # Install dependencies
    npm install
    
    # Build the project
    npm run build
    
    # Watch for changes during development
    npm run watch

    Testing the server directly:

    # Run with robots.txt compliance (default)
    node dist/index.js
    
    # Run with robots.txt ignored (for testing)
    node dist/index.js --ignore-robots-txt
  4. Install the Airbnb MCP Server for Claude Desktop

    main

    The Airbnb MCP server is packaged as an MCP Bundle (.mcpb) file for easy installation in Claude Desktop.

    1. Download the .mcpb file from the latest release.
    2. Open the downloaded file; Claude Desktop will automatically trigger an installation dialog.
    3. Follow the prompts to configure extension settings.

    To bypass robots.txt restrictions in Claude Desktop, open the Claude Desktop settings, navigate to the Airbnb extension, and enable the Ignore robots.txt toggle.

  5. Configure Airbnb MCP Server settings

    main

    The server provides two main configuration options to control behavior:

    Ignore robots.txt

    • Type: Boolean
    • Default: false
    • Description: Bypasses robots.txt restrictions when making requests to Airbnb. Recommended to keep disabled unless needed for testing.

    Disable third-party geocoding

    • Type: Boolean (Environment Variable: DISABLE_GEOCODING)
    • Default: false
    • Description: Skips the Photon/Nominatim geocoding step and lets Airbnb resolve the location string.
    • Warning: Enabling this may cause non-US searches (e.g., "Paris, France") to return incorrect results because Airbnb's internal geocoder is less accurate for international locations.
  6. Use the airbnb_search tool

    main

    Search for Airbnb listings using various filters.

    Parameters:

    • location (required): Search area (e.g., "San Francisco, CA"). If placeId is not provided, the server uses Photon/Nominatim for geocoding.
    • placeId (optional): Google Maps Place ID. Overrides location and skips third-party geocoding.
    • checkin (optional): Date in YYYY-MM-DD format.
    • checkout (optional): Date in YYYY-MM-DD format.
    • adults (optional): Number of adults (default: 1).
    • children (optional): Number of children (default: 0).
    • infants (optional): Number of infants (default: 0).
    • pets (optional): Number of pets (default: 0).
    • minPrice (optional): Minimum price per night.
    • maxPrice (optional): Maximum price per night.
    • cursor (optional): Pagination cursor for subsequent pages.
    • propertyType (optional): One of entire_home, private_room, shared_room, or hotel_room.
    • ignoreRobotsText (optional): Override robots.txt for this specific request.
  7. Use the airbnb_listing_details tool

    main

    Retrieve comprehensive information about a specific Airbnb listing.

    Parameters:

    • id (required): The unique Airbnb listing ID.
    • checkin (optional): Date in YYYY-MM-DD format.
    • checkout (optional): Date in YYYY-MM-DD format.
    • adults (optional): Number of adults (default: 1).
    • children (optional): Number of children (default: 0).
    • infants (optional): Number of infants (default: 0).
    • pets (optional): Number of pets (default: 0).
    • ignoreRobotsText (optional): Override robots.txt for this specific request.

    Returns: Detailed data including location coordinates, amenities, house rules, policies, property descriptions, and a direct link to the listing.

  8. Configure the Airbnb MCP server via environment variables

    main

    The server behavior can be modified using the following environment variables:

    • IGNORE_ROBOTS_TXT: Set to "true" to bypass Airbnb's robots.txt restrictions. This is useful if you encounter errors stating a path is disallowed.
    • DISABLE_GEOCODING: Set to "true" to skip third-party geocoding (Photon/Nominatim). When enabled, the server relies on Airbnb's own server-side geocoder for the location string.
  9. Search for Airbnb listings with `airbnb_search`

    main

    Use the airbnb_search tool to find Airbnb listings based on location, dates, and guest counts. The tool supports advanced filtering such as price ranges and property types. If a placeId (Google Maps Place ID) is provided, it overrides the location parameter. The tool also provides a cursor parameter for handling pagination in search results.

    {
      "name": "airbnb_search",
      "arguments": {
        "location": "Paris, France",
        "checkin": "2024-12-01",
        "checkout": "2024-12-05",
        "adults": 2,
        "minPrice": 100,
        "maxPrice": 500,
        "propertyType": "entire_home"
      }
    }
  10. Get listing details with `airbnb_listing_details`

    main

    Use the airbnb_listing_details tool to retrieve comprehensive information about a specific Airbnb property using its unique listing ID. You can optionally provide check-in/check-out dates and guest counts to get availability-specific details. The returned data includes location information, house rules, highlights, descriptions, and amenities.

    {
      "name": "airbnb_listing_details",
      "arguments": {
        "id": "LISTING_ID_HERE",
        "checkin": "2024-12-01",
        "checkout": "2024-12-05",
        "adults": 2
      }
    }
  11. Reference: `airbnb_search` input schema

    main

    The following properties are available for the airbnb_search tool:

    PropertyTypeDescription
    locationstringRequired. Location to search for (city, state, etc.)
    placeIdstringGoogle Maps Place ID (overrides location)
    checkinstringCheck-in date (YYYY-MM-DD)
    checkoutstringCheck-out date (YYYY-MM-DD)
    adultsnumberNumber of adults
    childrennumberNumber of children
    infantsnumberNumber of infants
    petsnumberNumber of pets
    minPricenumberMinimum price for the stay
    maxPricenumberMaximum price for the stay
    cursorstringBase64-encoded string used for Pagination
    propertyTypestringEnum: entire_home, private_room, shared_room, hotel_room
    ignoreRobotsTextbooleanIgnore robots.txt rules for this request
  12. Reference: `airbnb_listing_details` input schema

    main

    The following properties are available for the airbnb_listing_details tool:

    PropertyTypeDescription
    idstringRequired. The Airbnb listing ID
    checkinstringCheck-in date (YYYY-MM-DD)
    checkoutstringCheck-out date (YYYY-MM-DD)
    adultsnumberNumber of adults
    childrennumberNumber of children
    infantsnumberNumber of infants
    petsnumberNumber of pets
    ignoreRobotsTextbooleanIgnore robots.txt rules for this request