Copy
Ask AI
"""🏠 MCP Airbnb Agent - Search for Airbnb listings!
This example shows how to create an agent that uses MCP and Gemini 2.5 Pro to search for Airbnb listings.
Run: `pip install google-genai mcp agno` to install the dependencies
"""
import asyncio
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-2.5-pro-exp-03-25"),
tools=[mcp_tools],
markdown=True,
)
response_stream = await agent.arun(message, stream=True)
await apprint_run_response(response_stream, markdown=True)
if __name__ == "__main__":
asyncio.run(
run_agent(
"What listings are available in San Francisco for 2 people for 3 nights from 1 to 4 August 2025?"
)
)