---
title: "List my MCP connections"
---

> 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.

# List my MCP connections

Path: Nicer API › Assistant

`GET /agent/mcp/connections`

URL: `https://api.nicer.travel/agent/mcp/connections`

Lists the AI clients the caller has connected to Nicer's MCP servers, newest first: the client's name and client id, the host it receives its codes at (`redirectHost`), the server it opens (`surface`), the most it may do (`access`), and when it was connected, last used and ends. Connections that have ended are left out. Never a token. Any signed-in person may call it, for their own connections, with their own session: a token minted from a connection gets 403 `ERROR_MCP_SESSION_REQUIRED`.

## Authentication

- `bearerAuth`, http bearer, header `Authorization`, format `JWT`

## Code samples

### JavaScript SDK

```javascript
import { createClient } from "@nicertravel/sdk";

const nicer = createClient({
  baseUrl: "https://api.nicer.travel",
  token: process.env.NICER_TOKEN,
});

await nicer.agent.mcp.connections.list();
```

### Nicer CLI

```bash
nicer agent mcp connections list
```

### cURL

```bash
curl --request GET \
  --url https://api.nicer.travel/agent/mcp/connections \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/agent/mcp/connections';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.nicer.travel/agent/mcp/connections"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "items": [
    {
      "connectionId": "string",
      "clientName": "string",
      "clientId": "string",
      "redirectHost": "string",
      "surface": "ADVISOR",
      "access": "READ",
      "createdAt": "2019-08-24T14:15:22Z",
      "lastUsedAt": "2019-08-24T14:15:22Z",
      "expiresAt": "2019-08-24T14:15:22Z"
    }
  ]
}
```

- `items` (`agent.mcp.connections.list.response.200.items`; array of object, required) — The connections that have not ended, newest first. A connection past its expiresAt is not listed.
  - `connectionId` (`agent.mcp.connections.list.response.200.items.connectionId`; string, required) — The connection's id: the hex of its tokens' bytes 16 to 24, 16 characters.
    - minLength: `1`
  - `clientName` (`agent.mcp.connections.list.response.200.items.clientName`; string, required) — The AI client's name as the client states it in its metadata (client_name); Nicer does not verify it. Its client id when it states none.
    - minLength: `1`
  - `clientId` (`agent.mcp.connections.list.response.200.items.clientId`; string, required) — The client's OAuth client_id: the HTTPS address of its client metadata document, or the id Nicer gave it when it registered.
    - minLength: `1`
  - `redirectHost` (`agent.mcp.connections.list.response.200.items.redirectHost`; string, required) — Where the client receives its code, as a person reads it: the host of its redirect URI, such as an assistant's website or 127.0.0.1. Redirect URIs are HTTPS or loopback HTTP only.
    - minLength: `1`
  - `surface` (`agent.mcp.connections.list.response.200.items.surface`; string, required) — Which MCP server the connection opens. ADVISOR is mcp.<env>/mcp, acting as the person in the agencies they belong to and never with staff rights. INTERNAL is mcp.<env>/internal, for Nicer staff only, in every agency.
    - one of `"ADVISOR"`, `"INTERNAL"`
  - `access` (`agent.mcp.connections.list.response.200.items.access`; string, required) — The most the connection may do, as the person picked it on the consent page. READ runs tools that change nothing; WRITE also runs tools that change records, make unpaid payment links and record the person's own bookkeeping; MONEY also runs tools that hold and book travel, cancel with refunds and change the agency's books. Most assistants ask you before each of these; Nicer does not ask again.
    - one of `"READ"`, `"WRITE"`, `"MONEY"`
  - `createdAt` (`agent.mcp.connections.list.response.200.items.createdAt`; string, required) — When the connection was made: when the client traded the code the person approved.
    - format: `date-time` · pattern: `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$`
  - `lastUsedAt` (`agent.mcp.connections.list.response.200.items.lastUsedAt`; any of, required) — When the connection last signed in to an MCP server; null if it never has.
    - any of the following: `string`, `null`
  - `expiresAt` (`agent.mcp.connections.list.response.200.items.expiresAt`; string, required) — When the connection ends unless the client refreshes it first: when its refresh token stops working. Each refresh moves it 30 days ahead, except that an INTERNAL connection ends 90 days after createdAt at most.
    - format: `date-time` · pattern: `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$`

### 400

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`agent.mcp.connections.list.response.400.errorCode`; string, required)
- `errorMessage` (`agent.mcp.connections.list.response.400.errorMessage`; string, required)

### 401

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`agent.mcp.connections.list.response.401.errorCode`; string, required)
- `errorMessage` (`agent.mcp.connections.list.response.401.errorMessage`; string, required)

### 403

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`agent.mcp.connections.list.response.403.errorCode`; string, required)
- `errorMessage` (`agent.mcp.connections.list.response.403.errorMessage`; string, required)


Source: https://docs.nicer.travel/api/Assistant/agent.mcp.connections.list/index.md
