> ## Documentation Index
> Fetch the complete documentation index at: https://developers.huechat.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP server

> Let an AI assistant work your account through the Model Context Protocol.

HueChat exposes an account-scoped MCP server over streamable HTTP:

```
https://app.huechat.ai/v2/mcp
```

## Getting a key

MCP uses its own, separately approved credential. As an account administrator,
open **Settings → Integrations → MCP**, request access for the account, wait
for approval, then copy the key when it is revealed. It is shown once.

<Note>
  A REST scoped key cannot be used for MCP, and an MCP key is rejected on the
  REST routes. The MCP key must carry `mcp:use` plus only the resource scopes
  the tools you enable actually need.
</Note>

The requester must remain an active administrator; demotion, removal, key
revocation or expiry disables the credential.

## Required headers

```http theme={null}
Authorization: Bearer <MCP key>
Content-Type: application/json
Accept: application/json, text/event-stream
MCP-Protocol-Version: 2025-11-25
```

## Handshake

<Steps>
  <Step title="Initialize">
    ```bash theme={null}
    curl -fsS https://app.huechat.ai/v2/mcp \
      -H "Authorization: Bearer $HUECHAT_MCP_KEY" \
      -H "Content-Type: application/json" \
      -H "Accept: application/json, text/event-stream" \
      -H "MCP-Protocol-Version: 2025-11-25" \
      --data '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"my-integration","version":"1.0.0"}}}'
    ```
  </Step>

  <Step title="Send the initialized notification">
    ```json theme={null}
    { "jsonrpc": "2.0", "method": "notifications/initialized", "params": {} }
    ```
  </Step>

  <Step title="List the tools your key may use">
    ```json theme={null}
    { "jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {} }
    ```

    The list is filtered by the key's scopes.
  </Step>

  <Step title="Call a read-only tool">
    ```json theme={null}
    { "jsonrpc": "2.0", "id": 3, "method": "tools/call",
      "params": { "name": "get_contacts", "arguments": { "query": "Example", "limit": 10 } } }
    ```
  </Step>
</Steps>

## Client configuration

Most MCP clients accept this shape:

```json theme={null}
{
  "mcpServers": {
    "huechat": {
      "type": "http",
      "url": "https://app.huechat.ai/v2/mcp",
      "headers": {
        "Authorization": "Bearer ${HUECHAT_MCP_KEY}",
        "MCP-Protocol-Version": "2025-11-25"
      }
    }
  }
}
```

<Warning>
  Write tools create or change customer data. Grant the smallest scope set and
  review what an assistant is allowed to do before connecting it.
</Warning>
