Skip to content

Conversation

AndrewJDawes
Copy link

Hey!

My team uses custom Datadog subdomains through our enterprise account.

We were getting an error when trying to use this MCP server, since it doesn't yet allow one to optionally specify a custom subdomain for the Datadog API endpoints.

This PR is to enable those with custom subdomains to still take advantage of this excellent tool, while maintaining backwards compatibility for those who do not use custom subdomains.

BEFORE:

EXAMPLE 1:

ENV:

datadogSite: datadoghq.com

REQUEST:

{
  "method": "tools/call",
  "params": {
    "name": "get_rum_applications",
    "arguments": {},
    "_meta": {
      "progressToken": 1
    }
  }
}

RESPONSE:

{
  "error": "MCP error 403: HTTP-Code: 403\nMessage: \"Unknown API Status Code!\\nBody: \\\"{\\\"errors\\\":[\\\"Forbidden\\\"]}\\\"\""
}

EXAMPLE 2:

ENV:

datadogSite: my-company.datadoghq.com

REQUEST:

{
  "method": "tools/call",
  "params": {
    "name": "get_rum_applications",
    "arguments": {},
    "_meta": {
      "progressToken": 1
    }
  }
}

RESPONSE:

{
  "error": "MCP error -32603: request to https://api.my-company.datadoghq.com/api/v2/rum/applications failed, reason: Hostname/IP does not match certificate's altnames: Host: api.my-company.datadoghq.com. is not in the cert's altnames: DNS:*.datadoghq.com, DNS:datadoghq.com"
}

AFTER:

EXAMPLE

ENV:

datadogSite: datadoghq.com
datadogSubdomain: my-company

REQUEST:

{
  "method": "tools/call",
  "params": {
    "name": "get_rum_applications",
    "arguments": {},
    "_meta": {
      "progressToken": 0
    }
  }
}

RESPONSE:

{
  "content": [
    {
      "type": "text",
      "text": "RUM applications: [...]"
    }
  ]
}

Notes

@AndrewJDawes AndrewJDawes requested a review from winor30 as a code owner July 12, 2025 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant