Airbnb MCP agent

Using the Airbnb MCP server to create an Agent that can search for Airbnb listings:

1"""🏠 MCP Airbnb Agent - Search for Airbnb listings!
2
3This example shows how to create an agent that uses MCP and Gemini 2.5 Pro to search for Airbnb listings.
4
5Run: `uv pip install google-genai mcp kern-ai` to install the dependencies
6"""
7
8import asyncio
9
10from kern.agent import Agent
11from kern.models.google import Gemini
12from kern.tools.mcp import MCPTools
13from kern.utils.pprint import apprint_run_response
14
15
16async def run_agent(message: str) -> None:
17 async with MCPTools(
18 "npx -y @openbnb/mcp-server-airbnb --ignore-robots-txt"
19 ) as mcp_tools:
20 agent = Agent(
21 model=Gemini(id="gemini-2.5-pro-exp-03-25"),
22 tools=[mcp_tools],
23 markdown=True,
24 )
25
26 response_stream = await agent.arun(message, stream=True)
27 await apprint_run_response(response_stream, markdown=True)
28
29
30if __name__ == "__main__":
31 asyncio.run(
32 run_agent(
33 "What listings are available in San Francisco for 2 people for 3 nights from 1 to 4 August 2025?"
34 )
35 )