> For the complete documentation index, see [llms.txt](https://wingbits.gitbook.io/wingbits-ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wingbits.gitbook.io/wingbits-ai/build/mcp-integration.md). Agents can also search and read this documentation through its [MCP server](https://wingbits.gitbook.io/wingbits-ai/~gitbook/mcp).

# MCP integration

## MCP integration

Connect your own AI agent or client (Claude, Cursor, VS Code, …) to Wingbits data via the **Model Context Protocol (MCP)**. Your agent can query live and historical flights in natural language — with no data infrastructure to build. The connection is **read-only**: your agent reads Wingbits data, it never changes anything.

> For what this enables at a product level, see AI / MCP data access. Prefer to use Wingbits inside our own app instead? See the Wingbits AI Assistant.

### What you can do

Once connected, your agent can answer questions like:

* "What's flying within 50 nm of JFK above 10,000 ft?"
* "Which leasing-company X aircraft are currently grounded?"
* "Any emergency squawks (7500 / 7600 / 7700) over Scandinavia today?"

### Prerequisites

* An MCP-compatible client (Claude Desktop, Claude Code, Cursor, VS Code, Windsurf, …).
* A **Wingbits MCP API key** — see Access & authentication.

{% hint style="warning" %}
**MCP access is currently provisioned manually** and the MCP key is separate from a self-serve dashboard key. To get one, [request MCP access](mailto:hello@wingbits.com?subject=Wingbits%20MCP%20access) and we'll issue a key. (Self-serve issuance is coming.)
{% endhint %}

The server is available over two transports:

| Transport                     | Endpoint                           |
| ----------------------------- | ---------------------------------- |
| Streamable HTTP (recommended) | `POST https://mcp.wingbits.ai/mcp` |
| SSE (legacy clients)          | `GET https://mcp.wingbits.ai/sse`  |

Authentication for both transports: send your key in the **`X-API-Key`** header.

### Connect your client

For clients that support remote MCP servers, point them at the Streamable HTTP endpoint and pass your key as a header:

```json
{
  "mcpServers": {
    "wingbits": {
      "url": "https://mcp.wingbits.ai/mcp",
      "headers": { "X-API-Key": "YOUR_WINGBITS_API_KEY" }
    }
  }
}
```

Restart the client. **wingbits** should appear in its list of connected MCP servers, with the tools listed below.

#### Fallback: `mcp-remote`

If your client only supports stdio-based MCP servers, bridge to the remote endpoint:

```json
{
  "mcpServers": {
    "wingbits": {
      "command": "npx",
      "args": ["mcp-remote", "https://mcp.wingbits.ai/mcp", "--header", "X-API-Key:YOUR_WINGBITS_API_KEY"]
    }
  }
}
```

### Verify with curl

{% hint style="warning" %}
**Do the `initialize` handshake first.** The Streamable HTTP transport is **stateful** — you cannot call `tools/list` (or any tool) directly. Send an `initialize` request first, read the **`Mcp-Session-Id`** response header, and include that header on every subsequent request. Also send `Accept: application/json, text/event-stream` on **every** call. Calling `tools/list` with no session is the most common mistake, and the call will be rejected.
{% endhint %}

```bash
KEY="YOUR_WINGBITS_API_KEY"
URL="https://mcp.wingbits.ai/mcp"

# 1) Initialize and capture the session id from the response headers
SID=$(curl -sS -D - -o /dev/null -X POST "$URL" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -H "X-API-Key: $KEY" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"curl","version":"1.0"}}}' \
  | awk -F': ' 'tolower($1)=="mcp-session-id"{print $2}' | tr -d '\r')
echo "Session: $SID"

# 2) Tell the server initialization is complete
curl -sS -X POST "$URL" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -H "X-API-Key: $KEY" \
  -H "Mcp-Session-Id: $SID" \
  -d '{"jsonrpc":"2.0","method":"notifications/initialized"}'

# 3) List the available tools (now that the session exists)
curl -sS -X POST "$URL" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -H "X-API-Key: $KEY" \
  -H "Mcp-Session-Id: $SID" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'
```

A successful `initialize` returns HTTP 200 with an `Mcp-Session-Id` header; `tools/list` then returns the tool catalog below.

{% hint style="info" %}
Sessions are held in memory and reset if the server restarts. If a session stops working, re-run `initialize` for a fresh `Mcp-Session-Id`.
{% endhint %}

### Available tools

The Wingbits MCP exposes **17 read-only tools** — every tool only reads data.

**Aircraft & ownership**

| Tool                  | What it does                                                  |
| --------------------- | ------------------------------------------------------------- |
| `aircraft_finder`     | Find aircraft matching your criteria                          |
| `aircraft_identity`   | Resolve an aircraft's identity (registration, type, operator) |
| `operator_filter`     | Filter aircraft by operator                                   |
| `vip_aircraft_finder` | Find notable / VIP aircraft                                   |
| `military_lookup`     | Look up military aircraft                                     |

**Safety & anomaly signals**

| Tool                      | What it does                                                             |
| ------------------------- | ------------------------------------------------------------------------ |
| `acas_incidents_finder`   | Find ACAS / TCAS collision-avoidance incidents                           |
| `squawk_emissions_finder` | Find emergency squawks (7500 hijack, 7600 radio failure, 7700 emergency) |
| `gps_jamming_finder`      | Find GPS-jamming activity                                                |
| `gps_jamming_aircraft`    | Find aircraft affected by GPS jamming                                    |

**Schedules & geography**

| Tool              | What it does                              |
| ----------------- | ----------------------------------------- |
| `schedule_finder` | Look up flight schedules                  |
| `location_finder` | Resolve places, airports, and coordinates |

**Live ADS-B**

| Tool                            | What it does                                     |
| ------------------------------- | ------------------------------------------------ |
| `wingbits_api_realtime_flights` | Query real-time flights from the live ADS-B feed |

**Power tools**

| Tool                  | What it does                                         |
| --------------------- | ---------------------------------------------------- |
| `query_aviation_data` | Run a structured query across aviation data          |
| `get_schema`          | Fetch the data schema (use before composing a query) |
| `current_date_time`   | Get the current date/time for relative queries       |

The server also serves schema **resources** (`schema://adsb_sampled`, `schema://flight_trace`) and ready-made **prompt templates** (`acas_incidents`, `emergency_squawk`, `identify_aircraft`, `gps_jamming`).

### Troubleshooting

| Symptom                                                          | Cause                                           | Fix                                                                            |
| ---------------------------------------------------------------- | ----------------------------------------------- | ------------------------------------------------------------------------------ |
| `tools/list` or a tool call is rejected asking you to initialize | No session — you skipped `initialize`           | Run the `initialize` handshake first, then send `Mcp-Session-Id` on every call |
| `406 Not Acceptable`                                             | Missing `Accept` header                         | Always send `Accept: application/json, text/event-stream`                      |
| Session works, then breaks                                       | Server restarted; the in-memory session is gone | Re-run `initialize` for a fresh `Mcp-Session-Id`                               |
| `403 Forbidden` on another path                                  | Only `/mcp` and `/sse` are exposed              | Use the documented endpoints and check your `X-API-Key`                        |

### Next steps

* Want raw data instead? See the REST API quickstart and the Real-time stream (NATS).
* How we keep the data trustworthy: Data integrity & proof-of-location.
