Set Up the Datadog MCP Server

This product is not supported for your selected Datadog site. ().
Join the Preview!

The Datadog MCP Server is in Preview. There is no charge for using the Datadog MCP Server during the Preview, but pricing may change when the feature becomes generally available. If you're interested in the MCP server and need access, complete this form.

Request Access

This page explains how to set up and configure the Datadog MCP Server, which lets you query and retrieve observability insights directly from AI-powered clients such as Cursor, OpenAI Codex, Claude Code, or your own AI agent.

Client compatibility

The following AI clients are known to be compatible with the Datadog MCP Server.

The Datadog MCP Server is under significant development, and additional supported clients may become available.
ClientDeveloperNotes
CursorAnysphereDatadog Cursor & VS Code extension recommended.
Claude CodeAnthropic
Claude DesktopAnthropicLimited support for remote authentication. Use local binary authentication as needed.
Codex CLIOpenAI
VS CodeMicrosoftDatadog Cursor & VS Code extension recommended.
GooseBlock
KiroAmazon
Kiro CLIAmazon
ClineCline BotLimited support for remote authentication. Use local binary authentication as needed.

Connect in Cursor and 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.
  • [Cursor only] 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. To find the MCP Server configuration:
    • Cursor: Go to Cursor Settings (Shift + Cmd/Ctrl + J) and select the MCP tab.
    • VS Code: 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, as new features are released regularly.
  3. Sign in to your Datadog account. If you have multiple accounts, use the account included in your Product Preview.
    Sign in to Datadog from the IDE extension
  4. Restart the IDE.
  5. Confirm the Datadog MCP Server is available and the tools are listed in your IDE:
    • Cursor: Go to Cursor Settings (Shift + Cmd/Ctrl + J), and select the MCP tab.
    • VS Code: Open the chat panel, select agent mode, and click the Configure Tools button.
      Configure Tools button in VS Code

Connect in other AI clients

The following instructions are for all [MCP-compatible clients][21]. For Cursor or VS Code, use the Datadog extension for built-in access to the Datadog MCP Server.

This method uses the MCP specification’s Streamable HTTP transport mechanism to connect to the MCP Server.

Point your AI agent to the MCP Server endpoint for your regional Datadog site. For example, if you’re using app.datadoghq.com to access Datadog, use the endpoint for the US1 site.

If your organization uses a custom sub-domain, use the endpoint that corresponds to your regional Datadog site. For example, if your custom sub-domain is myorg.datadoghq.com, use the US1 endpoint.

Datadog SiteMCP Server Endpoint
US1 (app.datadoghq.com)https://mcp.datadoghq.com/api/unstable/mcp-server/mcp
US3 (us3.datadoghq.com)https://mcp.us3.datadoghq.com/api/unstable/mcp-server/mcp
US5 (us5.datadoghq.com)https://mcp.us5.datadoghq.com/api/unstable/mcp-server/mcp
EU1 (app.datadoghq.eu)https://mcp.datadoghq.eu/api/unstable/mcp-server/mcp
AP1 (ap1.datadoghq.com)https://mcp.ap1.datadoghq.com/api/unstable/mcp-server/mcp
AP2 (ap2.datadoghq.com)https://mcp.ap2.datadoghq.com/api/unstable/mcp-server/mcp

Example configurations

These examples are for the US1 site:

  • Command line: For Claude Code, run:

    claude mcp add --transport http datadog-mcp https://mcp.datadoghq.com/api/unstable/mcp-server/mcp
    
  • Configuration file: Edit the configuration file for your AI agent:

    • Codex CLI: ~/.codex/config.toml
    • Gemini CLI: ~/.gemini/settings.json
    • Kiro CLI: ~/.kiro/settings/mcp.json
    {
      "mcpServers": {
        "datadog": {
          "type": "http",
          "url": "https://mcp.datadoghq.com/api/unstable/mcp-server/mcp"
        }
      }
    }
    

This method uses the MCP specification’s stdio transport mechanism to connect to the MCP Server.

Use this option if direct remote authentication is not available for you. 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 MCP Server binary to ~/.local/bin/datadog_mcp_cli and then you can use it like any other stdio MCP server.

    • Windows: Download the Windows version.

  2. Run datadog_mcp_cli login manually to walk through the OAuth login flow.

    The MCP Server automatically starts the OAuth flow if a client needs it, but doing it manually lets you choose a Datadog site and avoid the AI client timing out.

  3. Configure your AI client to use the Datadog MCP Server. Follow your client’s configuration instructions, as MCP Server setup varies between third-party AI clients.

    For example, for Claude Code, add this to ~/.claude.json, making sure to replace <USERNAME> in the command path:

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

    Alternatively, you can also configure Claude Code by running the following:

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

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. For example:

{
  "mcpServers": {
    "datadog": {
      "type": "http",
      "url": "https://mcp.datadoghq.com/api/unstable/mcp-server/mcp",
      "headers": {
          "DD_API_KEY": "<YOUR_API_KEY>",
          "DD_APPLICATION_KEY": "<YOUR_APPLICATION_KEY>"
      }
    }
  }
}

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 URL for your regional Datadog site.

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

  5. Check if the available tools appear.

Further reading

Additional helpful documentation, links, and articles: