The local Dynatrace MCP server allows AI Assistants to interact with the Dynatrace observability platform, bringing real-time observability data directly into your development workflow. If you need help, please contact us via GitHub Issues if you have feature requests, questions, or need help. You can add this MCP server to your MCP Client like VSCode, Claude, Cursor, Amazon Q, Windsurf, ChatGPT,
Add this skill
npx mdskills install dynatrace-oss/dynatrace-mcpComprehensive observability integration with excellent setup docs and rich capabilities







π Try out our brand new Remote Dynatrace MCP Server! Now available - no local setup required, connect instantly to your Dynatrace environment from any MCP-compatible client.
The local Dynatrace MCP server allows AI Assistants to interact with the Dynatrace observability platform, bringing real-time observability data directly into your development workflow.
Note: This product is not officially supported by Dynatrace.
If you need help, please contact us via GitHub Issues if you have feature requests, questions, or need help.
https://github.com/user-attachments/assets/25c05db1-8e09-4a7f-add2-ed486ffd4b5a
You can add this MCP server to your MCP Client like VSCode, Claude, Cursor, Amazon Q, Windsurf, ChatGPT, or Github Copilot via the command is npx -y @dynatrace-oss/dynatrace-mcp-server (type: stdio). For more details, please refer to the configuration section below.
Furthermore, you need to configure the URL to a Dynatrace environment:
DT_ENVIRONMENT (string, e.g., https://abc12345.apps.dynatrace.com) - URL to your Dynatrace Platform (do not use Dynatrace classic URLs like abc12345.live.dynatrace.com)Authentication will be handled via Authorization Code Flow in your browser, you don't need to define a Platform Token nor an OAuth Client to get started.
Once you are done, we recommend looking into example prompts, like Get all details of the entity 'my-service' or Show me error logs. Please mind that these prompts lead to executing DQL statements which may incur costs in accordance to your licence.
VSCode
{
"servers": {
"npx-dynatrace-mcp-server": {
"command": "npx",
"args": ["-y", "@dynatrace-oss/dynatrace-mcp-server@latest"],
"env": {
"DT_ENVIRONMENT": "https://abc12345.apps.dynatrace.com"
}
}
}
}

Important: While this local MCP server is provided for free, using certain capabilities to access data in Dynatrace Grail may incur additional costs based
on your Dynatrace consumption model. This affects execute_dql tool and other capabilities that query Dynatrace Grail storage, and costs
depend on the volume (GB scanned).
Before using this MCP server extensively, please:
DT_GRAIL_QUERY_BUDGET_GB environment variable (default: 1000 GB) to control and monitor your Grail query consumptionGrail Budget Tracking:
The MCP server includes built-in budget tracking for Grail queries to help you monitor and control costs:
DT_GRAIL_QUERY_BUDGET_GB (default: 1000 GB) to define your session budget limitTo understand costs that occured:
Execute the following DQL statement in a notebook to see how much bytes have been queried from Grail (Logs, Events, etc...):
fetch dt.system.events
| filter event.kind == "QUERY_EXECUTION_EVENT" and contains(client.client_context, "dynatrace-mcp")
| sort timestamp desc
| fields timestamp, query_id, query_string, scanned_bytes, table, bucket, user.id, user.email, client.client_context
| maketimeSeries sum(scanned_bytes), by: { user.email, user.id, table }
Note: While Davis CoPilot AI is generally available (GA), the Davis CoPilot APIs are currently in preview. For more information, visit the Davis CoPilot Preview Community.
You can add this MCP server (using STDIO) to your MCP Client like VS Code, Claude, Cursor, Amazon Q Developer CLI, Windsurf Github Copilot via the package @dynatrace-oss/dynatrace-mcp-server.
We recommend to always set it up for your current workspace instead of using it globally.
VS Code
{
"servers": {
"npx-dynatrace-mcp-server": {
"command": "npx",
"args": ["-y", "@dynatrace-oss/dynatrace-mcp-server@latest"],
"env": {
"DT_ENVIRONMENT": "https://abc12345.apps.dynatrace.com"
}
}
}
}
Claude Desktop
{
"mcpServers": {
"dynatrace-mcp-server": {
"command": "npx",
"args": ["-y", "@dynatrace-oss/dynatrace-mcp-server@latest"],
"env": {
"DT_ENVIRONMENT": "https://abc12345.apps.dynatrace.com"
}
}
}
}
Amazon Q Developer CLI
The Amazon Q Developer CLI provides an interactive chat experience directly in your terminal. You can ask questions, get help with AWS services, troubleshoot issues, and generate code snippets without leaving your command line environment.
{
"mcpServers": {
"dynatrace-mcp-server": {
"command": "npx",
"args": ["-y", "@dynatrace-oss/dynatrace-mcp-server@latest"],
"env": {
"DT_ENVIRONMENT": "https://abc12345.apps.dynatrace.com"
}
}
}
}
This configuration should be stored in /.amazonq/mcp.json.
Amazon Kiro
The Amazon Kiro is an agentic IDE that helps you do your best work with features such as specs, steering, and hooks.
{
"mcpServers": {
"dynatrace-mcp-server": {
"command": "npx",
"args": ["-y", "@dynatrace-oss/dynatrace-mcp-server@latest"],
"env": {
"DT_ENVIRONMENT": "https://abc12345.apps.dynatrace.com"
}
}
}
}
This configuration should be stored in /.kiro/settings/mcp.json.
Google Gemini CLI
The Google Gemini CLI is Google's official command-line AI assistant that supports MCP server integration. You can add the Dynatrace MCP server using either the built-in management commands or manual configuration.
Using gemini CLI directly (recommended):
gemini extensions install https://github.com/dynatrace-oss/dynatrace-mcp
export DT_PLATFORM_TOKEN=... # optional
The command will ask for the value Dynatrace Environment.
Verify that the server is running via
gemini mcp list
Or manually in your ~/.gemini/settings.json or .gemini/settings.json:
{
"mcpServers": {
"dynatrace": {
"command": "npx",
"args": ["@dynatrace-oss/dynatrace-mcp-server@latest"],
"env": {
"DT_ENVIRONMENT": "https://abc12345.apps.dynatrace.com"
},
"timeout": 30000,
"trust": false
}
}
}
For scenarios where you need to run the MCP server as an HTTP service instead of using stdio (e.g., for stateful sessions, load balancing, or integration with web clients), you can use the HTTP server mode:
Running as HTTP server:
# Get help and see all available options
npx -y @dynatrace-oss/dynatrace-mcp-server@latest --help
# Run with HTTP server on default port 3000
npx -y @dynatrace-oss/dynatrace-mcp-server@latest --http
# Run with custom port (using short or long flag)
npx -y @dynatrace-oss/dynatrace-mcp-server@latest --server -p 8080
npx -y @dynatrace-oss/dynatrace-mcp-server@latest --http --port 3001
# Run with custom host/IP (using short or long flag)
npx -y @dynatrace-oss/dynatrace-mcp-server@latest --http --host 127.0.0.1 # recommended for local computers
npx -y @dynatrace-oss/dynatrace-mcp-server@latest --http --host 0.0.0.0 # recommended for container
npx -y @dynatrace-oss/dynatrace-mcp-server@latest --http -H 192.168.0.1 # recommended when sharing connection over a local network
# Check version
npx -y @dynatrace-oss/dynatrace-mcp-server@latest --version
Configuration for MCP clients that support HTTP transport:
{
"mcpServers": {
"dynatrace-http": {
"url": "http://localhost:3000",
"transport": "http"
}
}
}
For efficient result retrieval from Dynatrace, please consider creating a rule file (e.g., .github/copilot-instructions.md, .amazonq/rules/), instructing coding agents on how to get more details for your component/app/service. Here is an example for easytrade, please adapt the names and filters to fit your use-cases and components:
# Observability
We use Dynatrace as an Observability solution. This document provides instructions on how to get data for easytrade from Dynatrace using DQL.
## How to get any data for my App
Depending on the query and tool used, the following filters can be applied to narrow down results:
* `contains(entity.name, "easytrade")`
* `contains(affected_entity.name, "easytrade")`
* `contains(container.name, "easytrade")`
For best results, you can combine these filters with an `OR` operator.
## Logs
To fetch logs for easytrade, execute `fetch logs | filter contains(container.name, "easyatrade")`.
For fetching just error-logs, add `| filter loglevel == "ERROR"`.
Breaking Change in v1.0.0: The MCP server no longer automatically loads
.envfiles. To use environment variables from a.envfile, you need to configure your MCP client to load environment variables using the nativeenvFileconfiguration option. See the configuration examples below for details.
DT_ENVIRONMENT (required, string, e.g., https://abc12345.apps.dynatrace.com) - URL to your Dynatrace Platform (do not use Dynatrace classic URLs like abc12345.live.dynatrace.com)DT_PLATFORM_TOKEN (optional, string, e.g., dt0s16.SAMPLE.abcd1234) - Dynatrace Platform TokenOAUTH_CLIENT_ID (optional, string, e.g., dt0s02.SAMPLE) - Alternative: Dynatrace OAuth Client ID (for advanced use cases)OAUTH_CLIENT_SECRET (optional, string, e.g., dt0s02.SAMPLE.abcd1234) - Alternative: Dynatrace OAuth Client Secret (for advanced use cases)DT_SSO_URL (optional, string, e.g., https://sso.dynatrace.com) - Override the SSO URL for OAuth authentication. By default, the SSO URL is automatically discovered from your Dynatrace environment.DT_GRAIL_QUERY_BUDGET_GB (optional, number, default: 1000) - Budget limit in GB (base 1000) for Grail query bytes scanned per session. The MCP server tracks your Grail usage and warns when approaching or exceeding this limit.When just providing DT_ENVIRONMENT, the local MCP server will try to open a browser window to authenticate against the Dynatrace SSO.
For more information about the other authentication methods, please have a look at the documentation about creating a Platform Token in Dynatrace, as well as creating an OAuth Client in Dynatrace for advanced scenarios (service-users, backend-to-backend communication).
In addition, depending on the features you use, the following variables can be configured:
SLACK_CONNECTION_ID (string) - connection ID of a Slack ConnectionThe MCP server honors system proxy settings for corporate environments:
https_proxy or HTTPS_PROXY (optional, string, e.g., http://proxy.example.com:8080) - Proxy server URL for HTTPS requestshttp_proxy or HTTP_PROXY (optional, string, e.g., http://proxy.example.com:8080) - Proxy server URL for HTTP requestsno_proxy or NO_PROXY (optional, string, e.g., localhost,127.0.0.1,.local) - Comma-separated list of hostnames or domains that should bypass the proxyNODE_EXTRA_CA_CERTS (optional, string, e.g., C:\some-path\certificate.pem) - When set, the well known "root" CAs (like VeriSign) will be extended with the extra certificatesNote: The no_proxy environment variable is currently logged for informational purposes but not fully enforced by the underlying HTTP client. If you need to bypass the proxy for specific hosts, consider configuring your proxy server to handle these exclusions.
Example configuration with proxy:
export HTTPS_PROXY=http://proxy.company.com:8080
export NO_PROXY=localhost,127.0.0.1,.company.local
export DT_ENVIRONMENT=https://abc12345.apps.dynatrace.com
Depending on the features you are using, the following scopes are needed:
Available for both Platform Tokens and OAuth Clients:
app-engine:apps:run - needed for almost all toolsautomation:workflows:read - read Workflowsautomation:workflows:write - create and update Workflowsautomation:workflows:run - run Workflowsapp-settings:objects:read - read app-settings - needed for send_slack_message tool to read connection details from App-Settingsstorage:buckets:read - needed for execute_dql tool to read all system data stored on Grailstorage:logs:read - needed for execute_dql tool to read logs for reliability guardian validationsstorage:metrics:read - needed for execute_dql tool to read metrics for reliability guardian validationsstorage:bizevents:read - needed for execute_dql tool to read bizevents for reliability guardian validationsstorage:spans:read - needed for execute_dql tool to read spans from Grailstorage:entities:read - needed for execute_dql tool to read Entities from Grailstorage:events:read - needed for execute_dql tool to read Events from Grailstorage:security.events:read- needed for execute_dql tool to read Security Events from Grailstorage:system:read - needed for execute_dql tool to read System Data from Grailstorage:user.events:read - needed for execute_dql tool to read User events from Grailstorage:user.sessions:read - needed for execute_dql tool to read User sessions from Grailstorage:smartscape:read - needed for execute_dql tool to read Smartscape Datastorage:events:write - needed for send_event tool to send event data to Dynatracedavis-copilot:conversations:execute - execute conversational skill (chat with Copilot)davis-copilot:nl2dql:execute - execute Davis Copilot Natural Language (NL) to DQL skilldavis-copilot:dql2nl:execute - execute DQL to Natural Language (NL) skilldavis:analyzers:read - needed for listing and getting Davis analyzer definitionsdavis:analyzers:execute - needed for executing Davis analyzersemail:emails:send - needed for send_email tool to send emailsdocument:documents:read - needed for list_documents and read_document tools to list and read Dynatrace documents (Notebooks, Dashboards, Launchpads, etc.)document:documents:write - needed for create_document tool to create new documentsNotes:
app-engine:functions:run, which is no longer required.settings:objects:read and environment-api:entities:read, which are no longer required.You can start with something as simple as "Is my component monitored by Dynatrace?", and follow up with more sophisticated examples.
In most cases, authentication issues are related to missing scopes or invalid tokens. Please ensure that you have added all required scopes as listed above.
For Platform Tokens:
For OAuth Clients: In case of OAuth-related problems, you can troubleshoot SSO/OAuth issues based on our Dynatrace Developer Documentation.
It is recommended to test access with the following API (which requires minimal scopes app-engine:apps:run and, e.g., storage:logs:read):
curl --request POST 'https://sso.dynatrace.com/sso/oauth2/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id={your-client-id}' \
--data-urlencode 'client_secret={your-client-secret}' \
--data-urlencode 'scope=app-engine:apps:run storage:logs:read'
access_token from the response of the above call as the bearer-token in the next call:curl -X GET https://abc12345.apps.dynatrace.com/platform/management/v1/environment \
-H 'accept: application/json' \
-H 'Authorization: Bearer {your-bearer-token}'
{
"environmentId": "abc12345",
"createTime": "2023-01-01T00:10:57.123Z",
"blockTime": "2025-12-07T00:00:00Z",
"state": "ACTIVE"
}
Grail has a dedicated section about permissions in the Dynatrace Docs. Please refer to https://docs.dynatrace.com/docs/discover-dynatrace/platform/grail/data-model/assign-permissions-in-grail for more details.
The Dynatrace MCP Server sends telemetry data using Dynatrace OpenKit BizEvents to help improve the product. This includes:
com.dynatrace-oss.mcp.server-start)com.dynatrace-oss.mcp.client-initialization) - which MCP client is connecting (e.g., VS Code, Claude Desktop, Cursor)com.dynatrace-oss.mcp.tool-usage) - which tools are called, success/failure, execution durationcom.dynatrace-oss.mcp.error) - error tracking for debugging and improvementAll telemetry data is sent as Business Events and is accessible via Grail for analysis:
fetch bizevents
| filter startsWith(event.type, "com.dynatrace-oss.mcp")
| sort timestamp DESC
Privacy and Opt-out:
DT_MCP_DISABLE_TELEMETRY=trueConfiguration options:
DT_MCP_DISABLE_TELEMETRY (boolean, default: false) - Disable TelemetryDT_MCP_TELEMETRY_APPLICATION_ID (string, default: dynatrace-mcp-server) - Application ID for trackingDT_MCP_TELEMETRY_ENDPOINT_URL (string, default: Dynatrace endpoint) - OpenKit endpoint URLDT_MCP_TELEMETRY_DEVICE_ID (string, default: auto-generated) - Device identifier for trackingTo disable usage tracking, add this to your environment:
DT_MCP_DISABLE_TELEMETRY=true
Install via CLI
npx mdskills install dynatrace-oss/dynatrace-mcpDynatrace MCP Server is a free, open-source AI agent skill. The local Dynatrace MCP server allows AI Assistants to interact with the Dynatrace observability platform, bringing real-time observability data directly into your development workflow. If you need help, please contact us via GitHub Issues if you have feature requests, questions, or need help. You can add this MCP server to your MCP Client like VSCode, Claude, Cursor, Amazon Q, Windsurf, ChatGPT,
Install Dynatrace MCP Server with a single command:
npx mdskills install dynatrace-oss/dynatrace-mcpThis downloads the skill files into your project and your AI agent picks them up automatically.
Dynatrace MCP Server works with Claude Code, Claude Desktop, Cursor, Vscode Copilot, Windsurf, Continue Dev, Gemini Cli, Amp, Roo Code, Goose. Skills use the open SKILL.md format which is compatible with any AI coding agent that reads markdown instructions.