RE

Remote Dynatrace MCP Server — No Local Setup

Connect instantly to the remote Dynatrace MCP server with no local setup and access your Dynatrace environment from any MCP-compatible client.

Quick Install
npx -y @dynatrace-oss/dynatrace-mcp

Overview

The Remote Dynatrace MCP Server provides an MCP (Model Context Protocol) endpoint that lets MCP-compatible clients (VS Code, Claude, Cursor, GitHub Copilot, and others) interact with your Dynatrace environment without installing or running a local server. Connect instantly from any supported client and run queries, fetch problems, inspect entities, or generate and execute DQL — all through a standard MCP interface.

This approach simplifies setup for developers and AI assistant integrations: authentication uses the browser-based Authorization Code Flow, so you don’t need an upfront platform token or to create an OAuth client to start exploring. Keep in mind this project is community-maintained and not an official Dynatrace-supported product; use the GitHub repository for issues and feature requests.

Features

  • MCP-compatible server accessible remotely (no local install required)
  • Browser-based OAuth Authorization Code Flow for authentication
  • Query Dynatrace Grail via natural language → DQL generation and execution
  • Problem, vulnerability, exception and entity discovery API surface
  • Integration helpers for AI assistants and editor-based workflows (stdio transport)
  • Tools for automation: create notifications, trigger workflows, and create notebooks
  • Lightweight configuration: set your Dynatrace environment URL and connect

Installation / Configuration

You can add the MCP server as a remote server entry in any MCP-capable client using an npx wrapper. The server exposes a stdio MCP transport which works with editor-integrated clients.

Quick npx command (runs the MCP server adapter):

npx -y @dynatrace-oss/dynatrace-mcp-server

Example: add to VS Code MCP client (settings.json snippet)

{
  "servers": {
    "npx-dynatrace-mcp-server": {
      "command": "npx",
      "args": ["-y", "@dynatrace-oss/dynatrace-mcp-server@latest"],
      "env": {
        "DT_ENVIRONMENT": "https://abc12345.apps.dynatrace.com"
      }
    }
  }
}

Configuration environment variables

VariableRequiredDescription
DT_ENVIRONMENTYesDynatrace tenant base URL (e.g., https://abc12345.apps.dynatrace.com). Do not use legacy .live.dynatrace.com URLs.

Authentication

  • The server triggers a browser-based Authorization Code Flow when needed. Follow the OAuth consent flow to grant access.
  • No initial platform token or custom OAuth client is required for basic exploration.

Support and repo

  • Source, releases, and issue tracker: https://github.com/dynatrace-oss/dynatrace-mcp

Available Tools / Resources

Commonly available MCP “tools” (capabilities) exposed by the server:

  • Observability & Problem Management:
    • list_problems, get_problem_details, list_vulnerabilities, list_exceptions, get_kubernetes_events
  • Grail data access:
    • execute_dql, verify_dql, generate_dql_from_natural_language, explain_dql_in_natural_language
  • Entity discovery:
    • find_entity_by_name, get_entity_details
  • Dynatrace Intelligence:
    • chat_with_davis_copilot, list_davis_analyzers, execute_davis_analyzer
  • Automation & notifications:
    • create_workflow_for_notification, send_slack_message, send_email, send_event
  • Sharing:
    • create_dynatrace_notebook

Architecture diagrams and assets are available in the repository to help map how client ↔ MCP ↔ Dynatrace interactions flow.

Use Cases (concrete examples)

  1. Incident investigation — root-cause with context

    • Prompt your MCP client: “Show me recent problems for service my-service and list the top related events, traces and logs.”
    • The server lists problems, correlates traces and logs via trace IDs, and can generate a DQL to pull matching logs from Grail for the last hour.
  2. Natural language → DQL

    • Ask: “Find error logs containing ‘NullPointerException’ for service my-service in the last 24 hours and show top 10 occurrences.”
    • The server uses generate_dql_from_natural_language to propose a DQL query, explains it, verifies it, and (if approved) executes it via execute_dql. Note: executing DQL may incur Grail query costs.
  3. Automation & notifications

    • Create a rule to notify Slack when a high-severity problem appears:
      • Use create_workflow_for_notification to set up a webhook/slack message and test delivery.
  4. Security and vulnerability tracking

    • Query current vulnerabilities and link them to affected entities. Use list_vulnerabilities to generate an impact report and create_dynatrace_notebook to share findings with teammates.

Example prompt ideas

  • “Get all details of the entity ‘my-service’”
  • “Show me error logs for my-service with stack traces”
  • “Generate a DQL that finds 500 responses in the last 6 hours for host X”

Costs, limits, and notes

  • Executing DQL against Dynatrace Grail can incur consumption-based costs according to your Dynatrace plan. Generating or explaining DQL is free, but execute_dql is billable.
  • This project is community-maintained (MIT license). It is not an official Dynatrace-supported product.
  • For help, feature requests, or bugs, open an issue on GitHub: https://github.com/dynatrace-oss/dynatrace-mcp/issues

Getting started tips

  • Start by adding the server entry to your editor or client and set DT_ENVIRONMENT to your tenant URL.
  • Authenticate via the browser flow the first time you use a protected capability.
  • Try safe, read-only queries first (list_problems, find_entity_by_name, generate_dql_from_natural_language) before running expensive execute_dql queries.

This MCP server offers a quick path to bring Dynatrace context into AI assistants and development tools without manual local setup, letting you focus on debugging and automation rather than configuration.