Skip to main content
Glama
pab1it0

Tripadvisor MCP

by pab1it0

Servidor MCP de Tripadvisor

Un servidor de Protocolo de contexto de modelo (MCP) para la API de contenido de Tripadvisor.

Esto proporciona acceso a datos de ubicación, reseñas y fotos de Tripadvisor a través de interfaces MCP estandarizadas, lo que permite que los asistentes de IA busquen destinos y experiencias de viaje.

Características

  • [x] Busque ubicaciones (hoteles, restaurantes, atracciones) en Tripadvisor

  • [x] Obtenga información detallada sobre ubicaciones específicas

  • [x] Recuperar reseñas y fotos de ubicaciones

  • [x] Busque ubicaciones cercanas según las coordenadas

  • [x] Autenticación de clave API

  • [x] Compatibilidad con contenedores Docker

  • [x] Proporcionar herramientas interactivas para asistentes de IA

La lista de herramientas es configurable, por lo que puedes elegir qué herramientas quieres que estén disponibles para el cliente MCP.

Related MCP server: expedia-travel-recommendations-mcp

Uso

  1. Obtén tu clave API de contenido de Tripadvisor desde el Portal para desarrolladores de Tripadvisor .

  2. Configure las variables de entorno para su API de contenido de Tripadvisor, ya sea a través de un archivo .env o variables de entorno del sistema:

# Required: Tripadvisor Content API configuration
TRIPADVISOR_API_KEY=your_api_key_here
  1. Agregue la configuración del servidor al archivo de configuración del cliente. Por ejemplo, para 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"
      }
    }
  }
}

Nota: si ve Error: spawn uv ENOENT en Claude Desktop, es posible que deba especificar la ruta completa a uv o establecer la variable de entorno NO_UV=1 en la configuración.

Uso de Docker

Este proyecto incluye soporte para Docker para una fácil implementación y aislamiento.

Construyendo la imagen de Docker

Construya la imagen de Docker usando:

docker build -t tripadvisor-mcp-server .

Ejecutando con Docker

Puedes ejecutar el servidor usando Docker de varias maneras:

Usando docker run directamente:

docker run -it --rm \
  -e TRIPADVISOR_API_KEY=your_api_key_here \
  tripadvisor-mcp-server

Usando docker-compose:

Cree un archivo .env con su clave API de Tripadvisor y luego ejecute:

docker-compose up

Ejecutar con Docker en Claude Desktop

Para utilizar el servidor en contenedores con Claude Desktop, actualice la configuración para usar Docker con las variables de entorno:

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

Esta configuración pasa las variables de entorno de Claude Desktop al contenedor Docker utilizando el indicador -e con solo el nombre de la variable y proporcionando los valores reales en el objeto env .

Desarrollo

¡Agradecemos sus contribuciones! Abra un problema o envíe una solicitud de incorporación de cambios si tiene alguna sugerencia o mejora.

Este proyecto utiliza uv para gestionar las dependencias. Instale uv siguiendo las instrucciones para su plataforma:

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

Luego puede crear un entorno virtual e instalar las dependencias con:

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

Estructura del proyecto

El proyecto se ha organizado con una estructura de directorio 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

Pruebas

El proyecto incluye un conjunto de pruebas que garantiza la funcionalidad y ayuda a prevenir regresiones.

Ejecute las pruebas con pytest:

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

# Run the tests
pytest

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

Herramientas

Herramienta

Categoría

Descripción

search_locations

Buscar

Busque ubicaciones por texto de consulta, categoría y otros filtros

search_nearby_locations

Buscar

Encuentre ubicaciones cerca de coordenadas específicas

get_location_details

Recuperación

Obtenga información detallada sobre una ubicación

get_location_reviews

Recuperación

Recuperar reseñas de una ubicación

get_location_photos

Recuperación

Obtener fotografías de una ubicación

Licencia

Instituto Tecnológico de Massachusetts (MIT)


Available Tools

5 tools
get_location_detailsC

Get detailed information about a specific location

ParametersJSON Schema
NameRequiredDescriptionDefault
locationIdYes
languageNoen

TDQS

C2.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states what the tool does ('Get detailed information') without describing traits like whether it's read-only, requires authentication, has rate limits, or what the output format might be. This leaves critical behavioral aspects unspecified for a tool with no structured annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no wasted words. It is appropriately sized and front-loaded, directly stating the tool's purpose without unnecessary elaboration, making it efficient for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (2 parameters, no output schema, no annotations), the description is incomplete. It lacks details on parameter usage, behavioral traits, output expectations, and differentiation from siblings. For a tool with no structured support, this minimal description does not provide enough context for an agent to use it effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, so the description must compensate for undocumented parameters. It mentions 'a specific location' but does not explain the parameters (locationId and language) or their semantics, such as what locationId represents or how language affects the response. This fails to add meaningful context beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool's purpose ('Get detailed information about a specific location'), which is clear but vague. It specifies the verb ('Get') and resource ('location'), but does not distinguish what 'detailed information' entails or how it differs from sibling tools like get_location_photos or get_location_reviews. This leaves the scope ambiguous compared to alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus siblings. It does not mention alternatives, prerequisites, or exclusions, such as whether it should be used for basic info versus photos or reviews. Without such context, an agent might struggle to select the correct tool among the provided options.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_location_photosC

Get photos for a specific location

ParametersJSON Schema
NameRequiredDescriptionDefault
locationIdYes
languageNoen

TDQS

C2.4/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must fully disclose behavioral traits. It only states the basic action without mentioning permissions, rate limits, pagination, response format, or whether it's read-only or has side effects. This leaves critical operational details unspecified for a tool with parameters.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no wasted words. It's front-loaded and efficiently conveys the core purpose without unnecessary elaboration, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (2 parameters, no annotations, no output schema), the description is incomplete. It doesn't cover parameter meanings, behavioral aspects like safety or output, or usage context. For a tool that fetches data, more details on what to expect and how to use it are needed for effective agent operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate by explaining parameters. It doesn't mention 'locationId' or 'language' at all, leaving both parameters undocumented. The description adds no meaning beyond the schema, failing to clarify what 'locationId' refers to or how 'language' affects results.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get photos for a specific location' clearly states the action (get) and resource (photos for a location), but it's vague about scope (e.g., number of photos, types, or source). It doesn't differentiate from siblings like 'get_location_details' or 'get_location_reviews', which also fetch location-related data but for different resources.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. For example, it doesn't specify if this is for visual content versus textual details (vs. get_location_details) or reviews (vs. get_location_reviews), or when to prefer search tools like search_locations. The description lacks any context for selection among siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_location_reviewsC

Get reviews for a specific location

ParametersJSON Schema
NameRequiredDescriptionDefault
locationIdYes
languageNoen

TDQS

C2.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It only states the basic action without detailing traits like whether it's read-only, requires authentication, has rate limits, returns paginated results, or includes error handling. For a tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with a single sentence that directly states the tool's purpose. It is front-loaded and wastes no words, making it easy to parse quickly. This efficiency is appropriate for a simple tool, though it sacrifices detail for brevity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (2 parameters, no output schema, no annotations), the description is incomplete. It does not cover parameter meanings, behavioral traits, or output expectations (e.g., review format, error cases). Without annotations or an output schema, the description fails to provide enough context for reliable agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, so the description must compensate for undocumented parameters. It mentions 'a specific location' but does not explain the 'locationId' parameter (e.g., format, source) or the optional 'language' parameter (e.g., supported codes, default behavior). This lack of semantic context leaves parameters ambiguous beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get reviews for a specific location' clearly states the action (get) and resource (reviews for a location), which is adequate. However, it lacks specificity about what 'reviews' entail (e.g., ratings, comments, dates) and does not differentiate from sibling tools like 'get_location_details' or 'get_location_photos', leaving ambiguity about the scope of information returned.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites (e.g., needing a location ID), exclusions, or comparisons to siblings such as 'search_locations' for broader queries. This absence of context makes it harder for an agent to select the correct tool in practice.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_locationsC

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

ParametersJSON Schema
NameRequiredDescriptionDefault
searchQueryYes
languageNoen
categoryNo
phoneNo
addressNo
latLongNo

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('search') but doesn't describe what the search returns (e.g., list of results, pagination), performance characteristics, rate limits, authentication needs, or error conditions. This leaves significant gaps for an agent to understand the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose without unnecessary words. Every part of the sentence contributes directly to understanding the tool's function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (6 parameters, no schema descriptions, no output schema, no annotations), the description is inadequate. It doesn't address parameter usage, return values, error handling, or behavioral traits, leaving the agent with insufficient information to use the tool effectively beyond its basic purpose.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 6 parameters with 0% description coverage, and the tool description provides no information about any parameters. It doesn't explain what 'searchQuery' should contain, how 'category' is used, the format of 'latLong', or the purpose of optional fields like 'phone' and 'address'. This fails to compensate for the schema's lack of documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('search for') and resource ('locations'), and specifies the domain ('on Tripadvisor') with examples of location types ('hotels, restaurants, attractions'). It doesn't explicitly differentiate from sibling tools like 'search_nearby_locations', but the purpose is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'search_nearby_locations' or 'get_location_details'. The description implies a general search function but lacks context about prerequisites, limitations, or optimal use cases.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_nearby_locationsC

Search for locations near a specific latitude/longitude

ParametersJSON Schema
NameRequiredDescriptionDefault
latitudeYes
longitudeYes
languageNoen
categoryNo

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states the search action but doesn't describe what 'near' means (distance/radius), result format, pagination, rate limits, authentication needs, or error conditions. For a search tool with zero annotation coverage, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero wasted words. It's appropriately sized for a search tool and front-loads the core functionality without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 4 parameters with 0% schema coverage, no annotations, no output schema, and multiple sibling tools, the description is incomplete. It covers the basic purpose but lacks parameter details, behavioral context, usage differentiation, and return value information that would help an agent use this tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for undocumented parameters. The description mentions latitude/longitude (covering 2 of 4 parameters) but doesn't explain the 'language' or 'category' parameters, their formats, or valid values. It adds some meaning for required parameters but leaves half the parameters unexplained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as 'Search for locations near a specific latitude/longitude', which includes a specific verb ('Search') and resource ('locations') with geographic context. However, it doesn't distinguish this tool from its sibling 'search_locations', which might have different functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'search_locations' or when not to use it. There's no mention of prerequisites, limitations, or comparison with sibling tools, leaving the agent without contextual usage information.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 5 tool updates
    • First observedget_location_details
    • First observedget_location_photos
    • First observedget_location_reviews
    • First observedsearch_locations
    • First observedsearch_nearby_locations

TDQS

B3.2/5.0

Scored across 5 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: get_location_details retrieves general information, get_location_photos handles photos, get_location_reviews focuses on reviews, search_locations performs general searches, and search_nearby_locations finds locations based on proximity. There is no overlap or ambiguity between these functions.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with 'get_' or 'search_' prefixes and descriptive suffixes like 'details', 'photos', 'reviews', 'locations', and 'nearby_locations'. The naming is uniform and predictable throughout the set.

Tool Count5/5

With 5 tools, this server is well-scoped for its Tripadvisor domain, covering key operations like retrieving details, photos, reviews, and performing searches. Each tool serves a unique and necessary function without being excessive or insufficient.

Completeness4/5

The tool set provides strong coverage for core Tripadvisor functionalities, including search and retrieval of location details, photos, and reviews. A minor gap exists in lacking CRUD operations (e.g., creating or updating reviews), but this is reasonable for a read-focused API, and agents can work effectively with the provided tools.

Maintenance

ActivityInactive
ResponsivenessUnresponsive

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers