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

# Connect an MCP client

> Connect Claude Code, Cursor or VS Code to the Brilo MCP server with an API key so your AI tool can read your Brilo agents and calls.

Connecting an MCP client to Brilo lets Claude Code, Cursor or VS Code read your agents and call
history. It takes about five minutes: create an API key in your Brilo dashboard, add the Brilo
MCP server to your client with that key, then ask a question to check it works.

## Before you start

* A Brilo API key, or permission to create one in **Settings**, then **API Keys**. See
  [Workspace settings](/account/workspace-settings).
* An MCP client that can send a request header: Claude Code, Cursor or VS Code.
* The server address: `https://api.brilo.ai/mcp`.

## Steps

<Steps>
  <Step title="Create an API key">
    In your Brilo dashboard, open **Settings**, then **API Keys**, and create a key. Copy it
    somewhere safe: anyone with the key can read this workspace's agents and calls.
  </Step>

  <Step title="Add the Brilo MCP server to your client">
    Pick your client and replace `YOUR_API_KEY` with the key you copied.

    <Tabs>
      <Tab title="Claude Code">
        Run this in your terminal:

        ```bash theme={null}
        claude mcp add --transport http brilo https://api.brilo.ai/mcp --header "Authorization: Bearer YOUR_API_KEY"
        ```
      </Tab>

      <Tab title="Cursor">
        Add this to `~/.cursor/mcp.json`, or to `.cursor/mcp.json` in one project:

        ```json theme={null}
        {
          "mcpServers": {
            "brilo": {
              "url": "https://api.brilo.ai/mcp",
              "headers": { "Authorization": "Bearer YOUR_API_KEY" }
            }
          }
        }
        ```
      </Tab>

      <Tab title="VS Code">
        Add this to `.vscode/mcp.json` in your project:

        ```json theme={null}
        {
          "servers": {
            "brilo": {
              "type": "http",
              "url": "https://api.brilo.ai/mcp",
              "headers": { "Authorization": "Bearer YOUR_API_KEY" }
            }
          }
        }
        ```
      </Tab>

      <Tab title="Your own agent">
        Point your MCP client library at `https://api.brilo.ai/mcp` with the Streamable HTTP
        transport, and send `Authorization: Bearer YOUR_API_KEY` on every request. To check the
        key by hand:

        ```bash theme={null}
        curl -X POST https://api.brilo.ai/mcp \
          -H "Authorization: Bearer YOUR_API_KEY" \
          -H "Content-Type: application/json" \
          -H "Accept: application/json, text/event-stream" \
          -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
        ```
      </Tab>
    </Tabs>
  </Step>

  <Step title="Ask your client a question">
    Ask something like "list my Brilo agents". The first time, your client may ask you to allow
    the Brilo tools.
  </Step>
</Steps>

## You will know it worked when

* Your client lists the Brilo tools, such as `list_agents` and `list_calls`.
* Asking "list my Brilo agents" returns the agents you see in your dashboard.

## What else you can do here

* [See every MCP tool](/api-reference/mcp/tools) with its parameters and an example request
* [Learn what is withheld](/api-reference/mcp/overview#what-is-withheld) from call content
* [Use the REST API](/api-reference/introduction) with the same key to change things from code
* [Manage your API keys](/account/workspace-settings) in workspace settings

## If it did not work

* **Your client reports a 401 with `api_key_invalid`.** The key is wrong, or it is no longer
  active. Copy it again from **Settings**, then **API Keys**, with no spaces around it, and check
  the header reads `Bearer` followed by one space and the key.
* **The request fails with a 406.** Your own client is not sending
  `Accept: application/json, text/event-stream`. Claude Code, Cursor and VS Code send it for
  you, so this only affects code you wrote yourself.
* **You get a 429.** Too many requests in a minute. Wait a minute and try again, and ask fewer,
  larger questions, for example one `list_calls` page of 100 instead of many small ones.
* **Calls come back with no transcript or recording.** Recordings are never returned over MCP,
  and HIPAA workspaces never receive transcripts. Neither is a fault. See
  [What is withheld](/api-reference/mcp/overview#what-is-withheld).

For anything else, email [support@brilo.ai](mailto:support@brilo.ai) with the time of the
request and the name of your client.

## FAQ

<AccordionGroup>
  <Accordion title="Which MCP clients work with Brilo?">
    Any MCP client that can send a request header works with Brilo, including Claude Code,
    Cursor, VS Code and AI agents built with an MCP library. Chat apps in the browser that only
    offer an OAuth sign in for outside servers cannot connect yet, because the Brilo MCP server
    signs in with an API key.
  </Accordion>

  <Accordion title="Why does my client say the Brilo API key is invalid?">
    The key does not match an active key in your workspace. It may have been copied with a space,
    deleted, or created in a different workspace. Copy it again from **Settings**, then
    **API Keys**, and check the header is `Authorization: Bearer` followed by the key and
    nothing else.
  </Accordion>

  <Accordion title="Can I use the same API key for the MCP server and the REST API?">
    Yes. A Brilo API key works for both the Brilo MCP server and the
    [REST API](/api-reference/introduction). Creating a separate key for each MCP client is still
    worth it, because you can then cut one client off without breaking your other
    integrations. Deleting one key never affects the others.
  </Accordion>

  <Accordion title="Is it safe to put my API key in a config file?">
    Treat the API key like a password. Anyone who has it can read the agents and calls in that
    workspace. Keep it out of files you commit to a shared repository. Claude Code stores it in
    your own user settings. In Cursor or VS Code, put the Brilo server in your user level MCP
    settings rather than a project file that others can see.
  </Accordion>

  <Accordion title="How do I disconnect an MCP client from Brilo?">
    Remove the Brilo server from the client, for example with `claude mcp remove brilo` in Claude
    Code. To make sure the client can no longer read anything, also delete its API key in
    **Settings**, then **API Keys**. Other keys keep working.
  </Accordion>
</AccordionGroup>

## Related

* [Brilo MCP server](/api-reference/mcp/overview) for what it is and what is withheld
* [MCP tools](/api-reference/mcp/tools) for every tool and parameter
* [API introduction](/api-reference/introduction) for rate limits and errors
