Dynatrace Managed MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add -e "DT_CONFIG_FILE=${DT_CONFIG_FILE}" dynatrace-managed -- npx -y @dynatrace-oss/dynatrace-managed-mcp-server@latest
Required:DT_CONFIG_FILE+ 1 optional
README.md

Interact with self-hosted Dynatrace Managed environments via AI assistants

Dynatrace Managed MCP Server

The local Dynatrace Managed MCP server allows AI Assistants to interact with one or more self-hosted Dynatrace Managed deployments, bringing observability data directly into your AI-assisted workflow.

This MCP server supports two modes:

  • Local mode: Runs on your machine for development and testing.
  • Remote mode: Connects over HTTP/SSE for distributed or production-like setups.

[!TIP] This MCP server is specifically designed for Dynatrace Managed (self-hosted) deployments. For Dynatrace SaaS environments, please use the Dynatrace MCP.

[!NOTE] This open source product is supported by the community. For feature requests, questions, or assistance, please use GitHub Issues.

Quickstart

You can add this MCP server to your AI Assistant, such as VSCode, Claude, Cursor, Kiro, Windsurf, ChatGPT, or Github Copilot. For more details, please refer to the configuration section below.

Configuration Methods

There are three ways to configure your Dynatrace Managed environments. Choose the method that works best for your use case:

Method 1: Configuration File (Recommended for Local Development)

The easiest way to configure multiple environments is by using a configuration file (JSON or YAML). This method supports:

  • Clean, readable format - No quote escaping needed
  • Comments (YAML only) - Document your configuration
  • Environment variable interpolation - Keep tokens secure with ${VAR_NAME} syntax
  • Version control friendly - Commit config files without tokens

Example: dt-config.yaml

# Production environment
- dynatraceUrl: https://my-dashboard.company.com/
  apiEndpointUrl: https://my-api.company.com/
  environmentId: abc-123
  alias: production
  # Token is injected from an environment variable at runtime
  apiToken: ${DT_PROD_TOKEN}
  httpProxyUrl: http://proxy.company.com:8080

# Staging environment
- dynatraceUrl: https://staging-dashboard.company.com/
  apiEndpointUrl: https://staging-api.company.com/
  environmentId: xyz-789
  alias: staging
  apiToken: ${DT_STAGING_TOKEN}

Example: dt-config.json

[
  {
    "dynatraceUrl": "https://my-dashboard.company.com/",
    "apiEndpointUrl": "https://my-api.company.com/",
    "environmentId": "abc-123",
    "alias": "production",
    "apiToken": "${DT_PROD_TOKEN}",
    "httpProxyUrl": "http://proxy.company.com:8080"
  }
]

Usage in MCP configuration (e.g., claude_desktop_config.json):

Option A: Using npx (Recommended - no installation required)

{
  "mcpServers": {
    "dynatrace-managed": {
      "command": "npx",
      "args": ["-y", "@dynatrace-oss/dynatrace-managed-mcp-server@latest"],
      "env": {
        "DT_CONFIG_FILE": "./dt-config.yaml",
        "DT_PROD_TOKEN": "dt0c01.ABC123...",
        "DT_STAGING_TOKEN": "dt0c01.XYZ789...",
        "LOG_LEVEL": "info"
      }
    }
  }
}

Option B: Local development (requires cloning the repository)

{
  "mcpServers": {
    "dynatrace-managed": {
      "command": "node",
      "args": ["./dist/index.js"],
      "env": {
        "DT_CONFIG_FILE": "./dt-config.yaml",
        "DT_PROD_TOKEN": "dt0c01.ABC123...",
        "DT_STAGING_TOKEN": "dt0c01.XYZ789...",
        "LOG_LEVEL": "info"
      }
    }
  }
}

Note: Option B requires cloning this repository and running npm install && npm run build first.

Security Best Practice: Use environment variable interpolation (${TOKEN_NAME}) in your config files so you can commit them to version control without exposing secrets!

See examples/dt-config.yaml and examples/dt-config.json for complete e

Tools (3)

query_problemsRetrieve and analyze problems from Dynatrace Managed environments.
get_logsFetch log data from the Dynatrace environment.
get_sloRetrieve Service Level Objective status and metrics.

Environment Variables

DT_CONFIG_FILErequiredPath to the YAML or JSON configuration file containing environment details.
LOG_LEVELSets the verbosity of the server logs (e.g., info, debug).

Configuration

claude_desktop_config.json
{"mcpServers": {"dynatrace-managed": {"command": "npx", "args": ["-y", "@dynatrace-oss/dynatrace-managed-mcp-server@latest"], "env": {"DT_CONFIG_FILE": "./dt-config.yaml", "DT_PROD_TOKEN": "dt0c01.ABC123...", "LOG_LEVEL": "info"}}}}

Try it

List all active problems in the production environment.
Check the current status of the main SLO for our checkout service.
Fetch the latest error logs from the staging environment for the last hour.
Summarize the performance metrics for the production environment.

Frequently Asked Questions

What are the key features of Dynatrace Managed?

Supports both local and remote (HTTP/SSE) connection modes. Enables natural language querying of problems, logs, and events. Supports multi-environment configuration via JSON or YAML files. Secure token management using environment variable interpolation.

What can I use Dynatrace Managed for?

Troubleshooting production incidents by querying logs directly through an AI chat interface. Monitoring Service Level Objectives (SLOs) during deployment cycles. Automating the retrieval of performance metrics for daily status reports.

How do I install Dynatrace Managed?

Install Dynatrace Managed by running: npx -y @dynatrace-oss/dynatrace-managed-mcp-server@latest

What MCP clients work with Dynatrace Managed?

Dynatrace Managed works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Dynatrace Managed docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare