Dynatrace MCP server

  • Latest Dynatrace
  • Overview
  • 5-min read
  • Preview

This page provides an overview of the Dynatrace Model Context Protocol (MCP) server and how you can use it to maximize your efficiency and quickly complete a variety of tasks, such as generating, executing or explaining a DQL query, with the help of an external agent.

Currently, the MCP server supports the following use cases:

  • Generating a DQL query with Davis CoPilot
  • Explaining a DQL query with Davis CoPilot
  • Using Davis CoPilot to quickly answer your questions
  • Executing a generated DQL query

What is MCP?

The Dynatrace MCP server is a server that hosts tools that can be used to fulfill specific use cases. An external agent, such as GitHub CoPilot VS Code integration or Claude desktop, can then make use of the MCP server and its tools to execute a series of calls when fulfilling a user request.

To learn more about MCP servers, see What is the Model Context Protocol (MCP)?.

Server and server tools

Dynatrace provides a dynatrace-mcp server that hosts a collection of tools designed for external connections. It currently hosts the following tools:

  • Natural language to DQL

    • Allows you to generate a DQL query based on a natural language prompt. This tool doesn't execute the query.
    • Requires the davis-copilot:nl2dql:execute permission.
  • DQL to Natural language

    • Provides natural language explanation of a DQL query.
    • Requires the davis-copilot:dql2nl:execute permission.
  • Davis CoPilot Chat

    • Allows you to ask about general Dynatrace information (for example, "How to create workflows?" or "What is an anomaly detector?").
    • Requires the davis-copilot:conversations:execute permission.
  • Execute DQL

    • Executes any valid DQL query and returns the raw result that can be used by the agent.
    • Limits Grail responses to 1000 records.
    • Requires the storage:buckets:read permission.
    • You can include additional permissions to allow DQL access to other data. For more information, see Grail permissions table.

    Execute DQL tool respects permission scopes and won't access any data outside of the permissions you provided.

Connect to the MCP server

You can connect to an MCP server via a URL by using the following address:

https://{tenant-name}.apps.dynatrace.com/platform-reserved/mcp-gateway/v0.1/servers/dynatrace-mcp/mcp
  • You need to provide a bearer token in the authorization header for the request to work. To learn more about generating and authorizing a bearer token, see OAuth clients.
  • The token you created will only work within the scope of your user permissions. To use the Dynatrace MCP server, you need to have all of the necessary permissions. For more information, see Platform tokens or OAuth clients, depending on the type of the token you use.

In addition to the tool permissions mentioned in Server and server tools, tokens must have the following permissions to access and invoke server tools:

  • mcp-gateway:servers:invoke
  • mcp-gateway:servers:read

You can setup connections by using VS Code and its chat integration, or by using any other tool of your choice.

Related tags
Dynatrace Platform