> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.etera.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.etera.dev/_mcp/server.

# MCP Integration

## Overview

ETERA implements the **Model Context Protocol (MCP)** across all four verticals, providing a standardized interface for AI models to discover and execute travel operations.

#### [Restaurant MCP](/restaurant)

Dining search, reservations, restaurant data

#### [Experience MCP](/experience)

Activity search, bookings, experience data

#### [Hotel MCP](/hotels)

Hotel search, room booking, property data

#### [Flight MCP](/flights)

Flight search, pricing, airline data

> **Info**
>
> The Restaurant Booking service also exposes MCP endpoints directly at `/restaurant/booking/mcp/*`, aggregating booking-specific tools.

---

## Core Endpoints

Every MCP service exposes the same set of endpoints:

| Method | Endpoint              | Description                           |
| ------ | --------------------- | ------------------------------------- |
| `GET`  | `/mcp/tools`          | List all available tools with schemas |
| `GET`  | `/mcp/tools/{tool}`   | Get details for a specific tool       |
| `POST` | `/mcp/execute/{tool}` | Execute a tool with parameters        |
| `GET`  | `/mcp/services`       | List registered backend services      |
| `GET`  | `/mcp/health`         | MCP aggregator health status          |
| `POST` | `/mcp/refresh`        | Refresh the tool cache                |

---

## How It Works

#### Discover available tools

List all tools for a vertical to see what operations are available:

**`cURL`**

```bash title="cURL"
curl "https://api.etera.dev/restaurant/mcp/mcp/tools" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

**`TypeScript`**

```typescript title="TypeScript"
const tools = await fetch(
  "https://api.etera.dev/restaurant/mcp/mcp/tools",
  { headers: { Authorization: `Bearer ${token}` } }
).then((r) => r.json());

// Each tool includes: name, description, inputSchema
for (const tool of tools) {
  console.log(tool.name, tool.description);
}
```

#### Get tool details

Inspect a specific tool's input schema to understand its parameters:

```bash
curl "https://api.etera.dev/hotel/mcp/mcp/tools/search_hotels" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

The response includes the tool's `inputSchema` (JSON Schema) describing all required and optional parameters.

#### Execute a tool

Call the tool with the required parameters:

**`cURL`**

```bash title="cURL"
curl -X POST "https://api.etera.dev/restaurant/mcp/mcp/execute/search_restaurants" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "Italian restaurants in Dubai",
    "limit": 5
  }'
```

**`TypeScript`**

```typescript title="TypeScript"
const result = await fetch(
  "https://api.etera.dev/restaurant/mcp/mcp/execute/search_restaurants",
  {
    method: "POST",
    headers: {
      Authorization: `Bearer ${token}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      query: "Italian restaurants in Dubai",
      limit: 5,
    }),
  }
).then((r) => r.json());
```

---

## Advanced Operations

#### Service Registry

Check which backend services are registered with an MCP aggregator:

```bash
curl "https://api.etera.dev/experience/mcp/mcp/services" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

#### Cache Management

MCP aggregators cache tool definitions from their backend services. Force a refresh if tools have been updated:

```bash
curl -X POST "https://api.etera.dev/flight/mcp/mcp/refresh" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

#### Health Monitoring

Check the health of any MCP aggregator:

```bash
curl "https://api.etera.dev/restaurant/mcp/mcp/health"
```

---

## Architecture

Each MCP service acts as an **aggregator** that discovers tools from related microservices, caches schemas for fast lookup, and routes execution calls to the appropriate backend.

```
AI Model → MCP Aggregator → Backend Services
                ├── Search Service
                ├── Booking Service
                └── Data Service
```

> **Info**
>
> The aggregator pattern means you only need to integrate with one MCP endpoint per vertical, rather than connecting to each backend service individually.

---

## AI Supervisor

For cross-vertical AI coordination, use the **AI Supervisor** at `/ai/input`. It automatically detects intent and routes to the appropriate vertical's agents.

**`cURL`**

```bash title="cURL"
curl -X POST "https://api.etera.dev/ai/input" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "inputType": "text",
    "text": "Find me a hotel in Dubai near the beach"
  }'
```

**`TypeScript`**

```typescript title="TypeScript"
const conversation = await fetch("https://api.etera.dev/ai/input", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${token}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    inputType: "text",
    text: "Find me a hotel in Dubai near the beach",
  }),
}).then((r) => r.json());
```

## Next Steps

#### [Restaurant MCP](/restaurant)

Full MCP API reference for restaurants

#### [AI Supervisor](/platform)

Cross-vertical AI coordination API

#### [Authentication](/guides/authentication)

Get your JWT token