360 Secure SkillHub
360 安全技能中心

tripadvisor

通过 stdio MCP 服务访问 TripAdvisor Terra API,需安装 MCP 包并配置 Terra API 密钥;支持按名称或位置搜索酒店、餐厅和景点,获取详情、批量信息、评分、评论与照片;接口只读并带缓存,可选浏览器桥接读取公开页面。

分类:生活
chrischall
chrischall
热度 26.21
最近更新 2026-11-05 02:15:13

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add chrischall/tripadvisor
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
tripadvisor
description
TripAdvisor travel data via the Terra API through MCP. Use when the user asks to find hotels, restaurants, or attractions, look up a place's TripAdvisor rating/reviews/photos, compare places to stay or eat, or find what's near a location. Triggers on phrases like "find a hotel in", "best restaurants near", "TripAdvisor reviews for", "what's the rating of", "things to do in", or "attractions near me". Requires the @chrischall/tripadvisor-mcp package installed and the tripadvisor server registered (see Setup), plus a TripAdvisor Terra API key.

tripadvisor-mcp

MCP server for the TripAdvisor Terra API — location search, details, photos, and reviews for hotels, restaurants, and attractions, exposed to Claude over stdio. (Terra is TripAdvisor's current API; the legacy Content API is sunset on 2026-08-31.)

Setup

Option A — npx (recommended)

Add to .mcp.json in your project or ~/.claude/mcp.json:

{
  "mcpServers": {
    "tripadvisor": {
      "command": "npx",
      "args": ["-y", "@chrischall/tripadvisor-mcp"],
      "env": {
        "TRIPADVISOR_API_KEY": "your-terra-api-key-here"
      }
    }
  }
}

Get a key at tripadvisor.com/developers. The free Discover tier is pay-as-you-go (10 QPS, 10,000 calls/day); the server caches responses in-memory to stretch it. Must be a Terra key — a legacy key returns 403.

Option B — from source

git clone https://github.com/chrischall/tripadvisor-mcp
cd tripadvisor-mcp
npm install && npm run build

Environment

Var Required Purpose
TRIPADVISOR_API_KEY for the Terra tools Terra API key (sent as the X-API-Key header). A legacy key returns 403. The ta_web_* tools work without it.
TRIPADVISOR_CACHE_TTL no Seconds to cache identical search responses (default: 300; 0 disables).
TRIPADVISOR_STATIC_CACHE_TTL no Longer TTL for details/photos/reviews (default: 3600; 0 disables).

Tools

Tool Use for
ta_search_locations Find places by name — query required; filter with category (RESTAURANT/ATTRACTION/HOTEL), country_code, geo_name, postal_code, locale; page with page/size (max 20). Returns matches with a location id.
ta_search_nearby Find places near a center — supply one of: lat+lon+radius, location_id+radius, or a sw_lat/sw_lon/ne_lat/ne_lon box (unit MI/KM); filter category, min_rating, sort (distance/rating), include_photo.
ta_get_location_details Full listing for a location id: names, descriptions, address, coordinates, traveler ratings, phone, URLs. Optional locale.
ta_get_locations Batch details for multiple ids (ids: [..], 1–50) in one call — cheaper than repeated details; unknown ids are omitted.
ta_get_location_photos Photos (multi-size URLs, source, dimensions). Page with page/size.
ta_get_location_reviews Traveler reviews. Page with page/size.
ta_web_healthcheck Diagnose the optional tripadvisor.com browser-bridge connection (ContextMint Bridge extension). Reports bridge role/port/timing and an actionable hint if it's not connected.
ta_web_get_location Get a location's details (rating, review count, address, coordinates, phone, photo, URL) from its public TripAdvisor page via the browser bridge — works without an API key. Covers attractions/hotels/restaurants; no individual review text.

Response shape

ta_search_locations, ta_search_nearby, ta_get_locations and ta_get_location_reviews take view: "compact" | "full", and compact is the default — the slim rung is what you get without asking for it. Pass view: "full" for TripAdvisor's whole records.

The compact rung is not the same operation on all four:

  • ta_search_locations, ta_search_nearby and ta_get_locations run a real field projection over each Terra location, keeping id, name, category (derived from the listing URL prefix), geo, city, state, rating, review_count and url — plus distance_miles / distance_kilometers on nearby results. pagination is preserved. On an unexpected shape the projection warns to stderr and returns the raw payload rather than a page of empties.
  • ta_get_location_reviews has no projection, so its compact rung strips image URLs — reviewer avatars and per-review snapshots — and leaves everything else, review text included, exactly as TripAdvisor sent it.

The other four tools take no view, each for its own reason:

  • ta_get_location_photos — its product is the image URLs. A photos item hangs its whole payload off the photo media key, so stripping would not shrink the response, it would empty it, leaving ids pointing at nothing.
  • ta_web_get_location — the opposite case: it returns no upstream payload at all. The page parser already projects down to a dozen named fields, and the image among them is a deliberate pick from a page offering hundreds.
  • ta_get_location_details — its compact rung would be the same location row ta_search_locations already handed you with the id, so it would return what you already have, on the one tool you call to get more than that.
  • ta_web_healthcheck — it reports a diagnosis it assembles itself, not a TripAdvisor record.

A rung that cannot change anything is worse than no parameter.

(This replaced an opt-in compact: true flag. Passing compact now does nothing — zod drops the unknown key and you get the compact rung regardless, which is what the flag used to ask for.)

Workflow

  1. ta_search_locations (or ta_search_nearby) to get a location id.
  2. ta_get_location_details for ratings/address; ta_get_location_reviews and ta_get_location_photos for reviews and images.

Notes:

  • Everything is read-only — Terra has no write endpoints.
  • A 403/401 means the key isn't a valid Terra key (a legacy Content API key won't work) or its plan isn't active.
  • List endpoints paginate with page/size (max 20 per page).

In context groups

On a host that groups MCPs by context (mcp-host's context groups), this server is in the travel group. Every tool is a lookup: TripAdvisor finds places and describes them, and nothing here answers a "what's new / due / on" question about the person, so no tool is a canonical read and none takes a subject. A compound travel ask ("…and what's on my trip, plus any good restaurants near the hotel?") reaches this server only for the lookup half — ta_search_locations / ta_search_nearby, then the detail and review tools — while the group's canonical reads come from the other travel members.

ta_web_get_location is browser-bridged: when no signed-in www.tripadvisor.com tab is open, the group answers that this source needs your browser open. The Terra API tools need no browser.