Skip to main content
Glama
giata-drive-mcp

giata-drive-mcp

by ecakmak91
README.md
# giata-drive-mcp

An unofficial [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server for the GIATA Open Content Link API (also known as GIATA Drive). It gives AI assistants such as Claude, Cursor and ChatGPT read-only access to hotel master data: names, locations, star ratings, chains, room types, images, amenities and multilingual descriptions.

> **Unofficial project.** This server is not made, endorsed or supported by GIATA GmbH and has no affiliation with it. "GIATA" is used only to describe which API the server talks to. You need your own GIATA API key and a valid GIATA contract to use it.

> **Status: early (0.1.0).** The automated test suite uses mocks built from the public OpenAPI spec (`https://giatadrive.com/specs/openapi.json`). On 2026-11-28 all 11 tools were also run successfully against the live API with a real key (`scripts/live-smoke.mjs`, countries TR, DE and ES). Coverage of real data is still small; please open an issue if something does not match real responses.

## Contents

- [Features](#features)
- [Tools](#tools)
- [Quick start](#quick-start)
- [Configuration](#configuration)
- [Client setup](#client-setup)
- [Testing with MCP Inspector](#testing-with-mcp-inspector)
- [Docker](#docker)
- [Deploying on Coolify](#deploying-on-coolify)
- [Security](#security)
- [Limitations](#limitations)
- [Licensing: code vs. data](#licensing-code-vs-data)
- [Development](#development)

## Features

- 11 read-only tools built on the 5 GET endpoints of the Open Content Link API.
- Two transports: **stdio** for local clients and **Streamable HTTP** for remote clients. The HTTP transport is stateless.
- **Bring your own key (BYOK).** With stdio the key comes from `GIATA_API_KEY`. With HTTP each request sends its own key in the `X-Giata-Api-Key` header. You can opt in to a server-side key fallback.
- **Tenant isolation.** Caches, rate limiters and clients are scoped per API key, using a SHA-256 fingerprint of the key. Different keys never share cached data.
- **Compact output.** Summaries are short by default, with field selectors, locale selection, result limits, text truncation and a cap on total response size.
- **Untrusted-content handling.** Supplier text is stripped of HTML and control characters, truncated, and flagged `untrustedContent: true`. Only `http(s)` URLs are returned.
- **Defensive HTTP client.** Timeouts, retry with backoff, a client-side rate limit, a concurrency limit, `redirect: 'error'`, and requests locked to the configured GIATA origin.
- **Protected HTTP endpoint.** Bearer-token auth (`MCP_AUTH_TOKENS`), Host and Origin checks, a per-IP rate limit and a 1 MB request body limit. The server will not bind to a non-loopback address unless auth tokens are set.
- Every tool returns both JSON text and `structuredContent` that matches a declared `outputSchema`.

## Tools

All tools are annotated `readOnlyHint: true`, `destructiveHint: false`, `idempotentHint: true`, `openWorldHint: true`. Hotels are identified by numeric GIATA-IDs. `locale` is a language code such as `en`, `de` or `tr`. If you leave it out, `GIATA_DEFAULT_LOCALE` is used, falling back to English.

| Tool                    | What it does                                                                           | Key parameters (default / limit)                                                                                                                                                 |
| ----------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `list_hotels`           | GIATA-IDs in the catalogue, optionally for one country. IDs only, paginated.           | `countryCode?` (ISO alpha-2), `offset` (0), `limit` (100, max 1000)                                                                                                              |
| `get_hotel`             | Compact profile of one hotel                                                           | `giataId`, `locale?`, `fields?` (subset of `names`, `ratings`, `location`, `contact`, `counts`; default all except `names`)                                                      |
| `search_hotels`         | Filter hotels in one country by doing a bounded scan (see [Limitations](#limitations)) | `countryCode`, plus at least one of `name`, `city`, `minStars`, `maxStars`, `chain`, `amenities` (max 5); `locale?`, `cursor` (0), `maxScan` (40, max 100), `limit` (10, max 25) |
| `get_hotel_images`      | Image URLs, hero image first, with motif types                                         | `giataId`, `scope` (`all` / `property` / `rooms`, default `all`), `motifTypes?` (max 20 codes), `preferredWidth` (800, 50-4000), `offset` (0), `limit` (10, max 50)              |
| `get_room_types`        | Room types with type, category, view, code and image count                             | `giataId`, `locale?`, `includeAmenities` (false), `offset` (0), `limit` (30, max 100)                                                                                            |
| `get_hotel_amenities`   | Amenities ("facts") with readable labels, grouped by section                           | `giataId`, `locale?`, `section?` (substring filter), `limit` (150, max 500)                                                                                                      |
| `get_hotel_description` | Descriptive texts in a language, with fallback                                         | `giataId`, `locale?`, `maxChars` (3000, 200-20000)                                                                                                                               |
| `get_hotel_location`    | Address, city, destination, country and coordinates                                    | `giataId`, `locale?`                                                                                                                                                             |
| `list_hotel_group`      | GIATA-IDs in a named group configured for your account                                 | `group`, `countryCode?`, `offset` (0), `limit` (100, max 1000)                                                                                                                   |
| `compare_hotels`        | Side-by-side comparison of 2-5 hotels                                                  | `giataIds` (2-5), `locale?`, `includeAmenities` (true)                                                                                                                           |
| `get_updated_hotels`    | Incremental sync: hotels changed or deleted after a revision                           | `afterRevision` (0 = from the beginning), `countryCode?`, `offset` (0), `limit` (200, max 1000)                                                                                  |

### Examples

The prompts are what a user might type. The outputs are abridged examples of the `structuredContent` shape, not real GIATA data.

**`list_hotels`**: "List the first 5 GIATA-IDs for hotels in Turkey."

```json
{
  "total": 18234,
  "offset": 0,
  "limit": 5,
  "nextOffset": 5,
  "countryCode": "TR",
  "giataIds": [1273, 1301, 1422, 1587, 1610]
}
```

**`get_hotel`**: "Show me the basic profile of GIATA hotel 1273."

```json
{
  "giataId": 1273,
  "name": "Example Beach Resort",
  "city": "Antalya",
  "destination": "Antalya Region",
  "countryCode": "TR",
  "country": "Turkey",
  "stars": "5",
  "chains": ["Example Hotels"],
  "coordinates": { "latitude": 36.85, "longitude": 30.85, "accuracy": "address" },
  "source": "...",
  "ratings": [{ "value": "5", "isDefault": true }],
  "address": { "formatted": "...", "city": "Antalya" },
  "contact": { "phones": ["+90 ..."], "emails": ["info@example.com"], "websites": ["https://example.com/"] },
  "counts": { "roomTypes": 6, "images": 84, "amenities": 112, "descriptionLocales": ["de", "en", "tr"] }
}
```

**`search_hotels`**: "Find 5-star hotels in Antalya with a spa."

```json
{
  "countryCode": "TR",
  "totalInCountry": 18234,
  "scanned": 40,
  "scanStart": 0,
  "nextCursor": 40,
  "complete": false,
  "matches": [{ "giataId": 1273, "name": "Example Beach Resort", "city": "Antalya", "stars": "5" }],
  "note": "Partial scan: inspected hotels 0-40 of 18234. GIATA has no server-side search; call again with cursor=40 to continue."
}
```

**`get_hotel_images`**: "Give me up to 3 pool and beach photos of hotel 1273, about 1200 px wide."

```json
{
  "giataId": 1273,
  "total": 14,
  "offset": 0,
  "limit": 3,
  "nextOffset": 3,
  "images": [
    {
      "id": 9001,
      "url": "https://...",
      "width": 1200,
      "motifType": "P",
      "motif": "Outdoor Pool",
      "hero": true
    }
  ],
  "availableMotifTypes": { "A": 10, "P": 9, "S": 5, "W": 30 }
}
```

**`get_room_types`**: "What room types does hotel 1273 have?"

```json
{
  "giataId": 1273,
  "total": 6,
  "offset": 0,
  "limit": 30,
  "localeUsed": "en",
  "roomTypes": [
    {
      "variantId": "...",
      "name": "Deluxe Sea View",
      "type": "Double",
      "category": "Deluxe",
      "view": "Sea view",
      "imageCount": 7
    }
  ]
}
```

**`get_hotel_amenities`**: "Does hotel 1273 have Wi-Fi? Show the internet amenities in German."

```json
{
  "giataId": 1273,
  "localeUsed": "de",
  "total": 3,
  "returned": 3,
  "truncated": false,
  "sections": [
    { "section": "Internet", "amenities": [{ "id": "...", "label": "WLAN", "details": ["kostenlos"] }] }
  ]
}
```

**`get_hotel_description`**: "Summarise the Turkish description of hotel 1273."

```json
{
  "giataId": 1273,
  "localeUsed": "tr",
  "availableLocales": ["de", "en", "tr"],
  "lastUpdate": "2026-05-01T00:00:00.000Z",
  "truncated": false,
  "untrustedContent": true,
  "sections": [{ "title": "Konum", "text": "..." }]
}
```

**`get_hotel_location`**: "Where exactly is hotel 1273?"

```json
{
  "giataId": 1273,
  "name": "Example Beach Resort",
  "address": { "formatted": "...", "postalCode": "07000", "city": "Antalya" },
  "city": { "giataId": 55, "name": "Antalya" },
  "country": { "code": "TR", "name": "Turkey" },
  "coordinates": [{ "latitude": 36.85, "longitude": 30.85, "accuracy": "address" }]
}
```

**`list_hotel_group`**: "List the hotels in my group 'summer-2026' in Spain."

```json
{
  "total": 42,
  "offset": 0,
  "limit": 100,
  "group": "summer-2026",
  "countryCode": "ES",
  "giataIds": [2001, 2002]
}
```

**`compare_hotels`**: "Compare hotels 1273, 1301 and 1422."

```json
{
  "localeUsed": "en",
  "hotels": [
    {
      "giataId": 1273,
      "name": "...",
      "stars": "5",
      "roomTypeCount": 6,
      "imageCount": 84,
      "amenityCount": 112,
      "uniqueAmenities": ["Spa"]
    }
  ],
  "sharedAmenities": ["Outdoor pool", "Restaurant"],
  "distancesKm": [{ "from": 1273, "to": 1301, "km": 3.4 }]
}
```

**`get_updated_hotels`**: "Which German hotels changed since revision 1048576?"

```json
{
  "afterRevision": 1048576,
  "latestRevision": 1049012,
  "countryCode": "DE",
  "updatedTotal": 120,
  "deletedTotal": 2,
  "offset": 0,
  "limit": 200,
  "updatedGiataIds": [3001, 3002],
  "deletedGiataIds": [3999]
}
```

If a result is larger than `MCP_MAX_RESPONSE_CHARS`, the tool returns an error asking for a smaller `limit`, `maxChars` or `fields`, instead of returning a truncated result.

## Quick start

You need Node.js 22 or newer and a GIATA API key. Keys are generated in the GIATA console at <https://console.giatamedia.com>.

### With npx

```bash
GIATA_API_KEY=your-key npx -y giata-drive-mcp
```

This starts the stdio transport. Usually you do not run this yourself; your MCP client starts it (see [Client setup](#client-setup)). This only works once the package is published to npm. Until then, build from source.

To start the HTTP transport instead:

```bash
npx -y giata-drive-mcp --transport http --port 3000
# -> http://127.0.0.1:3000/mcp
```

CLI flags: `-t, --transport stdio|http`, `-p, --port <n>`, `--host <addr>`, `-h, --help`, `-v, --version`. Flags override the matching environment variables.

### From source

```bash
git clone <this repository>
cd giata-drive-mcp
pnpm install
pnpm build
GIATA_API_KEY=your-key node dist/cli.js            # stdio
MCP_TRANSPORT=http node dist/cli.js                # HTTP on 127.0.0.1:3000/mcp
pnpm dev                                           # run from TypeScript via tsx
```

## Configuration

All settings are environment variables. Empty values count as unset. See [.env.example](.env.example) for a template.

| Variable                      | Default                  | Meaning                                                                                                                                                                                                                                                                                                                     |
| ----------------------------- | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `GIATA_API_KEY`               | (unset)                  | Your GIATA API key. Required for stdio. In HTTP mode it is used only when `GIATA_ALLOW_SERVER_KEY=true`. `GIATA_DRIVE_API_KEY` is accepted as an alias.                                                                                                                                                                     |
| `GIATA_BASE_URL`              | `https://giatadrive.com` | API origin. Must be `https`; `http` is allowed only for localhost. Only the origin is used.                                                                                                                                                                                                                                 |
| `GIATA_TIMEOUT_MS`            | `15000`                  | Timeout per upstream request (1000-120000).                                                                                                                                                                                                                                                                                 |
| `GIATA_MAX_RETRIES`           | `2`                      | Retries for timeouts, network errors, 429 and 5xx (0-5). Uses exponential backoff and honours `Retry-After` up to 30 s.                                                                                                                                                                                                     |
| `GIATA_MAX_CONCURRENCY`       | `4`                      | Maximum parallel upstream requests per API key (1-16). This is also the batch size for `search_hotels`.                                                                                                                                                                                                                     |
| `GIATA_RATE_LIMIT_PER_SECOND` | `5`                      | Client-side token-bucket limit on upstream requests per API key (0.1-100). GIATA documents no rate limits, so this is a conservative guess.                                                                                                                                                                                 |
| `GIATA_CACHE_TTL_SECONDS`     | `300`                    | In-memory cache TTL (0-3600). `0` disables caching. Fact dictionaries are cached 12x longer.                                                                                                                                                                                                                                |
| `GIATA_CACHE_MAX_ENTRIES`     | `500`                    | Maximum cached hotel records per API key (10-100000). LRU eviction.                                                                                                                                                                                                                                                         |
| `GIATA_ALLOW_SERVER_KEY`      | `false`                  | HTTP only. If `true`, requests without `X-Giata-Api-Key` fall back to `GIATA_API_KEY`. Requires `GIATA_API_KEY`. Accepts `true/false/1/0/yes/no`.                                                                                                                                                                           |
| `GIATA_DEFAULT_LOCALE`        | `en`                     | Default language for names, labels and texts (`xx` or `xx-YY`).                                                                                                                                                                                                                                                             |
| `MCP_TRANSPORT`               | `stdio`                  | `stdio` or `http`.                                                                                                                                                                                                                                                                                                          |
| `MCP_HOST`                    | `127.0.0.1`              | HTTP bind address. Any non-loopback address requires `MCP_AUTH_TOKENS`.                                                                                                                                                                                                                                                     |
| `PORT`                        | `3000`                   | HTTP port.                                                                                                                                                                                                                                                                                                                  |
| `MCP_HTTP_PATH`               | `/mcp`                   | HTTP path of the MCP endpoint (`/` followed by letters, digits, `/`, `_` or `-`).                                                                                                                                                                                                                                           |
| `MCP_AUTH_TOKENS`             | (empty)                  | Comma-separated bearer tokens accepted on the HTTP endpoint, each at least 16 characters. Clients send `Authorization: Bearer <token>`.                                                                                                                                                                                     |
| `MCP_ALLOWED_HOSTS`           | (empty)                  | Comma-separated allowed `Host` header values (DNS-rebinding protection). An entry `host` matches any port; `host:port` matches exactly. If empty and bound to loopback, `localhost`, `127.0.0.1` and `[::1]` are allowed. If empty and bound to a non-loopback address, the Host check is disabled and a warning is logged. |
| `MCP_ALLOWED_ORIGINS`         | (empty)                  | Comma-separated allowed browser `Origin` values. A request that has an `Origin` header not in this list is rejected with 403. Requests without an `Origin` header (most non-browser clients) are not affected.                                                                                                              |
| `MCP_RATE_LIMIT_PER_MINUTE`   | `120`                    | Inbound HTTP requests per client IP per minute (fixed window).                                                                                                                                                                                                                                                              |
| `MCP_MAX_RESPONSE_CHARS`      | `25000`                  | Maximum size of a tool result in characters (2000-500000). Larger results become an error.                                                                                                                                                                                                                                  |
| `MCP_TRUST_PROXY`             | `false`                  | If `true`, the client IP for rate limiting is taken from the last (proxy-appended) entry of `X-Forwarded-For`. Enable it only behind a reverse proxy you control.                                                                                                                                                           |
| `LOG_LEVEL`                   | `info`                   | `debug`, `info`, `warn`, `error` or `silent`. Logs are JSON lines on stderr, with secrets redacted.                                                                                                                                                                                                                         |

HTTP endpoints:

- `POST <MCP_HTTP_PATH>` (default `/mcp`) is the MCP Streamable HTTP endpoint. It is stateless and returns JSON responses with no SSE stream and no sessions. `GET` and `DELETE` return 405.
- `GET /healthz` returns `{"status":"ok","name":"giata-drive-mcp","version":"..."}`. It needs no auth and is not affected by `MCP_HTTP_PATH`.

Request headers on the MCP endpoint:

- `Authorization: Bearer <token>` is required when `MCP_AUTH_TOKENS` is set.
- `X-Giata-Api-Key: <your GIATA key>` is the GIATA key for this request. It is optional only when `GIATA_ALLOW_SERVER_KEY=true`.

## Client setup

Ready-to-copy files are in [docs/clients/](docs/clients/).

### Claude Desktop

Edit `claude_desktop_config.json`. On macOS it is at `~/Library/Application Support/Claude/`; on Windows at `%APPDATA%\Claude\`.

```json
{
  "mcpServers": {
    "giata-drive": {
      "command": "npx",
      "args": ["-y", "giata-drive-mcp"],
      "env": { "GIATA_API_KEY": "your-giata-api-key" }
    }
  }
}
```

Restart Claude Desktop after editing.

### Claude Code

stdio (local process):

```bash
claude mcp add giata-drive -e GIATA_API_KEY=your-giata-api-key -- npx -y giata-drive-mcp
```

HTTP (a server you started with `MCP_TRANSPORT=http`):

```bash
claude mcp add --transport http giata-drive http://localhost:3000/mcp \
  --header "Authorization: Bearer your-mcp-auth-token" \
  --header "X-Giata-Api-Key: your-giata-api-key"
```

Leave out the `Authorization` header if the local server runs without `MCP_AUTH_TOKENS`.

### Cursor

`~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (per project). For stdio:

```json
{
  "mcpServers": {
    "giata-drive": {
      "command": "npx",
      "args": ["-y", "giata-drive-mcp"],
      "env": { "GIATA_API_KEY": "your-giata-api-key" }
    }
  }
}
```

For remote HTTP:

```json
{
  "mcpServers": {
    "giata-drive": {
      "url": "https://mcp.example.com/mcp",
      "headers": {
        "Authorization": "Bearer your-mcp-auth-token",
        "X-Giata-Api-Key": "your-giata-api-key"
      }
    }
  }
}
```

### ChatGPT

ChatGPT custom connectors (developer mode) need a **public HTTPS** remote MCP URL. Two things limit how this server can be used with them:

1. ChatGPT connectors cannot send custom headers, so they cannot send `X-Giata-Api-Key`. You must use **operator mode**: set `GIATA_ALLOW_SERVER_KEY=true` and put your own key in `GIATA_API_KEY` on the server. Every ChatGPT user of that connector then uses your GIATA key and your contract.
2. ChatGPT supports only OAuth or no authentication for connectors. **OAuth is not implemented in this server yet.** ChatGPT also cannot send a static `Authorization: Bearer` header, and this server refuses to listen on a public interface without `MCP_AUTH_TOKENS`.

A workable but weak setup:

- Run the server with `MCP_AUTH_TOKENS` set, and have a reverse proxy you control (nginx, Caddy, Traefik) add `Authorization: Bearer <token>` to requests it forwards to the server. The token then never leaves your infrastructure.
- Set `MCP_HTTP_PATH` to a long, random, unguessable path, for example `/mcp-3f9c2a7e5b1d4c8e9a0f6b2d7c4e1a95`. This path is the only "secret" ChatGPT holds, so treat it like a password. It is a **weak shared secret**: it can leak through logs, screenshots or shared connector settings, and it cannot be rotated per user.
- Restrict the proxy to the IP ranges ChatGPT connects from, if your provider publishes them, and set `MCP_RATE_LIMIT_PER_MINUTE` low.
- In ChatGPT, add the connector with the URL `https://your-domain/<secret-path>` and choose "No authentication".

Anyone who learns that URL can query GIATA with your key. If that risk is not acceptable, wait for OAuth support or use a client that can send headers.

### Generic remote HTTP client

Any MCP client that supports Streamable HTTP can connect:

- URL: `https://your-domain<MCP_HTTP_PATH>` (default path `/mcp`)
- Method: `POST`, with `Accept: application/json, text/event-stream` (standard MCP client behaviour)
- Headers: `Authorization: Bearer <token>` (if `MCP_AUTH_TOKENS` is set) and `X-Giata-Api-Key: <key>`

Example with curl:

```bash
curl -s http://localhost:3000/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -H 'Authorization: Bearer your-mcp-auth-token' \
  -H 'X-Giata-Api-Key: your-giata-api-key' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
```

## Testing with MCP Inspector

stdio:

```bash
pnpm build && pnpm inspector
```

`pnpm inspector` runs `npx @modelcontextprotocol/inspector node dist/cli.js`. Set `GIATA_API_KEY` in the Inspector's "Environment Variables" panel before connecting. You can also start it directly with the variable:

```bash
npx @modelcontextprotocol/inspector -e GIATA_API_KEY=your-key node dist/cli.js
```

HTTP:

```bash
pnpm build
MCP_TRANSPORT=http node dist/cli.js      # listens on http://127.0.0.1:3000/mcp
npx @modelcontextprotocol/inspector      # in another terminal
```

In the Inspector, choose transport "Streamable HTTP" and URL `http://localhost:3000/mcp`. Add the header `X-Giata-Api-Key`, and `Authorization: Bearer ...` if you set `MCP_AUTH_TOKENS`.

If the Inspector (or any browser page) connects **directly from the browser** instead of through its proxy, the browser sends an `Origin` header. Add that origin to `MCP_ALLOWED_ORIGINS`, for example `MCP_ALLOWED_ORIGINS=http://localhost:6274`. Otherwise the server returns 403 "Origin not allowed".

## Docker

The commands below assume the repository's `Dockerfile` and `docker-compose.yml`. Inside a container the server must bind `0.0.0.0`, so `MCP_AUTH_TOKENS` is required.

```bash
docker build -t giata-drive-mcp .

docker run --rm -p 3000:3000 \
  -e MCP_TRANSPORT=http \
  -e MCP_HOST=0.0.0.0 \
  -e MCP_AUTH_TOKENS=$(openssl rand -hex 24) \
  -e MCP_ALLOWED_HOSTS=localhost:3000 \
  giata-drive-mcp

curl http://localhost:3000/healthz
```

Clients then send their own `X-Giata-Api-Key`. For operator mode, also pass `-e GIATA_ALLOW_SERVER_KEY=true -e GIATA_API_KEY=...`.

With docker-compose, put your settings in a `.env` file (copy [.env.example](.env.example)) and run:

```bash
docker compose up -d --build
docker compose logs -f
```

## Deploying on Coolify

1. Create a new resource from your Git repository and choose the **Dockerfile** build pack.
2. Set the exposed port to **3000**.
3. Assign a domain, for example `https://mcp.example.com`. Coolify's proxy terminates TLS and forwards to the container.
4. Set environment variables:

   | Variable                                   | Value                                                                                                  |
   | ------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
   | `MCP_TRANSPORT`                            | `http`                                                                                                 |
   | `MCP_HOST`                                 | `0.0.0.0`                                                                                              |
   | `PORT`                                     | `3000`                                                                                                 |
   | `MCP_AUTH_TOKENS`                          | one or more random tokens, at least 16 characters each (for example `openssl rand -hex 24`). Required. |
   | `MCP_TRUST_PROXY`                          | `true` (so per-IP rate limiting sees the real client IP behind Coolify's proxy)                        |
   | `MCP_ALLOWED_HOSTS`                        | `mcp.example.com` (your domain exactly as it appears in the `Host` header)                             |
   | `GIATA_ALLOW_SERVER_KEY` / `GIATA_API_KEY` | only for operator mode; otherwise clients send `X-Giata-Api-Key`                                       |

   Mark `MCP_AUTH_TOKENS` and `GIATA_API_KEY` as secrets in Coolify.

5. Configure the health check: path `/healthz`, port `3000`.
6. Deploy, then check with `curl https://mcp.example.com/healthz` and connect a client to `https://mcp.example.com/mcp`.

## Security

Summary:

- Keys are never logged. Registered secrets and `Authorization` values are redacted from all log output, and logs go to stderr only.
- Caches and limits are separated per API key (SHA-256 fingerprint).
- The HTTP endpoint needs bearer tokens on any non-loopback bind and uses constant-time token comparison. It also checks Host and Origin and applies per-IP rate limits and body-size limits.
- No SSRF surface: the client only calls `/api/v1/...` paths on the configured origin, never follows URLs from responses, and refuses redirects.
- Supplier text is sanitised and flagged as untrusted.

See [SECURITY.md](SECURITY.md) for the threat model and how to report vulnerabilities.

## Limitations

- **No search endpoint upstream.** The API has no name, city, rating or geo search. The only filters are `countryCode` and named groups. `search_hotels` fetches the country directory, then loads hotel records one batch at a time (at most `maxScan`, which is ≤ 100, per call) and filters them in memory. It may return partial results with `complete: false` and a `nextCursor`. Scanning a whole large country takes many calls and many upstream requests.
- **No upstream pagination.** Directory endpoints return every URL in one response. `offset`/`limit` paging is done on the server side of this MCP server, after the full directory is fetched (and cached).
- **No prices, availability or booking.** The API does not offer them.
- **JSON only.** The API's XML format is not used.
- **In-memory cache only.** Nothing is shared across processes or kept across restarts. There is no Redis or database.
- **No OAuth.** Remote auth is static bearer tokens only.
- **No documented rate limits** from GIATA. Client-side defaults are guesses.
- **Invalid keys look like server errors.** Observed on 2026-11-28: GIATA returns HTTP 401 when no key is sent, but an HTML HTTP 500 page for an invalid key. The server retries 5xx (it cannot tell the two apart) and then reports a server error with a hint to check the key.
- **Limited live verification.** Smoke-tested against the live API (TR/DE/ES, 2026-11-28) on a handful of hotels per country; not every field combination has been seen in real data.
- **Locale formats differ upstream.** Fact/amenity locales use underscores (`en_US`, `pt_BR`, `zh_Hant`), description texts use hyphens (`en-US`, `pt-BR`). Tools accept either form.
- **JSON-RPC batches are rejected** on the HTTP transport (one message per POST), so the per-IP rate limit cannot be multiplied.
- **Client disconnects do not cancel upstream work.** A started `search_hotels` scan finishes its current batch even if the client goes away; per-key queues are capped (200 waiting requests) and fail fast with a rate-limit error.

## Live smoke test (optional)

With a real key in `.env` (`GIATA_API_KEY=...` or `GIATA_DRIVE_API_KEY=...`):

```bash
pnpm build
pnpm smoke:live        # defaults to TR; pass a country: pnpm smoke:live -- DE
```

It starts the built server over stdio, calls every tool once on a few hotels (roughly 20 upstream requests) and prints a pass/fail line per tool. The key is never printed. It is not part of CI.

## Licensing: code vs. data

- **Code:** this repository is licensed under the [MIT License](LICENSE).
- **Data:** hotel content returned by the GIATA API (texts, images, amenities and so on) is **not** covered by the MIT license. Your own contract with GIATA governs it. No public data-licence terms are available, and the legal pages on giatadrive.com require a login.
- The server does not persist, bulk-download or index GIATA content. Data is held only in a short-lived in-memory cache, scoped to each API key.
- You are responsible for making sure your use, including showing content to AI models and end users, complies with your GIATA agreement.

## Development

```bash
pnpm install
pnpm lint          # ESLint
pnpm typecheck     # tsc --noEmit
pnpm test          # Vitest
pnpm build         # compile to dist/
pnpm format        # Prettier
```

See [CONTRIBUTING.md](CONTRIBUTING.md) and [ARCHITECTURE.md](ARCHITECTURE.md).

TDQS

A4/5.0

Scored across 11 tools

Disambiguation4/5

The three discovery tools (list_hotels, search_hotels, list_hotel_group) could look similar, but each description explicitly states when to use it and points to the alternatives. The main residual overlap is that get_hotel's profile already includes address/coordinates/content counts that get_hotel_location and the dedicated sub-resource tools return, though the split (compact summary vs. full payload) is clearly explained.

Naming Consistency5/5

All 11 tools follow a clean snake_case verb_noun pattern: list_*, get_*, search_*, compare_*. The get_hotel_* family is systematic and predictable, and the two outliers (compare_hotels, get_updated_hotels) still fit the same convention.

Tool Count5/5

Eleven tools is well within the sweet spot for a read-only hotel content catalogue. Every tool maps to a distinct content facet (images, rooms, amenities, descriptions, location, groups, diff sync) rather than being redundant.

Completeness5/5

For a read-only content API the surface is essentially complete: enumerate, search, profile, and per-facet retrieval (images, rooms, amenities, descriptions, geo), plus grouping, comparison and incremental change sync. No write operations are needed since the source is supplier content, so there are no obvious dead ends.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues