Airbnb MCP agent

Search Airbnb listings with an Agno agent connected to the Airbnb MCP server over stdio.

Connect an agent to the Airbnb MCP server and search for current listings.

"""Search for Airbnb listings with MCP and Gemini 3.1 Pro Preview.

Run: `uv pip install google-genai "agno[mcp]"` to install the dependencies.
"""

import asyncio
from datetime import date, timedelta

from agno.agent import Agent
from agno.models.google import Gemini
from agno.tools.mcp import MCPTools
from agno.utils.pprint import apprint_run_response


async def run_agent(message: str) -> None:
    async with MCPTools(
        "npx -y @openbnb/mcp-server-airbnb --ignore-robots-txt"
    ) as mcp_tools:
        agent = Agent(
            model=Gemini(id="gemini-3.1-pro-preview"),
            tools=[mcp_tools],
            markdown=True,
        )

        response_stream = agent.arun(message, stream=True)
        await apprint_run_response(response_stream, markdown=True)


if __name__ == "__main__":
    check_in = date.today() + timedelta(days=30)
    check_out = check_in + timedelta(days=3)
    asyncio.run(
        run_agent(
            f"What listings are available in San Francisco for 2 people "
            f"from {check_in.isoformat()} to {check_out.isoformat()}?"
        )
    )

Run the Example

Set up your virtual environment

uv venv --python 3.12
source .venv/bin/activate

Install Node.js

Install Node.js, then verify that node and npx are available:

node --version
npx --version

Install Python dependencies

uv pip install -U google-genai "agno[mcp]"

Export your Google API key

export GOOGLE_API_KEY="your_google_api_key_here"

Run the example

Save the code above as airbnb.py, then run:

python airbnb.py