Skip to main content
Glama

Tripadvisor MCP

Tripadvisor MCP 服务器

Tripadvisor 内容 API 的模型上下文协议(MCP) 服务器。

这可以通过标准化的 MCP 界面访问 Tripadvisor 位置数据、评论和照片,从而让 AI 助手搜索旅行目的地和体验。

特征

  • [x] 在 Tripadvisor 上搜索地点(酒店、餐厅、景点)
  • [x] 获取特定位置的详细信息
  • [x] 检索地点的评论和照片
  • [x] 根据坐标搜索附近的位置
  • [x] API密钥认证
  • [x] Docker 容器化支持
  • [x] 为AI助手提供交互工具

工具列表是可配置的,因此您可以选择要向 MCP 客户端提供的工具。

用法

  1. Tripadvisor 开发者门户获取您的 Tripadvisor 内容 API 密钥。
  2. 通过.env文件或系统环境变量配置您的 Tripadvisor Content API 的环境变量:
# Required: Tripadvisor Content API configuration TRIPADVISOR_API_KEY=your_api_key_here
  1. 将服务器配置添加到客户端配置文件中。例如,对于 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" } } } }

注意:如果您在 Claude Desktop 中看到Error: spawn uv ENOENT ,则可能需要指定uv的完整路径或在配置中设置环境变量NO_UV=1

Docker 使用

该项目包括 Docker 支持,以便于部署和隔离。

构建 Docker 镜像

使用以下方式构建 Docker 镜像:

docker build -t tripadvisor-mcp-server .

使用 Docker 运行

您可以通过多种方式使用 Docker 运行服务器:

直接使用 docker run:
docker run -it --rm \ -e TRIPADVISOR_API_KEY=your_api_key_here \ tripadvisor-mcp-server
使用docker-compose:

使用您的 Tripadvisor API 密钥创建一个.env文件,然后运行:

docker-compose up

在 Claude Desktop 中使用 Docker 运行

要将容器化服务器与 Claude Desktop 一起使用,请更新配置以使用带有环境变量的 Docker:

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

此配置使用仅带有变量名的-e标志将环境变量从 Claude Desktop 传递到 Docker 容器,并在env对象中提供实际值。

发展

欢迎贡献代码!如果您有任何建议或改进,请提交 issue 或 pull request。

本项目使用uv来管理依赖项。请按照您平台的说明安装uv

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

然后,您可以创建一个虚拟环境并使用以下命令安装依赖项:

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

项目结构

该项目已采用src目录结构进行组织:

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

测试

该项目包括一个测试套件,可确保功能并有助于防止回归。

使用 pytest 运行测试:

# Install development dependencies uv pip install -e ".[dev]" # Run the tests pytest # Run with coverage report pytest --cov=src --cov-report=term-missing

工具

工具类别描述
search_locations搜索通过查询文本、类别和其他过滤器搜索位置
search_nearby_locations搜索查找特定坐标附近的位置
get_location_details检索获取有关位置的详细信息
get_location_reviews检索检索某个地点的评论
get_location_photos检索获取某个位置的照片

执照

麻省理工学院


-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

MCP 服务器使 LLM 能够与 Tripadvisor API 交互,通过标准化 MCP 接口支持位置数据、评论和照片

  1. 特征
    1. 用法
      1. Docker 使用
        1. 构建 Docker 镜像
        2. 使用 Docker 运行
        3. 在 Claude Desktop 中使用 Docker 运行
      2. 发展
        1. 项目结构
          1. 测试
          2. 工具
        2. 执照

          Related MCP Servers

          • A
            security
            A
            license
            A
            quality
            An MCP server that provides LLMs access to other LLMs
            Last updated -
            4
            14
            12
            JavaScript
            MIT License
          • -
            security
            A
            license
            -
            quality
            This MCP server provides access to TripAdvisor data for planning vacations, enabling users to search for and get details about locations, attractions, restaurants, and hotels through an interactive planning experience.
            Last updated -
            1
            Python
            Apache 2.0
            • Linux
            • Apple
          • A
            security
            A
            license
            A
            quality
            An MCP server that creates a virtual traveling environment on Google Maps, allowing users to guide an avatar on journeys with photo reports and SNS integration.
            Last updated -
            2
            14
            12
            TypeScript
            MIT License
            • Linux
            • Apple
          • A
            security
            F
            license
            A
            quality
            A lightweight MCP server that provides a unified interface to various LLM providers including OpenAI, Anthropic, Google Gemini, Groq, DeepSeek, and Ollama.
            Last updated -
            6
            411
            Python

          View all related MCP servers

          MCP directory API

          We provide all the information about MCP servers via our MCP API.

          curl -X GET 'https://glama.ai/api/mcp/v1/servers/pab1it0/tripadvisor-mcp'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server