# Bed-and-Breakfast.it MCP Server

## Server Description

This MCP server integrates [Bed-and-Breakfast.it](https://www.bed-and-breakfast.it) — Italy's leading platform for non-hotel accommodations — with AI assistants. It allows users to search for available properties (B&Bs, apartments, villas, farm stays, and more) directly from their Claude conversation, with results including ratings, prices, and booking links.

---

## Features

- **Property search** — Find available accommodations by destination, dates, number of guests, and rooms across thousands of listings on Bed-and-Breakfast.it.
- **Family-friendly search** — Specify children's ages to surface suitable properties.
- **Multilingual results** — Results available in Italian, English, French, German, and Spanish.
- **Direct booking links** — Each result includes a link to complete the booking on Bed-and-Breakfast.it.
- **Read-only, safe** — The server never modifies data and operates exclusively on the Bed-and-Breakfast.it catalogue.

---

## Setup Instructions

1. In Claude, go to **Settings → Integrations → Add MCP Server**.
2. Enter the server URL:
   ```
   https://tools.bed-and-breakfast.it/mcp
   ```
3. Confirm the connection. The tool `search_properties` will be immediately available in your conversations.

No account or API key is required to use this server.

---

## Authentication

This server does not require authentication. It is publicly accessible and ready to use after adding the server URL in Claude settings.

---

## Tools

### Public tools — exposed on `/mcp`

#### `search_properties`

Searches Bed-and-Breakfast.it for available accommodations and renders an in-chat carousel widget (up to 8 results). Use when the user wants to see properties directly inside the conversation.

### Internal-only tools — exposed on `/mcp-internal`

These tools are **not** available to the public MCP integration in ChatGPT/Claude. They are reachable only by the internal MCP orchestrator that authenticates against `/mcp-internal` with a bearer token.

#### `build_search_url`

Resolves a free-text Italian location string (city, hamlet, region, address, or POI) to a deep-link URL on the Bed-and-Breakfast.it search pages, with stay parameters (check-in / check-out / guests / rooms) pre-filled in the querystring. No widget — the response is plain text plus structured content.

Behavior:

- **0 matches** → returns an error with code `NO_MATCH`.
- **1 match** → returns a single deep-link URL.
- **>1 matches** → returns the list of alternatives so the orchestrator can ask the user to pick one.

Example URL produced:

```
https://www.bed-and-breakfast.it/it/firenze?utm_source=chatgpt&checkin=2026-05-12&checkout=2026-05-13&ospiti=2&rooms=1
```

---

## Internal endpoint setup (`/mcp-internal`)

The internal endpoint is mounted only when the `INTERNAL_MCP_TOKEN` environment variable is set on the running task. If unset, the endpoint is disabled (fail-closed) and a warning is logged at startup.

**Required:**
- `INTERNAL_MCP_TOKEN` — long, random secret shared with the internal MCP orchestrator. Inject as an ECS task secret (Secrets Manager / SSM Parameter Store), never in plain task definition.

**Recommended (defense in depth):**
- Restrict inbound traffic to the internal orchestrator's source (security group / IP allowlist) at the AWS network layer. Bearer token alone is enough, but layered controls are preferred.

**Calling convention:**

```http
POST /mcp-internal HTTP/1.1
Host: tools.bed-and-breakfast.it
Authorization: Bearer <INTERNAL_MCP_TOKEN>
Content-Type: application/json

<JSON-RPC body, e.g. tools/list or tools/call>
```

CORS is disabled on `/mcp-internal` (no browser preflight allowed). The endpoint is intended for server-to-server calls only.

---

## Usage Examples

### Example 1 — Weekend getaway in Rome

**User prompt:**
> Find a B&B in Rome for this weekend for 2 adults.

**What the server does:**
Searches Bed-and-Breakfast.it for available properties in Rome with the nearest available dates for a 2-night stay.

**Expected output:**
A list of up to 8 properties in Rome with name, property type, star rating, price per night, and a direct booking link.

---

### Example 2 — Family holiday with children

**User prompt:**
> I'm looking for a family-friendly accommodation in Rimini from August 10 to 17 for 2 adults and 2 children aged 6 and 9. We need 2 rooms.

**What the server does:**
Calls `search_properties` with `place: "Rimini"`, the specified dates, `adults: 2`, `children: [6, 9]`, and `rooms: 2`.

**Expected output:**
Properties in Rimini suitable for families with availability for the requested period, showing price for the full stay and booking options.

---

### Example 3 — Romantic stay in Florence (English)

**User prompt:**
> We'd like a romantic stay in Florence for our anniversary, arriving March 15 and leaving March 18.

**What the server does:**
Searches for properties in Florence for 2 adults across 3 nights, returning results in English.

**Expected output:**
Boutique B&Bs and charming apartments in Florence with descriptions, ratings, and pricing in English.

---

### Example 4 — Last-minute solo trip to Milan

**User prompt:**
> I need somewhere to sleep tonight in Milan, just for me.

**What the server does:**
Searches with `place: "Milano"` and `adults: 1`, automatically defaulting check-in to today and check-out to tomorrow.

**Expected output:**
Available properties in Milan for a single guest, filterable by price and rating.

---

### Example 5 — Lake Garda search in German

**User prompt:**
> Ich suche eine Unterkunft am Gardasee vom 1. bis 7. Juli für 2 Erwachsene.

**What the server does:**
Searches for properties near Lago di Garda with `locale: "de"`, returning all results and descriptions in German.

**Expected output:**
Available accommodations around Lake Garda with German-language descriptions, ratings, and booking links.

---

## Privacy Policy

[https://www.bed-and-breakfast.it/privacy.cfm?locale=en](https://www.bed-and-breakfast.it/privacy.cfm?locale=en)

---

## Support

For questions and issue reports, contact: **dev@bed-and-breakfast.it**
