Getyourguide Mcp

io.github.chrischall由 GitHub 账号 chrischall 发布v2.2.0更新于 Nov 7, 2026

GetYourGuide tours & activities for Claude — search, details, options, and reviews

概览

AI 生成的概览

GetYourGuide 只读 MCP 服务器:让助手通过合作伙伴 API 搜索旅游与活动,查看选项、可订日期和评价。

可以做什么
  • 按自由文本、地点、类别或日期范围搜索旅游与活动,可排序并选择精简或完整视图
  • 读取单个旅游的完整记录、可预订选项和可订日期
  • 读取某个旅游的顾客评价
  • 列出活动类别以及某个类别下的旅游
  • 查询地点(城市、景点、地区)详情及该地点的可用旅游
  • 用健康检查工具验证凭据和上游接口连通性
适用场景
适合让助手协助规划出行:查找某城市的活动、比较价格与评分、确认某个旅游何时可订,或汇总评价。它只读取目录数据,不进行预订。
运行要求
以 stdio 方式在本地运行,通常通过 npx 启动 getyourguide-mcp 这个 npm 包,因此需要 Node.js。调用工具需要 GetYourGuide 合作伙伴 API 密钥,通过环境变量 GYG_API_KEY 提供并以 X-ACCESS-TOKEN 请求头发送,密钥来自免费的合作伙伴计划。可选变量可设置默认货币、语言、基础 URL 和请求超时。需要能访问 api.getyourguide.com。
安装前请注意
需要合作伙伴 API 密钥(GYG_API_KEY),应作为机密保管,不要写入共享配置。所有工具均为只读,不会预订或修改任何内容,但查询和搜索词会发送到 GetYourGuide 的 API。项目声明由 AI 开发和维护,需自行斟酌使用。合作伙伴等级限制可能导致部分接口返回 401/403,并存在速率限制。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Getyourguide Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

getyourguide-mcp

MCP server for GetYourGuide — search tours and activities, read tour details, bookable options, and reviews via the GetYourGuide Partner API.

🤖 This project was developed and is maintained by AI (Claude Code). Use at your own discretion.

Tools

All tools are read-only — this server registers no write tools.

ToolWhat it does
gyg_search_toursSearch tours/activities by free text, location, category, or date range; sortable; view
gyg_get_tourFull record for one tour by numeric ID; view
gyg_get_tour_optionsBookable options of a tour (ticket types, times), optionally within a date range; view
gyg_get_tour_availabilityBooking availability of a tour: participant categories, addons, available dates; view
gyg_get_tour_reviewsCustomer reviews for a tour; view
gyg_list_categoriesActivity categories (IDs feed gyg_search_tours / gyg_list_category_tours); view
gyg_list_category_toursTours in one category; view
gyg_get_locationDetails for a location (city, POI, region) by ID; view
gyg_list_location_toursTours available at one location; view
gyg_healthcheckVerify credentials and upstream reachability; reports failures as data, not exceptions

view — response shape

Every data tool takes view: "compact" | "full", and compact is the default. An efficiency that has to be asked for is one that usually is not, so it is not opt-in — the old compact: true flag on gyg_search_tours is gone.

  • compact — on the three tour LISTINGS it returns the documented slim projection (tour_id, title, abstract, url, price, overall_rating, number_of_ratings, durations, categories, locations), flattened to { _metadata, tours }. On gyg_get_tour — one record, no listing envelope to project — and on every other tool (options, availability, reviews, categories, location) — it instead strips image URLs and keeps everything else.
  • full — GetYourGuide's whole validated record, untouched.

Reach for full when you need a field the projection does not carry (picture variants, coordinates, marketing copy). Every response is minified JSON either way: formatting whitespace is dropped, whitespace inside a value is not.

Setup

You need a GetYourGuide Partner API key — join the (free) partner program at partner.getyourguide.com and copy the API key from your dashboard. The key is sent as the X-ACCESS-TOKEN header on every request.

Claude Code / any MCP host

json
{  "mcpServers": {    "getyourguide": {      "command": "npx",      "args": ["-y", "getyourguide-mcp"],      "env": {        "GYG_API_KEY": "your-partner-api-key"      }    }  }}

The server also boots with no key set (so hosts can probe tools/list at install time); the first tool call then returns an actionable error telling you which env var to set.

Environment variables

VariableRequiredMeaning
GYG_API_KEYyes (for tool calls)Partner API key, sent as X-ACCESS-TOKEN
GYG_CURRENCYnoDefault currency for prices (ISO 4217; falls back to USD — the API requires one); per-call currency args override
GYG_LANGUAGEnoDefault content language (falls back to en — the API requires one); per-call language args override
GYG_BASE_URLnoAPI base URL (default https://api.getyourguide.com/1)
GYG_REQUEST_TIMEOUT_MSnoPer-request timeout (default 30000)

For local development, put them in a .env next to the server (gitignored; see .env.example).

Behavior notes

  • Rate limits: one automatic retry on 429/503 honoring Retry-After (capped at 10s). If it still fails, the error tells you to back off.
  • Timeouts & network failures: a request that exceeds GYG_REQUEST_TIMEOUT_MS, or never reaches the API (DNS, refused, reset), comes back as a tool error naming the request path, with a hint to raise the timeout or check GYG_BASE_URL and your network. Cancelling a call is not wrapped — it stays a cancellation.
  • Empty arguments: an empty-string query param (e.g. currency: "" or language: "") is dropped rather than sent, so the env default / USD / en fallback applies instead of the API rejecting a blank value.
  • Auth errors: a 401/403 names both possible causes — a wrong key, or a key whose partner tier doesn't cover that endpoint.
  • API drift: responses are validated leniently. On an unexpected shape the server logs a precise warning to stderr and returns the raw response rather than breaking. See docs/GETYOURGUIDE-API.md — routes and request shapes are live-verified against the API and its official OpenAPI spec; real 200 bodies still need pinning from a keyed capture.
  • extraParams: gyg_search_tours and gyg_get_tour_options accept extraParams to pass raw query params the schema doesn't model. A key that collides with one of the tool's own arguments (limit, offset, currency, cnt_language, q, …) is ignored — the typed argument, or its default, always wins. (Before 2.1.6 extraParams overrode them.)
  • Secrets: upstream error bodies are redacted then truncated before they reach a tool result; the API key is never echoed.

Development

bash
npm installnpm run build          # tsc + esbuild bundle → dist/npm test               # tsc typecheck + vitest (no network — everything mocked)npm run test:coverage  # tsc typecheck + the CI gate: 100% lines/branches/functions/statements

Releases are automated with release-please; don't hand-bump versions. PR titles must be conventional commits (feat:, fix:, …) because the repo squash-merges.

License

MIT

来源:README.md,提交 1635bc6

工具

10

gyg_search_tours

Search GetYourGuide tours and activities. Filter by free text (or "iata:<code>" for airports), location ID, category ID, and date range; sort by popularity, price, or rating. Returns slim summaries by default; pass view:"full" for the whole records.

输入参数qviewlimitdateTooffsetcurrencydateFromlanguagesortFieldcategoryIdlocationIdextraParams另有 1 个

gyg_get_tour

Get the full GetYourGuide record for one tour/activity by its numeric ID. Image URLs are stripped by default; pass view:"full" to keep them.

输入参数viewtourId必填currencylanguage

gyg_get_tour_options

List the bookable options of a tour (ticket types, times, languages offered), optionally within a date range. Image URLs are stripped by default; pass view:"full" to keep them.

输入参数viewlimitdateTotourId必填currencydateFromlanguageextraParams

gyg_get_tour_availability

Get booking availability for a tour: bookable participant categories, addons, and the list of available dates (with participant ranges). Lighter than gyg_get_tour_options when you only need "when can I go". Image URLs are stripped by default; pass view:"full" to keep them.

输入参数viewtourId必填language

gyg_get_tour_reviews

List customer reviews for a tour (rating outline plus individual review items). Image URLs are stripped by default; pass view:"full" to keep them.

输入参数viewlimitoffsettourId必填currencylanguagesortFieldsortDirection

gyg_list_categories

List GetYourGuide activity categories (use the IDs to filter tour searches). Image URLs are stripped by default; pass view:"full" to keep them.

输入参数viewlimitoffsetlanguage

gyg_list_category_tours

List tours in one GetYourGuide category.

输入参数viewlimitoffsetcurrencylanguagecategoryId必填

gyg_get_location

Get details for a GetYourGuide location (city, POI, or region) by its numeric ID. Image URLs are stripped by default; pass view:"full" to keep them.

输入参数viewlanguagelocationId必填

gyg_list_location_tours

List tours available at one GetYourGuide location (city, POI, or region).

输入参数viewlimitoffsetcurrencylanguagelocationId必填

gyg_healthcheck

Verify credentials and upstream reachability

Resolves the credential the way real tools do, then makes one authenticated request to api.getyourguide.com. Reports which source supplied the credential, whether api.getyourguide.com accepted it, the round-trip time, and a plain-English hint distinguishing 'no credential' from 'credential rejected' from 'a api.getyourguide.com-side problem'. Read-only; never returns the credential itself. Call this when a real tool fails and you want to know which hop broke.

无需输入参数。

版本历史

12
  1. v2.2.0最新Nov 4, 2026
  2. v2.1.8Oct 17, 2026
  3. v2.1.7Oct 16, 2026
  4. v2.1.6Oct 10, 2026
  5. v2.1.5Oct 7, 2026
  6. v2.1.4Oct 5, 2026
  7. v2.1.3Oct 3, 2026
  8. v2.1.2Sep 25, 2026
  9. v2.1.1Sep 23, 2026
  10. v2.1.0Sep 20, 2026
  11. v2.0.0Sep 18, 2026
  12. v1.3.2Sep 16, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分