npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@arvoretech/datadog-mcp

v1.0.4

Published

Datadog MCP Server for monitoring and observability data

Downloads

21

Readme

Datadog MCP Server

Install MCP Server

A Model Context Protocol (MCP) server that provides AI assistants with access to Datadog monitoring and observability data.

Features

  • Metrics Querying: Query time series metrics data
  • Log Search: Search and retrieve logs with advanced filtering
  • Dashboard Management: List and access dashboard information
  • Monitor Management: Retrieve monitor configurations and status
  • Service Maps: Access APM service topology data
  • Infrastructure Monitoring: List and filter hosts
  • Active Metrics: Discover currently reporting metrics
  • APM Tracing: Search traces, list services, and get spans metrics
  • Distributed Tracing: Analyze application performance and dependencies

Installation

npm install -g @arvoretech/datadog-mcp --registry=https://npm.pkg.github.com

Or configure your .npmrc:

echo "@arvoretech:registry=https://npm.pkg.github.com" >> ~/.npmrc
npm install -g @arvoretech/datadog-mcp

Configuration

Set the required environment variables:

export DATADOG_API_KEY="your-datadog-api-key"
export DATADOG_APP_KEY="your-datadog-application-key"
export DATADOG_SITE="datadoghq.com"  # Optional, defaults to datadoghq.com

Environment Variables

Create a .env file or set these environment variables:

# Required
DATADOG_API_KEY=your-datadog-api-key-here
DATADOG_APP_KEY=your-datadog-application-key-here

# Optional (defaults to datadoghq.com)
DATADOG_SITE=datadoghq.com

# Other available sites:
# EU: datadoghq.eu
# US3: us3.datadoghq.com
# US5: us5.datadoghq.com
# Government: ddog-gov.com

Getting API Keys

  1. Go to Datadog API Keys
  2. Create or copy your API key
  3. Go to Datadog Application Keys
  4. Create or copy your Application key

Usage

Direct Execution

node dist/index.js

Claude Desktop Configuration

Add to your Claude Desktop configuration file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "datadog": {
      "command": "npx",
      "args": ["-y", "@arvoretech/datadog-mcp"],
      "env": {
        "DATADOG_API_KEY": "your-api-key",
        "DATADOG_APP_KEY": "your-app-key",
        "DATADOG_SITE": "datadoghq.com"
      }
    }
  }
}

Available Tools

query_metrics

Query Datadog metrics with time series data.

Parameters:

  • query (string): Datadog metrics query (e.g., 'avg:system.cpu.user{*}')
  • from (number): Start timestamp (Unix epoch in seconds)
  • to (number): End timestamp (Unix epoch in seconds)

search_logs

Search and retrieve logs from Datadog.

Parameters:

  • query (string): Log search query using Datadog search syntax
  • time (object): Time range with from and to ISO strings
  • limit (number): Maximum number of logs (1-1000, default 50)

list_dashboards

Retrieve a list of dashboards from your account.

Parameters:

  • count (number): Number of dashboards (max 100, default 25)
  • start (number): Starting index for pagination (default 0)

list_monitors

Retrieve monitors from your account.

Parameters:

  • groupStates (array): Filter by monitor group states
  • name (string): Filter by monitor name
  • tags (array): Filter by tags
  • monitorTags (array): Filter by monitor tags
  • withDowntimes (boolean): Include downtime info (default true)

get_service_map

Retrieve APM service map data.

Parameters:

  • env (string): Environment name (e.g., 'production')
  • start (number): Start timestamp (Unix epoch in seconds)
  • end (number): End timestamp (Unix epoch in seconds)

list_hosts

List infrastructure hosts.

Parameters:

  • filter (string): Filter hosts by name or tag
  • sortField (string): Sort field ('status', 'name', 'checkTime', 'triggerTime')
  • sortDir (string): Sort direction ('asc', 'desc')
  • start (number): Starting index (default 0)
  • count (number): Number of hosts (max 1000, default 100)

get_active_metrics

Get currently reporting metrics from the last hour.

Parameters: None

search_traces

Search for traces in Datadog APM with filtering capabilities.

Parameters:

  • query (string): Trace search query (default "*")
  • start (number): Start timestamp (Unix epoch in seconds)
  • end (number): End timestamp (Unix epoch in seconds)
  • limit (number): Maximum number of traces (1-1000, default 50)

list_services

List services monitored by Datadog APM.

Parameters:

  • start (number): Start timestamp (Unix epoch in seconds)
  • end (number): End timestamp (Unix epoch in seconds)
  • env (string): Environment filter (optional)

get_spans_metrics

Get metrics for spans with optional filtering.

Parameters:

  • start (number): Start timestamp (Unix epoch in seconds)
  • end (number): End timestamp (Unix epoch in seconds)
  • service (string): Service name filter (optional)
  • operation (string): Operation name filter (optional)
  • resource (string): Resource name filter (optional)
  • env (string): Environment filter (optional)

Example Queries

Query CPU Usage

{
  "query": "avg:system.cpu.user{*}",
  "from": 1640995200,
  "to": 1641081600
}

Search Error Logs

{
  "query": "status:error service:web-app",
  "time": {
    "from": "2024-01-01T00:00:00Z",
    "to": "2024-01-01T23:59:59Z"
  },
  "limit": 100
}

Search Traces with Errors

{
  "query": "service:web-app error:true",
  "start": 1640995200,
  "end": 1641081600,
  "limit": 50
}

List Services in Production

{
  "start": 1640995200,
  "end": 1641081600,
  "env": "production"
}

Get Spans Metrics for Specific Service

{
  "start": 1640995200,
  "end": 1641081600,
  "service": "web-api",
  "env": "production"
}

Development

# Install dependencies
pnpm install

# Build the project
pnpm build

# Run in development mode
pnpm dev

# Lint code
pnpm lint

# Run tests with coverage
pnpm test:cov

License

MIT