For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/security/code_security/dev_tool_int/mcp_server/troubleshooting.md. A documentation index is available at /llms.txt.
This product is not supported for your selected Datadog site. ().

If you experience issues with the Datadog Code Security MCP Server, use the following solutions to diagnose and resolve common problems.

This MCP server is separate from the Datadog MCP Server, which provides cloud-based access to Datadog features and data. The Code Security MCP Server runs locally and focuses on code-level security scanning.

Binary not found

If a scan returns an error about a missing binary, list every required scanner:

datadog-code-security-mcp version --detailed

Install a missing binary with the instructions in Install security binaries. After you install the agent skills, dd-codesec-setup-toolchain installs, updates, and diagnoses the same binaries. See Install agent skills.

Authentication errors

Keys set in the MCP server configuration are not exported to your shell. echo $DD_API_KEY shows only a key exported in that shell, which is what a direct CLI command uses.

  • For the MCP server, confirm DD_API_KEY and DD_APP_KEY are set in the client configuration on the Code Security MCP Server page.
  • For a direct CLI command, export DD_API_KEY and DD_APP_KEY in the same shell. Optionally export DD_SITE.

If the values are set but scans still fail, verify your keys have the correct permissions. See API and Application Keys for details.

MCP server not responding

  1. Check that the binary is installed and accessible:

    datadog-code-security-mcp version
    
  2. Check MCP server logs:

    tail -f ~/Library/Logs/Claude/mcp*.log
    tail -f ~/.claude/logs/mcp*.log
    
  3. Verify your client configuration points to the correct binary path. If installed through Homebrew, the binary should be on your PATH. Otherwise, use an absolute path in your configuration.

Partial results

When running a comprehensive scan, some scan types may succeed while others fail (for example, if only some binaries are installed). The server returns:

  • Results from all successful scanners.
  • Error messages with installation instructions for any scanners that failed.

This is expected behavior. Install the missing binaries and re-run to get complete results.

Further reading