Airbnb MCP Server

Airbnb MCP Server

site icon
2025.03.10 79
JavaScriptAirbnb 房源搜索房源信息获取位置服务
mcp-server-airbnb 是一个用于搜索 Airbnb 房源并获取房源详细信息的 MCP 服务器。它提供了两个主要工具:airbnb_search 用于搜索 Airbnb 房源,airbnb_listing_details 用于获取特定房源的详细信息。该服务无需 API 密钥,使用 cheerio 进行 HTML 解析,并返回结构化的 JSON 数据。
View on GitHub

Overview

基本能力

产品定位

mcp-server-airbnb 是一个专门用于搜索和获取 Airbnb 房源信息的 MCP 服务器。

核心功能

  • 提供两个主要工具:
  • airbnb_search: 搜索 Airbnb 房源
  • airbnb_listing_details: 获取特定房源的详细信息
  • 无需 API 密钥
  • 使用 cheerio 进行 HTML 解析
  • 返回结构化的 JSON 数据
  • 通过扁平化和挑选数据减少上下文负载

适用场景

  • 旅行规划
  • 房源比较
  • 价格分析
  • 房源信息收集

工具列表

  1. airbnb_search
  2. 能力:搜索 Airbnb 房源
  3. 输入:
    • 必需:location (字符串)
    • 可选:placeId, checkin, checkout, adults, children, infants, pets, minPrice, maxPrice, cursor, ignoreRobotsText
  4. 返回:包含房源详细信息(如名称、价格、位置等)的数组

  5. airbnb_listing_details

  6. 能力:获取特定房源的详细信息
  7. 输入:
    • 必需:id (字符串)
    • 可选:checkin, checkout, adults, children, infants, pets, ignoreRobotsText
  8. 返回:包含房源详细信息的对象(如描述、房东详情、设施、价格等)

常见问题解答

  • 该服务尊重 Airbnb 的 robots.txt 规则
  • 可以通过 --ignore-robots-txt 参数忽略 robots.txt
  • OpenBnB 与 Airbnb, Inc. 或其子公司无关

使用教程

使用依赖

  • 需要安装 Node.js 以使用 npx

安装教程

在 Claude Desktop 上安装

  1. 前往:Settings > Developer > Edit Config
  2. 将以下内容添加到 claude_desktop_config.json 中:
{
  "mcpServers": {
    "airbnb": {
      "command": "npx",
      "args": [
        "-y",
        "@openbnb/mcp-server-airbnb"
      ]
    }
  }
}

如果要忽略 robots.txt,使用以下配置:

{
  "mcpServers": {
    "airbnb": {
      "command": "npx",
      "args": [
        "-y",
        "@openbnb/mcp-server-airbnb",
        "--ignore-robots-txt"
      ]
    }
  }
}
  1. 重启 Claude Desktop

通过 Smithery 安装

npx -y @smithery/cli install @openbnb-org/mcp-server-airbnb --client claude

调试方式

安装完成后,可以通过以下命令进行开发构建:

npm install
npm run build

许可证

该项目遵循 MIT 开源许可条款,请参阅 MIT 了解完整条款。