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

# Connecting AI Agents to Honeycomb MCP

> Connect your AI agent to the Honeycomb MCP Server using OAuth or API key authentication, with step-by-step setup for popular MCP hosts.

Connect your AI agents to Honeycomb MCP using OAuth or API keys.

## Introduction

You can connect Honeycomb to any AI agent that supports the Model Context Protocol (MCP).
This guide shows you how to set up that connection using either OAuth 2.1 (recommended) or API key authentication.

## Before You Begin

Make sure you have:

* A Honeycomb team with [Honeycomb Intelligence](/security-compliance/honeycomb-intelligence/) enabled.
* An AI agent or MCP host program to connect, such as Cursor, Claude Code/Desktop, or OpenAI Codex.

## Choose a Connection Method

Honeycomb supports two authentication methods for MCP:

* **OAuth (recommended)**: Use this option for most cases because it is secure, user-friendly, and works well with interactive agents.
* **API key access**: Use this only for headless or unattended agents that cannot support an OAuth flow.

## Setting Up OAuth

<Info>
  We recommend using OAuth whenever possible.
</Info>

Many modern agents support OAuth out of the box or through a few CLI commands.
Once connected, your agent can access Honeycomb's MCP tools without needing a key or manual setup.

### Using Built-in Support

If your tool supports one-click or command-line configuration, use one of these options:

* **Cursor**: [Set up Honeycomb with Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=honeycomb\&config=eyJ0cmFuc3BvcnQiOiJodHRwIiwidXJsIjoiaHR0cHM6Ly9tY3AuaG9uZXljb21iLmlvL21jcCJ9)
* **Visual Studio Code**: [Configure Honeycomb with VS Code](vscode:mcp/install?%7B%22name%22%3A%22honeycomb%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22mcp-remote%22%2C%22https%3A%2F%2Fmcp.honeycomb.io%2Fmcp%22%5D%7D)
* **Claude**: For Claude Enterprise or Pro/Max accounts, set up a [custom connector](https://support.anthropic.com/en/articles/11175166-getting-started-with-custom-connectors-using-remote-mcp) using the appropriate Honeycomb MCP endpoint:

  * US: `https://mcp.honeycomb.io/mcp`
  * EU: `https://mcp.eu1.honeycomb.io/mcp`

### Using the Command-Line

You can also connect using built-in CLI support:

* [Claude Code](https://docs.anthropic.com/en/docs/claude-code/overview):
  * US: `claude mcp add honeycomb --transport http https://mcp.honeycomb.io/mcp`
  * EU: `claude mcp add honeycomb --transport http https://mcp.eu1.honeycomb.io/mcp`
* [Amazon Q Developer](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/what-is.html):
  * US: `qchat mcp add --name honeycomb --command npx --args mcp-remote,https://mcp.honeycomb.io/mcp`
  * EU: `qchat mcp add --name honeycomb --command npx --args mcp-remote,https://mcp.eu1.honeycomb.io/mcp`

### Setting Up Manually (Generic MCP Hosts)

If your agent does not support one-click integration, you can still connect manually:

1. Find the setting or preference for adding an MCP Server.

2. Create a new server with these parameters:

   * Transport: HTTP
   * URL:
     * US: `https://mcp.honeycomb.io/mcp`
     * EU: `https://mcp.eu1.honeycomb.io/mcp`

3. Enter `/mcp` on the command-line to trigger an authentication flow. Pick your environment and choose read only.

If your agent does not support HTTP streaming (or if you encounter issues), you can fall back to a `stdio` bridge like `mcp-remote`.
Here's a sample `mcp.json` for that option:

```json theme={}
{
  "mcpServers": {
    "honeycomb": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp.honeycomb.io/mcp",
      ],
    }
  }
}
```

## Setting Up an API Key

If you are building autonomous or unattended agents and cannot use OAuth, then you can authenticate with an API key.
Only team owners can generate an API key.

<Note>
  Prefer OAuth in most use cases.
  Use an API key only when your agent cannot support interactive login.
</Note>

<Steps titleSize="h3">
  <Step title="Generate an API Key in Honeycomb">
    1. Log in to your Honeycomb account.
    2. Navigate to **Account** > **Team Settings** > **API Keys**.
    3. Select **Create Management API Key**.
    4. Name your key (for example, "MCP Integration").
    5. Choose the **Model Context Protocol** and **Environments** scopes, then grant permissions:
       * **Read**: Required for all Honeycomb MCP operations.
         **Be sure to grant read for both MCP and Environments**.
       * **Write**: Required for the `create_board` tool.
    6. Copy the **Key ID** and **Key Secret**, and store them somewhere safe.
       You'll need them later, and you won't be able to see them again.
  </Step>

  <Step title="Add Your API Key to Your Agent">
    The exact configuration process varies by agent, but here is an example configuration `mcp.json` snippet used by agents like Claude Code or Cursor:

    <Tip>
      Be sure to use the appropriate endpoint for your region, and replace `KEY_ID` and `SECRET_KEY` with your actual key values.
    </Tip>

    ```json theme={}
    {
      "mcpServers": {
        "honeycomb": {
          "command": "npx",
          "args": [
            "-y",
            "mcp-remote",
            "https://mcp.honeycomb.io/mcp",
            "--header",
            "Authorization: Bearer $HONEYCOMB_API_KEY"
          ],
          "env": {
            "HONEYCOMB_API_KEY": "<KEY_ID>:<SECRET_KEY>"
          }
        }
      }
    }
    ```

    <Info>
      Watch out formatting, including spacing and colon (`:`) characters.

      If your tool cannot parse the `Authorization` header correctly, try putting the `Bearer` prefix directly in the environment variable:
      `"HONEYCOMB_API_KEY": "Bearer KEY_ID:SECRET_KEY"`.
    </Info>

    As a security best practice, make sure that keys being used for MCP integrations do not carry any other scopes, and that you do not commit them to source control.
  </Step>

  <Step title="Confirm the Connection">
    Once connected, test by asking your agent to list available tools or fetch available teams and environments.
    You should get results if your key and permissions are set up correctly.
  </Step>
</Steps>

## Next Steps

Continue your MCP journey with these focused resources:

* [Example Use Cases](/integrations/mcp/use-cases/): Explore real-world use cases and tips for working with Honeycomb via MCP.
* [Troubleshooting](/integrations/mcp/troubleshooting/): Find solutions to common configuration issues and learn how to verify that your agent is connected and working correctly.
* [Pollinators Slack Community](/troubleshoot/community/#join-pollinators-community-slack): Join to ask questions or share feedback.
