Skip to content

Latest commit

 

History

History
404 lines (298 loc) · 15.4 KB

File metadata and controls

404 lines (298 loc) · 15.4 KB
title description algolia further_reading
Set Up the Datadog MCP Server
Learn how to connect your AI agent to the Datadog MCP Server.
tags rank
mcp
mcp server
setup
75
link tag text
bits_ai/mcp_server
Documentation
Datadog MCP Server
link tag text
ide_plugins/vscode/?tab=cursor
Documentation
Datadog Extension for Cursor

This page explains 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.

Installation

Select your client to see setup instructions:

{{< tabs >}} {{% tab "Cursor" %}}

Datadog's Cursor and VS Code extension includes built-in access to the managed Datadog MCP Server. Benefits include:

  • No additional MCP Server setup after you install the extension and connect to Datadog.
  • One-click transitions between multiple Datadog organizations.
  • Better fixes from Fix in Chat on Code Insights (issues from Error Tracking, Code Vulnerabilities, and Library Vulnerabilities), informed by context from the MCP Server.

To install the extension:

  1. If you previously installed the Datadog MCP Server manually, remove it from the IDE's configuration to avoid conflicts. Go to Cursor Settings (Shift + Cmd/Ctrl + J) and select the MCP tab.
  2. Install the Datadog extension following these instructions. If you have the extension installed already, make sure it's the latest version, as new features are released regularly.
  3. Sign in to your Datadog account. {{< img src="bits_ai/mcp_server/ide_sign_in.png" alt="Sign in to Datadog from the IDE extension" style="width:70%;" >}}
  4. Restart the IDE.
  5. Confirm the Datadog MCP Server is available and the tools are listed: Go to Cursor Settings (Shift + Cmd/Ctrl + J), and select the MCP tab.

{{% /tab %}}

{{% tab "Claude Code" %}}

You can connect Claude Code to the Datadog MCP Server using remote authentication (HTTP) or local binary authentication (stdio).

Remote authentication

{{< site-region region="us,us3,us5,eu,ap1,ap2" >}} Point your AI agent to the MCP Server endpoint for your regional Datadog site. For example, the endpoint for your selected site ({{< region-param key="dd_site_name" >}}) is: {{< region-param key="mcp_server_endpoint" >}}.

  • Command line: Run:

    claude mcp add --transport http datadog-mcp {{< region-param key="mcp_server_endpoint" >}}
    
  • Configuration file: Add to ~/.claude.json:

    {
      "mcpServers": {
        "datadog": {
          "type": "http",
          "url": "{{< region-param key="mcp_server_endpoint" >}}"
        }
      }
    }
    

{{< /site-region >}}

{{< site-region region="gov" >}} Point your AI agent to the MCP Server endpoint for your regional Datadog site.

Datadog MCP Server is not supported for your selected site ({{< region-param key="dd_site_name" >}}).

{{< /site-region >}}

Local binary authentication

Use this option if remote authentication is 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.

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

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

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

  2. Run datadog_mcp_cli login manually to walk through the OAuth login flow and choose a Datadog site.

  3. Configure Claude Code. Add to ~/.claude.json (replace <USERNAME> with your username):

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

    Or run: claude mcp add datadog --scope user -- ~/.local/bin/datadog_mcp_cli

{{% /tab %}}

{{% tab "Claude Desktop & claude.ai" %}}

Connect Claude Desktop or claude.ai to the Datadog MCP Server by adding it as a custom connector with the remote MCP URL.

{{< site-region region="us,us3,us5,eu,ap1,ap2" >}}

  1. Follow the Claude help center guide on custom connectors to add a new custom connector.
  2. When prompted for a URL, enter the Datadog MCP Server endpoint for your Datadog site ({{< region-param key="dd_site_name" >}}):
    {{< region-param key="mcp_server_endpoint" >}}
  3. Complete the OAuth login flow when prompted.

{{< /site-region >}}

{{< site-region region="gov" >}} Point your AI agent to the MCP Server endpoint for your regional Datadog site.

Datadog MCP Server is not supported for your selected site ({{< region-param key="dd_site_name" >}}).

{{< /site-region >}}

{{% /tab %}}

{{% tab "Codex" %}}

You can connect Codex CLI to the Datadog MCP Server using HTTP transport.

{{< site-region region="us,us3,us5,eu,ap1,ap2" >}} Point your AI agent to the MCP Server endpoint for your regional Datadog site. For example, the endpoint for your selected site ({{< region-param key="dd_site_name" >}}) is: {{< region-param key="mcp_server_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. Example configuration ({{< region-param key="dd_site_name" >}}):

    [mcp_servers.datadog]
    url = "{{< region-param key="mcp_server_endpoint" >}}"
    
  2. Log in to the Datadog MCP Server by running:

    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.

{{< /site-region >}}

{{< site-region region="gov" >}} Point your AI agent to the MCP Server endpoint for your regional Datadog site.

Datadog MCP Server is not supported for your selected site ({{< region-param key="dd_site_name" >}}).

{{< /site-region >}} {{% /tab %}}

{{% tab "VS Code" %}}

Datadog's Cursor and VS Code extension includes built-in access to the managed Datadog MCP Server. Benefits include:

  • No additional MCP Server setup after you install the extension and connect to Datadog.
  • One-click transitions between multiple Datadog organizations.

To install the extension:

  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.
  2. Install the Datadog extension following these instructions. If you have the extension installed already, make sure it's the latest version.
  3. Sign in to your Datadog account.
  4. Restart the IDE.
  5. Confirm the Datadog MCP Server is available and the tools are listed: Open the chat panel, select agent mode, and click the Configure Tools button. {{< img src="bits_ai/mcp_server/vscode_configure_tools_button.png" alt="Configure Tools button in VS Code" style="width:70%;" >}}

{{% /tab %}}

{{% tab "JetBrains IDEs" %}}

JetBrains offers the Junie and AI Assistant plugins for their range of IDEs. Alternately, many developers use an agent CLI, such as Claude Code or Codex, alongside their IDE. The sections below describe how to configure the Datadog MCP Server for use by these AI tools.

Junie

To configure the Datadog MCP Server with Junie, navigate to the IDE settings. Go to Tools > Junie > MCP Settings and add the following block:

{
  "mcpServers": {
    "datadog": {
      "type": "http",
      "url": "{{< region-param key="mcp_server_endpoint" >}}"
    }
  }
}

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

AI Assistant

To configure the Datadog MCP Server with AI Assistant, navigate to the IDE settings. Go to Tools > AI Assistant > Model Context Protocol (MCP) and add the following block:

{
  "mcpServers": {
    "datadog": {
      "url": "{{< region-param key="mcp_server_endpoint" >}}"
      "headers": {
        "DD_API_KEY": "your API key",
        "DD_APPLICATION_KEY": "your APP key"
      }
    }
  }
}

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

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:

The Datadog plugin integrates with these agent CLIs. For an uninterrupted experience, install the plugin at the same time as you configure the Datadog MCP Server.

{{% /tab %}}

{{% tab "Other" %}}

The following clients can connect to the Datadog MCP Server: Goose, Kiro, Kiro CLI, Cline, and other MCP-compatible clients. Use remote authentication when your client supports it. For Cline or when remote authentication is unreliable, use local binary authentication.

Remote authentication

{{< site-region region="us,us3,us5,eu,ap1,ap2" >}} Point your AI agent to the MCP Server endpoint for your regional Datadog site. For example, the endpoint for your selected site ({{< region-param key="dd_site_name" >}}) is: {{< region-param key="mcp_server_endpoint" >}}.

Add the Datadog MCP Server to your client's configuration using the HTTP transport and the endpoint above. Example config file locations:

Client Configuration file
Gemini CLI ~/.gemini/settings.json
Kiro CLI ~/.kiro/settings/mcp.json

Example JSON configuration ({{< region-param key="dd_site_name" >}}):

{
  "mcpServers": {
    "datadog": {
      "type": "http",
      "url": "{{< region-param key="mcp_server_endpoint" >}}"
    }
  }
}

{{< /site-region >}}

{{< site-region region="gov" >}} Point your AI agent to the MCP Server endpoint for your regional Datadog site.

Datadog MCP Server is not supported for your selected site ({{< region-param key="dd_site_name" >}}).

{{< /site-region >}}

Local binary authentication

Local authentication is recommended for Cline and when remote authentication is unreliable.

  1. Install the Datadog MCP Server binary:

    • macOS and Linux: Install the binary to ~/.local/bin/datadog_mcp_cli:

      curl -sSL https://coterm.datadoghq.com/mcp-cli/install.sh | bash
    • Windows: Download the Windows version.

  2. Run datadog_mcp_cli login manually to walk through the OAuth login flow and choose a Datadog site.

  3. Configure your AI client to use the stdio transport with datadog_mcp_cli as the command. Example:

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

    On Windows, replace the command path with the location of the downloaded .exe file (for example, C:\Users\<USERNAME>\bin\datadog_mcp_cli.exe).

{{% /tab %}} {{< /tabs >}}

Supported clients

Client Developer Notes
Cursor Cursor Datadog Cursor & VS Code extension recommended.
Claude Code Anthropic
claude.ai Anthropic Use custom connector setup.
Claude Desktop Anthropic Use custom connector setup.
Codex CLI OpenAI
VS Code Microsoft Datadog Cursor & VS Code extension recommended.
JetBrains IDEs JetBrains Datadog plugin recommended.
Goose, Kiro, Kiro CLI, Cline Various See the Other tab above. Use local binary authentication for Cline if remote authentication is unreliable.
The Datadog MCP Server is under significant development, and additional supported clients may become available.

Authentication

The MCP Server uses OAuth 2.0 for authentication. If you cannot go through the OAuth flow (for example, on a server), you can provide a Datadog API key and application key as DD_API_KEY and DD_APPLICATION_KEY HTTP headers.

{{< site-region region="us,us3,us5,eu,ap1,ap2" >}} For example, based on your selected Datadog site ({{< region-param key="dd_site_name" >}}):

{
  "mcpServers": {
    "datadog": {
      "type": "http",
      "url": "{{< region-param key="mcp_server_endpoint" >}}",
      "headers": {
          "DD_API_KEY": "<YOUR_API_KEY>",
          "DD_APPLICATION_KEY": "<YOUR_APPLICATION_KEY>"
      }
    }
  }
}

{{< /site-region >}}

For security, use a scoped API key and application key from a service account that has only the required permissions.

Test access to the MCP Server

  1. Install the MCP inspector, a developer tool for testing and debugging MCP servers.

    npx @modelcontextprotocol/inspector
  2. In the inspector's web UI, for Transport Type, select Streamable HTTP.

  3. For URL, enter the MCP Server endpoint for your regional Datadog site. {{< site-region region="us,us3,us5,eu,ap1,ap2" >}} For example, for {{< region-param key="dd_site_name" >}}: {{< region-param key="mcp_server_endpoint" >}} {{< /site-region >}}

  4. Click Connect, then go to Tools > List Tools.

  5. Check if the available tools appear.

Further reading

{{< partial name="whats-next/whats-next.html" >}}