Get Started with Datadog

The Monitor

Investigate hosts without SSH using Datadog Agent MCP

Published

Read time

4m

Investigate hosts without SSH using Datadog Agent MCP
Noman Hamlani

Noman Hamlani

Senior Product Manager

Jules Macret

Jules Macret

Software Engineer

Eddie Cai

Eddie Cai

Technical Content Writer

When a service fails, the evidence you need may still be on the host. A local log, configuration file, or process table can help explain an error that backend telemetry alone cannot resolve. Finding that evidence often requires an engineer to open an SSH session and inspect the host manually.

Datadog Agent MCP extends AI investigations to hosts running the Datadog Agent. Through the Remote Actions toolset in the Datadog MCP Server, your assistant can read local files and inspect system state on configured hosts. A restricted, read-only shell executes those requests under your access policies, without requiring an SSH session or prior log ingestion.

In this post, we’ll cover how to:

Find the host evidence behind service failures

Datadog Agent MCP lets assistants such as Claude Code, Codex, and Cursor follow an investigation into the affected host. The Agent Restricted Shell (rshell) runs supported Bash-style commands through the Private Action Runner (PAR), which executes requests on the host. Commands such as cat, grep, and ps let the assistant inspect files and processes, then follow up on what it finds.

Claude Code uses Datadog Agent MCP to inspect host logs and distinguish actionable warnings from routine noise.
Claude Code uses Datadog Agent MCP to inspect host logs and distinguish actionable warnings from routine noise.

For example, you might ask, “Investigate why the backend API on this host is failing during traffic spikes.” The assistant could inspect processes, locate application logs, and read configuration values within the allowed paths. Connection pool errors in those logs, together with a low pool limit in the configuration, could help explain the failures. You can review the evidence before deciding how to fix the issue.

Retrieve data you haven’t sent to Datadog

Teams often exclude logs from collection because of their volume, noise, or cost. Datadog Agent MCP retrieves local data on demand: your assistant can search an event log, inspect a configuration file, or use du to identify directories consuming disk space. Those reads do not require ingesting and indexing the files in Datadog Log Management.

Datadog Agent MCP can also supply host context to Bits Investigation when backend telemetry leaves a question unanswered. Host analysis runs read-only rshell commands through PAR. Findings can guide follow-up work, such as adding a monitor for a process that your existing monitoring does not cover.

Control what AI agents can access on your hosts

Datadog Agent MCP uses rshell to constrain command execution. The shell supports familiar syntax, including pipes, loops, and conditionals, but runs purpose-built Go implementations of supported commands. Read-only investigations do not invoke a host shell or external binaries, and file modifications are blocked.

Path and command allowlists limit which files and operations the assistant can access. Execution policies determine which actions are permitted on target hosts, and local Agent configuration can further restrict access. Role-based access control governs requests, while Audit Trail records MCP tool calls for review.

For requests executed through the Linux PAR integration, Landlock restricts file system access and seccomp limits the worker’s system calls. Available commands and controls depend on the deployed versions and policies. You can inspect the implementation in the open source rshell code.

Configure host investigations

Enable Remote Configuration for your organization and set up a private action runner in the Datadog Agent. Configure the runner’s access according to its enrollment method and the hosts you want to investigate. Your organization must allow MCP access, and the connecting user needs MCP Read plus the permissions required by the Remote Actions tool.

Follow the Datadog MCP Server setup instructions for your client and Datadog site. Add remote-actions to the endpoint’s toolsets query parameter alongside the core tools. Start with a configured host and a focused question about a failing service, then review the returned evidence.

Explore planned opt-in remediation

Planned remediation capabilities would extend Datadog Agent MCP with write permissions and additional commands, such as restarting a failing service or truncating a runaway log file. Planned elevated privileges would let authorized commands act on files and services the Agent user does not own. Both capabilities are intended to be opt-in, so teams could keep investigations read-only.

Get started with Datadog Agent MCP

Datadog Agent MCP brings local logs, configurations, and system state into AI investigations without an SSH session. Teams can investigate evidence they haven’t ingested while controlling which files and commands assistants can access.

Sign up for the Datadog Agent MCP preview to get started. If you’re new to Datadog, .

Start monitoring your metrics in minutes