# Quickstart

Connect the MCP server in your assistant, then get a free API key and make a first REST API call.

Source: https://flightqueue.com/docs/quickstart

## Before you start

| What | Value |
| --- | --- |
| MCP server URL | `https://mcp.flightqueue.com/mcp` |
| Transport | Streamable HTTP |
| Authentication | OAuth 2.1, required from the first request. There is no anonymous access. |
| Account | A free Flight Queue account is enough. You sign in in your browser when the client asks. |

> **Note:** The MCP server does not take an API key or a header. Clients that support remote MCP servers handle the OAuth sign-in for you.

## Connect the MCP server

### Grok Bot

#### 1. Open Connect apps

In Grok Bot, go to **Connect apps**.

#### 2. Add a custom connector

Choose **Add a custom connector** at the bottom. Set the name to `Flight Queue`, the type to **Remote HTTPS**, and leave Client ID empty.

**Server URL**

```text
https://mcp.flightqueue.com/mcp
```

#### 3. Authorize

Click **Add plugin**, then **Authorize** and sign in to Flight Queue. Type `@Flight Queue` in a chat to use it.

### ChatGPT

#### 1. Add a custom connector

Open the connector settings in ChatGPT and choose to add a custom connector. Paste the server URL.

**Server URL**

```text
https://mcp.flightqueue.com/mcp
```

#### 2. Sign in

Sign in to Flight Queue when the browser asks. The tools then appear in the chat.

#### 3. Ask a question

Try “How long is the security line at ATL right now?”.

### Claude

#### 1. Open Connectors

In claude.ai, go to **Settings**, then **Connectors**, and click **Add connector**.

#### 2. Paste the URL

**Server URL**

```text
https://mcp.flightqueue.com/mcp
```

#### 3. Connect

Click **Connect**. OAuth takes you to Flight Queue to sign in.

### Claude Code

#### 1. Add the server

**Terminal**

```bash
claude mcp add --transport http flightqueue https://mcp.flightqueue.com/mcp
```

#### 2. Authenticate

Sign in through the browser when prompted.

#### 3. Or install the plugin

The plugin adds the server and a setup skill. Run the commands one at a time.

**Claude Code**

```text
/plugin marketplace add Flight-Queue/mcp
/plugin install flightqueue@flightqueue
/flightqueue:setup
```

### Cursor

#### 1. Install

Open [this link to install in Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=flightqueue&config=eyJ1cmwiOiJodHRwczovL21jcC5mbGlnaHRxdWV1ZS5jb20vbWNwIn0%3D) and click **Install**. Or add the JSON to `~/.cursor/mcp.json`, or `.cursor/mcp.json` in a project.

**mcp.json**

```json
{
  "mcpServers": {
    "flightqueue": {
      "url": "https://mcp.flightqueue.com/mcp"
    }
  }
}
```

#### 2. Log in

Click **Needs login** next to `flightqueue` and sign in to Flight Queue in your browser.

### Grok

#### 1. Open connectors

Go to [grok.com/connectors](https://grok.com/connectors), click **New Connector**, then **Custom**.

#### 2. Paste the URL and sign in

**Server URL**

```text
https://mcp.flightqueue.com/mcp
```

#### 3. Grok Business and Enterprise

An admin adds it first in console.x.ai under Grok Business, Connectors, Add Connector, Other.

### Other MCP clients

Any client that supports remote MCP servers over streamable HTTP with OAuth works. Give it the server URL, or this config if it uses an `mcpServers` file.

**mcp.json**

```json
{
  "mcpServers": {
    "flightqueue": {
      "url": "https://mcp.flightqueue.com/mcp"
    }
  }
}
```

Clients register themselves with dynamic client registration and use PKCE. The details are on [Connect over MCP](https://flightqueue.com/docs/mcp.md#authentication).

## Try it

Once connected, ask in plain language. The assistant picks the tool.

**Example prompt**

```text
How long is the TSA line at DFW right now, and is there an FAA delay?
```

Every tool and an example prompt for each are in the [MCP tools reference](https://flightqueue.com/docs/mcp/tools.md).

## Get an API key

The REST API takes an API key. A free agent key needs no browser, card or email, and one request creates it.

#### 1. Register

```bash
curl -X POST https://flightqueue.com/api/agent/register \
  -H "Content-Type: application/json" \
  -d '{"agent_name":"my-agent"}'
```

**Response (shortened)**

```json
{
  "success": true,
  "agent_id": "0b1f3c0e-6f4e-4f55-9d0c-2a7c1e8b9a10",
  "api_key": "fqagent_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "tier": "free",
  "message": "Save this key now — it is not shown again. Use it as a Bearer token with the REST API or the @flightqueue/cli."
}
```

#### 2. Save the key

The key is shown once. Keep it in an environment variable.

```bash
export FLIGHTQUEUE_API_KEY=fqagent_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
```

> **Warning:** Agent keys are free and for personal, non-commercial use. They reach the free endpoints at 30 requests per minute. Pro and Enterprise plans issue developer keys; see [plans and limits](https://flightqueue.com/docs/plans.md).

## Make your first API call

Ask for FAA delays at JFK. The `Authorization: Bearer` header carries the key.

**curl**

```bash
curl "https://flightqueue.com/api/v1/airports/JFK/delays" \
  -H "Authorization: Bearer $FLIGHTQUEUE_API_KEY"
```

**JavaScript**

```javascript
const response = await fetch("https://flightqueue.com/api/v1/airports/JFK/delays", {
  headers: {
    Authorization: `Bearer ${process.env.FLIGHTQUEUE_API_KEY}`,
  },
});
if (!response.ok) throw new Error(`Flight Queue API ${response.status}`);
const { data } = await response.json();
console.log(data);
```

**Python**

```python
import os
import requests

response = requests.get(
    "https://flightqueue.com/api/v1/airports/JFK/delays",
    headers={"Authorization": f"Bearer {os.environ['FLIGHTQUEUE_API_KEY']}"},
    timeout=10,
)
response.raise_for_status()
print(response.json()["data"])
```

The response has `success`, `data` and `meta`. Check your key, tier and usage at any time:

```bash
curl https://flightqueue.com/api/agent/me \
  -H "Authorization: Bearer $FLIGHTQUEUE_API_KEY"
```

Wait times, predictions and history need a paid plan and return `PREMIUM_REQUIRED` on a free key. The CLI wraps the same API: `npx @flightqueue/cli register --name my-agent`. Next: [REST API](https://flightqueue.com/docs/api.md) and the [endpoint reference](https://flightqueue.com/docs/api/endpoints.md).
