---
title: "MCP server"
description: "Connect an MCP client to Nicer with an API key and a bearer authorization header."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.nicer.travel/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP server

Nicer runs an [MCP](https://modelcontextprotocol.io) server, so an AI client can
work in Nicer as you: read your chats and trips, plan an itinerary, search live
inventory and prepare a payment link.

A tool call carries your identity and your role in one company, so it can do
what you can do in the portal and nothing more, and the tools you see are the
ones your role may use.

Connect to the Nicer MCP server at `https://mcp.nicer.travel/mcp`.

The transport is Streamable HTTP, one JSON-RPC request per `POST` with no
session to keep. Every protocol revision from 2025-03-26 to 2026-07-28 works:
a client that opens with `initialize` and one that sends each request on its
own are both answered.

## Get an API key

In the portal, open **Profile → AI assistants (MCP)**, name the key after where
you will use it ("Cursor on my laptop") and choose **Create API key**. The key
starts with `nicer_` and is shown once: copy it then, or create another.

The key works as you in every company you belong to, until you revoke it from
the same place. Treat it like a password. A person holds up to 10 keys; a
revoked key stops working within 15 minutes.

## Connect

Send the key as `Authorization: Bearer <key>`. The portal copies each of these
with your key already in place.

**Claude Code**

```bash
claude mcp add --transport http nicer https://mcp.nicer.travel/mcp \
  --header "Authorization: Bearer nicer_..."
```

**Codex** (`~/.codex/config.toml`)

```toml
[mcp_servers.nicer]
url = "https://mcp.nicer.travel/mcp"
http_headers = { Authorization = "Bearer nicer_..." }
```

**Cursor** (`~/.cursor/mcp.json`), **VS Code**, **Gemini CLI** and **Windsurf**
take the same URL and header in their MCP settings:

```json
{
  "mcpServers": {
    "nicer": {
      "url": "https://mcp.nicer.travel/mcp",
      "headers": { "Authorization": "Bearer nicer_..." }
    }
  }
}
```

Use a client that supports an authorization header for a remote MCP server.

There is no sign-in page. A missing, revoked or mistyped key is answered with a
JSON-RPC error that says so, never with a login prompt.

## Companies

Every tool takes an optional `companyName`. Without it, a call acts for your
current company in the portal; with it, for that company, if you belong to it.
`listMyCompanies` lists yours and your role in each. Each call runs with a
token scoped to that one company and the role you have there.

## Tools

The tools are the operations advisors use most in Nicer:

| Area | Tools |
| --- | --- |
| Companies | `listMyCompanies` |
| Chats | `listChats`, `getChat`, `replyToChat` |
| Trips | `listTravelersTrips`, `getTravelersTrip`, `createTravelersTrip`, `updateTravelersTrip` |
| Itineraries | `listItinerary`, `segmentOp`, `addOfferToTrip`, `sendItinerary` |
| Travelers | `searchTravelers`, `getTraveler` |
| Notes and tasks | `listNotes`, `createNote`, `updateNote`, `listTasks`, `createTask`, `updateTask` |
| Orders and money | `listOrders`, `getOrderStatus`, `prepareCheckout`, `listEarnings`, `getBalances` |
| Commissions | `commissionOverview`, `listCommissionItems`, `exportCommissions`, `getCommissionExport` |
| Search and inventory | `searchPlaces`, `searchHotels`, `getHotelRooms`, `searchFlights`, `searchCarRentals`, `lookupFlight`, `searchCarriers`, `searchActivityDestinations`, `searchActivities` |
| Knowledge | `searchKnowledge`, `readSkill` |

Travelers see the tools for their own trips and orders. Read-only tools are marked
`readOnlyHint`, so a client may run them without asking; `replyToChat` and
`sendItinerary` reach travelers at once and are marked as such. Agency admins
(and staff) see `commissionOverview`, everything about an agency's commission
tracking in one call.

A tool that creates something (`createTravelersTrip`, `createNote`,
`createTask` and the rest) sends the API an `Idempotency-Key` derived from your
API key and the call, so the same call sent again creates nothing new.

Results come back as compact JSON text: empty fields are left out, and long
lists keep their first rows with a `more` count. When the API refuses a call,
the result is a tool execution error (`isError: true`) carrying the API's
`errorCode`, so an agent can read why and adjust.

Live-inventory tools accept a `waitMs` of at most 20 seconds; repeat the same
call to pick up availability that was still arriving. A call runs within the
API's 28-second window; an operation that takes longer answers with a tool
error you can retry.

Source: https://docs.nicer.travel/developers/mcp/index.mdx
