Tripadvisor Mcp 伺服器

建立者pab1it0pab1it0

一個用於Tripadvisor內容API的模型上下文協議(MCP)伺服器。這提供了通過標準化的MCP介面訪問Tripadvisor位置數據、評論和照片的能力,允許AI助手搜索旅遊目的地和體驗。

概覽

Tripadvisor MCP 是什麼?

Tripadvisor MCP(模型上下文協議)是一個伺服器,旨在提供對 Tripadvisor 內容 API 的訪問。這個創新的平台允許開發者和 AI 助手通過標準化的 MCP 接口檢索 Tripadvisor 的位置數據、評論和照片。通過使用 Tripadvisor MCP,用戶可以高效地搜索旅行目的地和體驗,使其成為與旅行相關應用程序的必備工具。

Tripadvisor MCP 的特點

  • 訪問豐富內容:用戶可以訪問大量信息,包括 Tripadvisor 的位置數據、用戶評論和高質量照片。
  • 標準化接口:MCP 接口提供了一種一致的方式來與 Tripadvisor 數據互動,簡化了開發者的集成過程。
  • AI 兼容性:Tripadvisor MCP 旨在與 AI 助手無縫集成,增強用戶在旅行規劃中的體驗。
  • 公共存儲庫:該項目是公開可用的,鼓勵來自世界各地的開發者進行合作和貢獻。

如何使用 Tripadvisor MCP

  1. 設置環境:確保您擁有與 Tripadvisor 內容 API 互動所需的工具和庫。
  2. 訪問 API:利用標準化的 MCP 接口連接到 Tripadvisor 數據。這可能涉及身份驗證和設置 API 密鑰。
  3. 查詢數據:使用提供的端點搜索旅行目的地,檢索評論和訪問照片。
  4. 集成到您的應用程序中:將檢索到的數據整合到您的應用程序中,無論是旅行規劃工具、聊天機器人還是其他 AI 驅動的服務。

常見問題

問:我可以通過 Tripadvisor MCP 訪問什麼類型的數據?

答:您可以訪問與各種旅行目的地相關的位置數據、用戶評論和照片。

問:Tripadvisor MCP 是免費使用的嗎?

答:是的,Tripadvisor MCP 是一個公共存儲庫,允許開發者免費使用。

問:我可以為 Tripadvisor MCP 項目做出貢獻嗎?

答:當然可以!歡迎貢獻,您可以與其他開發者合作以增強該項目。

問:我如何報告問題或請求功能?

答:您可以通過在項目的 GitHub 存儲庫中創建問題來報告問題或請求新功能。

問:有關 Tripadvisor MCP 的文檔可用嗎?

答:是的,通常在存儲庫中提供全面的文檔,詳細說明如何使用 API 及其功能。

詳細

Tripadvisor MCP Server

A Model Context Protocol (MCP) server for Tripadvisor Content API.

This provides access to Tripadvisor location data, reviews, and photos through standardized MCP interfaces, allowing AI assistants to search for travel destinations and experiences.

Features

  • Search for locations (hotels, restaurants, attractions) on Tripadvisor

  • Get detailed information about specific locations

  • Retrieve reviews and photos for locations

  • Search for nearby locations based on coordinates

  • API Key authentication

  • Docker containerization support

  • Provide interactive tools for AI assistants

The list of tools is configurable, so you can choose which tools you want to make available to the MCP client.

Usage

  1. Get your Tripadvisor Content API key from the Tripadvisor Developer Portal.

  2. Configure the environment variables for your Tripadvisor Content API, either through a .env file or system environment variables:

### Required: Tripadvisor Content API configuration
TRIPADVISOR_API_KEY=your_api_key_here
  1. Add the server configuration to your client configuration file. For example, for Claude Desktop:
{
  "mcpServers": {
    "tripadvisor": {
      "command": "uv",
      "args": [
        "--directory",
        "<full path to tripadvisor-mcp directory>",
        "run",
        "src/tripadvisor_mcp/main.py"
      ],
      "env": {
        "TRIPADVISOR_API_KEY": "your_api_key_here"
      }
    }
  }
}

Note: if you see Error: spawn uv ENOENT in Claude Desktop, you may need to specify the full path to uv or set the environment variable NO_UV=1 in the configuration.

Docker Usage

This project includes Docker support for easy deployment and isolation.

Building the Docker Image

Build the Docker image using:

docker build -t tripadvisor-mcp-server .

Running with Docker

You can run the server using Docker in several ways:

Using docker run directly:
docker run -it --rm \
  -e TRIPADVISOR_API_KEY=your_api_key_here \
  tripadvisor-mcp-server
Using docker-compose:

Create a .env file with your Tripadvisor API key and then run:

docker-compose up

Running with Docker in Claude Desktop

To use the containerized server with Claude Desktop, update the configuration to use Docker with the environment variables:

{
  "mcpServers": {
    "tripadvisor": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e", "TRIPADVISOR_API_KEY",
        "tripadvisor-mcp-server"
      ],
      "env": {
        "TRIPADVISOR_API_KEY": "your_api_key_here"
      }
    }
  }
}

This configuration passes the environment variables from Claude Desktop to the Docker container by using the -e flag with just the variable name, and providing the actual values in the env object.

Development

Contributions are welcome! Please open an issue or submit a pull request if you have any suggestions or improvements.

This project uses uv to manage dependencies. Install uv following the instructions for your platform:

curl -LsSf https://astral.sh/uv/install.sh | sh

You can then create a virtual environment and install the dependencies with:

uv venv
source .venv/bin/activate  # On Unix/macOS
.venv\Scripts\activate     # On Windows
uv pip install -e .

Project Structure

The project has been organized with a src directory structure:

tripadvisor-mcp/
├── src/
│   └── tripadvisor_mcp/
│       ├── __init__.py      # Package initialization
│       ├── server.py        # MCP server implementation
│       ├── main.py          # Main application logic
├── Dockerfile               # Docker configuration
├── docker-compose.yml       # Docker Compose configuration
├── .dockerignore            # Docker ignore file
├── pyproject.toml           # Project configuration
└── README.md                # This file

Testing

The project includes a test suite that ensures functionality and helps prevent regressions.

Run the tests with pytest:

### Install development dependencies
uv pip install -e ".[dev]"

### Run the tests
pytest

### Run with coverage report
pytest --cov=src --cov-report=term-missing

Tools

| Tool | Category | Description | | | | | | search_locations | Search | Search for locations by query text, category, and other filters | | search_nearby_locations | Search | Find locations near specific coordinates | | get_location_details | Retrieval | Get detailed information about a location | | get_location_reviews | Retrieval | Retrieve reviews for a location | | get_location_photos | Retrieval | Get photos for a location |

License

MIT

伺服器配置

{
  "mcpServers": {
    "tripadvisor-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/metorial/mcp-container--pab1it0--tripadvisor-mcp--tripadvisor-mcp",
        "tripadvisor-mcp"
      ],
      "env": {
        "TRIPADVISOR_API_KEY": "tripadvisor-api-key"
      }
    }
  }
}

專案資訊

作者
pab1it0
Category
位置服務
建立於
Aug 11, 2025
星標
42
語言
Python
標籤
-

Tripadvisor Mcp 伺服器 替代方案

若您需要Tripadvisor Mcp 伺服器 的一些替代方案,我們依分類為您提供相關網站。

Amap 地圖是一個支持任何 MCP 協議客戶端的伺服器,使用者可以輕鬆利用 Amap 地圖 MCP 伺服器提供各種基於位置的服務。

百度地图的核心API现在已完全兼容MCP协议,使其成为中国首个兼容MCP协议的地图服务提供商。

查看更多 >>