---
title: Set Up the Datadog MCP Server
description: Learn how to connect your AI agent to the Datadog MCP Server.
breadcrumbs: Docs > Bits AI > Datadog MCP Server > Set Up the Datadog MCP Server
---

# Set Up the Datadog MCP Server

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site). ().
{% /alert %}

{% /callout %}

Learn how to set up and configure the Datadog MCP Server, which lets you retrieve telemetry insights and manage platform features directly from AI-powered clients. Select your client:

{% tab title="Cursor" %}
Datadog's [Cursor and VS Code extension](https://docs.datadoghq.com/ide_plugins/vscode/) includes built-in access to the managed Datadog MCP Server.

{% callout %}
# Important note for users on the following Datadog sites: app.datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, app.datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com



1. Install the extension (omit `--profile` and profile name to install to the default Cursor profile):

   ```shell
   cursor --install-extension datadog.datadog-vscode --profile <PROFILE_NAME>
   ```

Alternatively, install the [Datadog extension](https://docs.datadoghq.com/ide_plugins/vscode/?tab=cursor#installation). If you have the extension installed already, make sure it's the latest version.

1. Sign in to your Datadog account.

   {% image
      source="https://datadog-docs.imgix.net/images/bits_ai/mcp_server/ide_sign_in.0647493b827cf2dff3c3106bdc89b139.png?auto=format"
      alt="Sign in to Datadog from the IDE extension" /%}

1. **Restart the IDE.**

1. Confirm the Datadog MCP Server is available and the [tools](https://docs.datadoghq.com/bits_ai/mcp_server#available-tools) are listed: Go to **Cursor Settings** (`Shift` + `Cmd/Ctrl` + `J`), select the **Tools & MCP** tab, and expand the extension's tools list.

1. If you previously installed the Datadog MCP Server manually, remove it from the IDE's configuration to avoid conflicts.

1. Verify that you have the required permissions for the Datadog resources you want to access.


{% /callout %}

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com



{% alert level="danger" %}
Datadog MCP Server is not supported for your selected site ().
{% /alert %}


{% /callout %}

{% /tab %}

{% tab title="Claude Code" %}
Point your AI agent to the MCP Server endpoint for your regional [Datadog site](https://docs.datadoghq.com/getting_started/site/). For the correct instructions, use the **Datadog Site** selector on the right side of this documentation page to select your site.

{% callout %}
# Important note for users on the following Datadog sites: app.datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, app.datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com



Selected endpoint (): ``.

1. Run in terminal:

   ```
   claude mcp add --transport http datadog-mcp 
```

Alternatively, add to `~/.claude.json`:

   ```
   {
      "mcpServers": {
        "datadog": {
          "type": "http",
          "url": ""
         }
       }
    }
```

1. To enable [product-specific tools](https://docs.datadoghq.com/bits_ai/mcp_server#toolsets), include the `toolsets` query parameter at the end of the endpoint URL. For example, this URL enables *only* APM and LLM Observability tools (use `toolsets=all` to enable all generally available toolsets, best for clients that support tool filtering):

   ```
   ?toolsets=apm,llmobs
```

1. Verify that you have the required permissions for the Datadog resources you want to access.

{% alert level="info" %}
If remote authentication is not available, use local binary authentication instead.
{% /alert %}


{% /callout %}

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com



{% alert level="danger" %}
Datadog MCP Server is not supported for your selected site ().
{% /alert %}


{% /callout %}

{% /tab %}

{% tab title="Claude" %}
Connect Claude (including Claude Cowork) to the Datadog MCP Server by adding it as a **custom connector** with the remote MCP URL.

{% callout %}
# Important note for users on the following Datadog sites: app.datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, app.datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com



1. Follow the Claude help center guide on [custom connectors](https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp) to add a new custom connector.

1. When prompted for a URL, enter the Datadog MCP Server endpoint for your [Datadog site](https://docs.datadoghq.com/getting_started/site/) (). For the correct instructions, use the **Datadog Site** selector on the right side of this documentation page to select your site.

   ```
   
```

To enable [product-specific tools](https://docs.datadoghq.com/bits_ai/mcp_server#toolsets), include the `toolsets` query parameter at the end of the endpoint URL. For example, this URL enables *only* APM and LLM Observability tools (use `toolsets=all` to enable all generally available toolsets, best for clients that support tool filtering):

   ```
   ?toolsets=apm,llmobs
```

1. Complete the OAuth login flow when prompted.

1. Verify that you have the required permissions for the Datadog resources you want to access.


{% /callout %}

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com



{% alert level="danger" %}
Datadog MCP Server is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site/) ().
{% /alert %}


{% /callout %}

{% /tab %}

{% tab title="Codex" %}
Point your AI agent to the MCP Server endpoint for your regional [Datadog site](https://docs.datadoghq.com/getting_started/site/). For the correct instructions, use the **Datadog Site** selector on the right side of this documentation page to select your site.

{% callout %}
# Important note for users on the following Datadog sites: app.datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, app.datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com



Selected endpoint (): ``.

1. Edit `~/.codex/config.toml` (or your Codex CLI configuration file) to add the Datadog MCP Server with HTTP transport and the endpoint URL for your site. For example:

   ```
   [mcp_servers.datadog]
   url = ""
   ```

To enable [product-specific tools](https://docs.datadoghq.com/bits_ai/mcp_server#toolsets), include the `toolsets` query parameter at the end of the endpoint URL. For example, this URL enables *only* APM and LLM Observability tools (use `toolsets=all` to enable all generally available toolsets, best for clients that support tool filtering):

   ```
   ?toolsets=apm,llmobs
```

1. Log in to the Datadog MCP Server:

   ```shell
   codex mcp login datadog
   ```

This opens your browser to complete the OAuth flow. Codex stores the resulting credentials so you don't need to log in again until the token expires.

1. Verify that you have the required permissions for the Datadog resources you want to access.


{% /callout %}

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com



{% alert level="danger" %}
Datadog MCP Server is not supported for your selected site ().
{% /alert %}


{% /callout %}

{% /tab %}

{% tab title="VS Code" %}
Datadog's [Cursor and VS Code extension](https://docs.datadoghq.com/ide_plugins/vscode/) includes built-in access to the managed Datadog MCP Server.

{% callout %}
# Important note for users on the following Datadog sites: app.datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, app.datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com



1. Install the extension (omit `--profile` and profile name to install to the default VS Code profile):

   ```shell
   code --install-extension datadog.datadog-vscode --profile <PROFILE_NAME>
   ```

Alternatively, install the [Datadog extension](https://docs.datadoghq.com/ide_plugins/vscode/?tab=vscode#installation). If you have the extension installed already, make sure it's the latest version.

1. Sign in to your Datadog account.

1. **Restart the IDE.**

1. Confirm the Datadog MCP Server is available and the [tools](https://docs.datadoghq.com/bits_ai/mcp_server#available-tools) are listed: Open the chat panel, select agent mode, and click the **Configure Tools** button.

   {% image
      source="https://datadog-docs.imgix.net/images/bits_ai/mcp_server/vscode_configure_tools_button.7aad216e77d1a7d4648e55299f613f04.png?auto=format"
      alt="Configure Tools button in VS Code" /%}

1. If you previously installed the Datadog MCP Server manually, remove it from the IDE's configuration to avoid conflicts. Open the command palette (`Shift` + `Cmd/Ctrl` + `P`) and run `MCP: Open User Configuration`.

1. Verify that you have the required permissions for the Datadog resources you want to access.


{% /callout %}

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com



{% alert level="danger" %}
Datadog MCP Server is not supported for your selected site ().
{% /alert %}


{% /callout %}

{% /tab %}

{% tab title="JetBrains IDEs" %}
JetBrains offers the [Junie](https://plugins.jetbrains.com/plugin/26104-junie-the-ai-coding-agent-by-jetbrains) and [AI Assistant](https://plugins.jetbrains.com/plugin/22282-jetbrains-ai-assistant) plugins for their range of IDEs. GitHub offers the [Copilot](https://plugins.jetbrains.com/plugin/17718-github-copilot--your-ai-pair-programmer) plugin. Alternatively, many developers use an agent CLI, such as Claude Code or Codex, alongside their IDE.

Point your plugin to the MCP Server endpoint for your regional [Datadog site](https://docs.datadoghq.com/getting_started/site/). For the correct instructions, use the **Datadog Site** selector on the right side of this documentation page to select your site.

{% callout %}
# Important note for users on the following Datadog sites: app.datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, app.datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com



Selected endpoint (): ``.

{% collapsible-section #jetbrains-junie %}
#### Junie

1. Go to **Tools** > **Junie** > **MCP Settings** and add the following block:

   ```
   {
      "mcpServers": {
        "datadog": {
          "type": "http",
          "url": ""
        }
      }
    }
    
```

1. To enable [product-specific tools](https://docs.datadoghq.com/bits_ai/mcp_server#toolsets), include the `toolsets` query parameter at the end of the endpoint URL. For example, this URL enables *only* APM and LLM Observability tools (use `toolsets=all` to enable all generally available toolsets, best for clients that support tool filtering):

   ```
   ?toolsets=apm,llmobs
```

1. You are prompted to login through OAuth. The status indicator in the settings displays a green tick when the connection is successful.

1. Verify that you have the required permissions for the Datadog resources you want to access.

{% /collapsible-section %}

{% collapsible-section #jetbrains-ai-assistant %}
#### JetBrains AI Assistant

1. Go to **Tools** > **AI Assistant** > **Model Context Protocol (MCP)** and add the following block:

   ```
   {
      "mcpServers": {
        "datadog": {
          "url": ""
          "headers": {
            "DD_API_KEY": "<YOUR_API_KEY>",
            "DD_APPLICATION_KEY": "<YOUR_APP_KEY>"
          }
        }
      }
    }
    
```

1. To enable [product-specific tools](https://docs.datadoghq.com/bits_ai/mcp_server#toolsets), include the `toolsets` query parameter at the end of the endpoint URL. For example, this URL enables *only* APM and LLM Observability tools (use `toolsets=all` to enable all generally available toolsets, best for clients that support tool filtering):

   ```
   ?toolsets=apm,llmobs
```

1. The status indicator in the settings displays a green tick when the connection is successful.

1. Verify that you have the required permissions for the Datadog resources you want to access.

{% /collapsible-section %}

{% collapsible-section #github-copilot %}
#### GitHub Copilot

1. Go to **Tools** > **GitHub Copilot** > **Model Context Protocol (MCP)** and add the following block:

   ```
   {
      "servers": {
        "datadog": {
          "type": "http",
          "url": ""
        }
      }
    }
    
```

1. To enable [product-specific tools](https://docs.datadoghq.com/bits_ai/mcp_server#toolsets), include the `toolsets` query parameter at the end of the endpoint URL. For example, this URL enables *only* APM and LLM Observability tools (use `toolsets=all` to enable all generally available toolsets, best for clients that support tool filtering):

   ```
   ?toolsets=apm,llmobs
```

1. Click the `Start` element that appears in the editor to start the server. You are prompted to log in through OAuth.

1. Verify that you have the required permissions for the Datadog resources you want to access.

{% /collapsible-section %}

{% collapsible-section #jetbrains-agent-clis %}
#### Agent CLIs

Many developers use an agent CLI such as Claude Code or Codex alongside their JetBrains IDE. See the configuration for those CLI tools:

- [Claude Code](https://docs.datadoghq.com/bits_ai/mcp_server/setup/?tab=claudecode)
- [Codex](https://docs.datadoghq.com/bits_ai/mcp_server/setup/?tab=codex)

The [Datadog plugin for JetBrains IDEs](https://docs.datadoghq.com/ide_plugins/idea/) integrates with these agent CLIs. For an uninterrupted experience, install the plugin at the same time as you configure the Datadog MCP Server.
{% /collapsible-section %}


{% /callout %}

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com



{% alert level="danger" %}
Datadog MCP Server is not supported for your selected site ().
{% /alert %}


{% /callout %}

{% /tab %}

{% tab title="Kiro" %}
Point your AI agent to the MCP Server endpoint for your regional [Datadog site](https://docs.datadoghq.com/getting_started/site/). For the correct instructions, use the **Datadog Site** selector on the right side of this documentation page to select your site.

{% callout %}
# Important note for users on the following Datadog sites: app.datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, app.datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com



Selected endpoint (): ``.

1. Add the following to your [Kiro MCP configuration file](https://kiro.dev/docs/mcp/configuration/) (`~/.kiro/settings/mcp.json` for user-scoped configuration):

   ```
   {
      "mcpServers": {
        "datadog": {
          "url": ""
        }
      }
    }
```

1. To enable [product-specific tools](https://docs.datadoghq.com/bits_ai/mcp_server#toolsets), include the `toolsets` query parameter at the end of the endpoint URL. For example, this URL enables *only* APM and LLM Observability tools (use `toolsets=all` to enable all generally available toolsets, best for clients that support tool filtering):

   ```
   ?toolsets=apm,llmobs
```

1. Verify that you have the required permissions for the Datadog resources you want to access.


{% /callout %}

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com



{% alert level="danger" %}
Datadog MCP Server is not supported for your selected site ().
{% /alert %}


{% /callout %}

{% /tab %}

{% tab title="Other" %}
For most other supported clients, use these instructions for remote authentication. For Cline or when remote authentication is unreliable or not available, use local binary authentication.

Point your AI agent to the MCP Server endpoint for your regional [Datadog site](https://docs.datadoghq.com/getting_started/site/). For the correct instructions, use the **Datadog Site** selector on the right side of this documentation page to select your site.

{% callout %}
# Important note for users on the following Datadog sites: app.datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, app.datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com



Selected endpoint (): ``.

1. Add the Datadog MCP Server to your client's configuration file using the HTTP transport and your site's endpoint URL. For example:

   ```
   {
      "mcpServers": {
        "datadog": {
          "type": "http",
          "url": ""
        }
      }
    }
```

1. To enable [product-specific tools](https://docs.datadoghq.com/bits_ai/mcp_server#toolsets), include the `toolsets` query parameter at the end of the endpoint URL. For example, this URL enables *only* APM and LLM Observability tools (use `toolsets=all` to enable all generally available toolsets, best for clients that support tool filtering):

   ```
   ?toolsets=apm,llmobs
```

1. Verify that you have the required permissions for the Datadog resources you want to access.

Example configuration file location:

| Client     | Configuration file        |
| ---------- | ------------------------- |
| Gemini CLI | `~/.gemini/settings.json` |


{% /callout %}

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com



{% alert level="danger" %}
Datadog MCP Server is not supported for your selected site ().
{% /alert %}


{% /callout %}

{% /tab %}

## Supported clients{% #supported-clients %}

| Client                                                               | Developer           | Notes                                                                                                          |
| -------------------------------------------------------------------- | ------------------- | -------------------------------------------------------------------------------------------------------------- |
| [Cursor](https://cursor.com)                                         | Cursor              | Datadog [Cursor & VS Code extension](https://docs.datadoghq.com/ide_plugins/vscode/?tab=cursor) recommended.   |
| [Claude Code](https://claude.com/product/claude-code)                | Anthropic           |
| [Claude](https://claude.ai)                                          | Anthropic           | Use custom connector setup. Includes Claude Cowork.                                                            |
| [Codex CLI](https://chatgpt.com/codex)                               | OpenAI              |
| [VS Code](https://code.visualstudio.com/)                            | Microsoft           | Datadog [Cursor & VS Code extension](https://docs.datadoghq.com/ide_plugins/vscode/) recommended.              |
| [JetBrains IDEs](https://docs.datadoghq.com/ide_plugins/idea/)       | JetBrains           | [Datadog plugin](https://docs.datadoghq.com/ide_plugins/idea/) recommended.                                    |
| [Kiro](https://kiro.dev/), [Kiro CLI](https://kiro.dev/cli/)         | Amazon Web Services |
| [Goose](https://github.com/block/goose), [Cline](https://cline.bot/) | Various             | See the **Other** tab above. Use local binary authentication for Cline if remote authentication is unreliable. |

{% alert level="info" %}
The Datadog MCP Server is under significant development, and additional supported clients may become available.
{% /alert %}

## Required permissions{% #required-permissions %}

MCP Server tools require the following [Datadog user role permissions](https://docs.datadoghq.com/account_management/rbac/permissions/#mcp):

| Permission | Required for                                                                                              |
| ---------- | --------------------------------------------------------------------------------------------------------- |
| mcp_read   | Tools that read data from Datadog (for example, querying monitors, searching logs, retrieving dashboards) |
| mcp_write  | Tools that create or modify resources in Datadog (for example, creating monitors, muting hosts)           |

In addition to `mcp_read` or `mcp_write`, users need the standard Datadog permissions for the underlying resource. For example, using an MCP tool that reads monitors requires both `mcp_read` and the [Monitors Read](https://docs.datadoghq.com/account_management/rbac/permissions/#monitors) permission. See [Datadog Role Permissions](https://docs.datadoghq.com/account_management/rbac/permissions/) for the full list of resource-level permissions.

Users with the **Datadog Standard Role** have both MCP Server permissions by default. If your organization uses [custom roles](https://docs.datadoghq.com/account_management/rbac/?tab=datadogapplication#custom-roles), add the permissions manually:

1. Go to [**Organization Settings > Roles**](https://app.datadoghq.com/organization-settings/roles) as an administrator, and click the role you want to update.
1. Click **Edit Role** (pencil icon).
1. Under the permissions list, select the **MCP Read** and **MCP Write** checkboxes.
1. Select any other resource-level permissions you need for the role.
1. Click **Save**.

Organization administrators can manage global MCP access and write capabilities from [Organization Settings](https://app.datadoghq.com/organization-settings/preferences).

## Authentication{% #authentication %}

The MCP Server uses OAuth 2.0 for [authentication](https://modelcontextprotocol.io/specification/draft/basic/authorization). If you cannot go through the OAuth flow (for example, on a server), you can provide a Datadog [API key and application key](https://docs.datadoghq.com/account_management/api-app-keys/) as `DD_API_KEY` and `DD_APPLICATION_KEY` HTTP headers.

{% callout %}
# Important note for users on the following Datadog sites: app.datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, app.datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com



For example, based on your selected [Datadog site](https://docs.datadoghq.com/getting_started/site/#navigate-the-datadog-documentation-by-site) ():

```
{
  "mcpServers": {
    "datadog": {
      "type": "http",
      "url": "",
      "headers": {
          "DD_API_KEY": "<YOUR_API_KEY>",
          "DD_APPLICATION_KEY": "<YOUR_APPLICATION_KEY>"
      }
    }
  }
}
```


{% /callout %}

For security, use a scoped API key and application key from a [service account](https://docs.datadoghq.com/account_management/org_settings/service_accounts/) that has only the required permissions.

### Local binary authentication{% #local-binary-authentication %}

Local authentication is recommended for Cline and when remote authentication is unreliable or not available. After installation, you typically do not need to update the local binary to benefit from MCP Server updates, as the tools are remote.

{% collapsible-section #mcp-local-binary %}
##### Set up Datadog MCP Server local binary

1. Install the Datadog MCP Server binary (macOS and Linux):

   ```bash
   curl -sSL https://coterm.datadoghq.com/mcp-cli/install.sh | bash
   ```

This installs the binary to `~/.local/bin/datadog_mcp_cli`.

For Windows, download the [Windows version](https://coterm.datadoghq.com/mcp-cli/datadog_mcp_cli.exe).

1. Run `datadog_mcp_cli login` manually to walk through the OAuth login flow and choose a [Datadog site](https://docs.datadoghq.com/getting_started/site/).

1. Configure your AI client to use the stdio transport with `datadog_mcp_cli` as the command. For example, in macOS (replace `<USERNAME>` with your OS username):

   ```json
   {
     "mcpServers": {
       "datadog": {
         "type": "stdio",
         "command": "/Users/<USERNAME>/.local/bin/datadog_mcp_cli",
         "args": [],
         "env": {}
       }
     }
   }
   ```

For other operating systems, replace the `command` path with the location of the downloaded binary:

   - Linux: `/home/<USERNAME>/.local/bin/datadog_mcp_cli`
   - Windows: `<USERNAME>\bin\datadog_mcp_cli.exe`
For Claude Code, you can instead run:
   ```
   claude mcp add datadog --scope user -- ~/.local/bin/datadog_mcp_cli
```

1. Fully restart your AI client to apply the configuration and load the MCP Server.

{% /collapsible-section %}

## Toolsets{% #toolsets %}

All toolsets for the MCP Server are documented [here](https://docs.datadoghq.com/bits_ai/mcp_server#available-tools). By default, the base URL only includes the `core` toolset.

## Test access to the MCP Server{% #test-access-to-the-mcp-server %}

1. Install the [MCP inspector](https://github.com/modelcontextprotocol/inspector), a developer tool for testing and debugging MCP servers.

   ```bash
   npx @modelcontextprotocol/inspector
   ```

1. In the inspector's web UI, for **Transport Type**, select **Streamable HTTP**.

1. For **URL**, enter the MCP Server endpoint for your regional Datadog site.
Important note for users on the following Datadog sites: app.datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, app.datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com: 
For example, for : ``



1. Click **Connect**, then go to **Tools** > **List Tools**.

1. Check if the [available tools](https://docs.datadoghq.com/bits_ai/mcp_server#available-tools) appear.

## Further reading{% #further-reading %}

- [Datadog MCP Server](https://docs.datadoghq.com/bits_ai/mcp_server)
- [Datadog Extension for Cursor](https://docs.datadoghq.com/ide_plugins/vscode/?tab=cursor)
