Describe the bug
On a default (OAuth) installation with no Datadog API keys set, /doctor reports the MCP server as invalid for missing DD_API_KEY / DD_APPLICATION_KEY, even though the server authenticates via OAuth and works correctly.
The root cause: in .dd_claude-code_mcp.json the two headers are declared as ${DD_API_KEY} / ${DD_APPLICATION_KEY} with no default. Claude Code's static MCP-config validator treats a ${VAR} reference without a default as required, so on OAuth installs (where these are unset) it flags the server. The ${DD_MCP_TOOLSETS:-} variable in the same file already uses an empty default and is not flagged.
To reproduce
- Install the datadog plugin and leave auth at the default (OAuth, no API keys set).
- Authenticate:
/mcp, select plugin:datadog:mcp, choose the authentication option. The server connects and tools load.
- Run
/doctor.
- Observe:
MCP server mcp invalid: Missing environment variables: DD_API_KEY, DD_APPLICATION_KEY
Expected behavior
With OAuth auth and no API keys set, /doctor should report the server as valid. The API-key headers should be optional.
Environment
- OS: macOS (Darwin 25.3.0)
- Client version: 2.1.170
- Plugin version: 0.7.13
Proposed fix: #17
Describe the bug
On a default (OAuth) installation with no Datadog API keys set,
/doctorreports the MCP server as invalid for missingDD_API_KEY/DD_APPLICATION_KEY, even though the server authenticates via OAuth and works correctly.The root cause: in
.dd_claude-code_mcp.jsonthe two headers are declared as${DD_API_KEY}/${DD_APPLICATION_KEY}with no default. Claude Code's static MCP-config validator treats a${VAR}reference without a default as required, so on OAuth installs (where these are unset) it flags the server. The${DD_MCP_TOOLSETS:-}variable in the same file already uses an empty default and is not flagged.To reproduce
/mcp, selectplugin:datadog:mcp, choose the authentication option. The server connects and tools load./doctor.Expected behavior
With OAuth auth and no API keys set,
/doctorshould report the server as valid. The API-key headers should be optional.Environment
Proposed fix: #17