> ## Documentation Index
> Fetch the complete documentation index at: https://ikun.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Airbnb MCP agent

使用 [Airbnb MCP 服务器](https://github.com/openbnb-org/mcp-server-airbnb) 来创建一个可以搜索 Airbnb 房源的 Agent：

```python theme={null}
"""🏠 MCP Airbnb Agent - 搜索 Airbnb 房源！

此示例展示了如何创建一个使用 MCP 和 Gemini 2.5 Pro 来搜索 Airbnb 房源的 Agent。

运行：`pip install google-genai mcp agno` 来安装依赖库
"""

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(
            "2025年8月1日至4日，三晚，两人，旧金山有哪些可预订的房源？"
        )
    )

```
