[DEPRECATED] Dynatrace MCP Server. Migrate to dynatrace-for-ai or Dynatrace Remote MCP Server.
Dynatrace MCP Server is marked as [DEPRECATED]. The provided description instructs migration to dynatrace-for-ai or the Dynatrace Remote MCP Server instead. It is associated with topics including Claude, Cline, Dynatrace, MCP, monitoring, observability, and copilot.
🛠️ Key Features
Deprecation notice for the Dynatrace MCP Server
Guidance to migrate to dynatrace-for-ai or Dynatrace Remote MCP Server
🚀 Use Cases
Dynatrace-related MCP integration for monitoring and observability workflows
Tooling scenarios involving Claude and Cline
⚡ Developer Benefits
Clear migration path indicated in the server description
Relevant categorization via provided topics (dynatrace, mcp, monitoring, observability)
⚠️ Limitations
Deprecated status; new adoption should follow the recommended migrations
See the migration guide for a step-by-step comparison and migration instructions.
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.
Node.js v24 or newer is required to run the Dynatrace MCP Server.
Quickstart
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. After the initial authentication, your token is securely stored in the OS keychain (macOS Keychain, Windows Credential Manager, or Linux Secret Service) and reused on subsequent server starts, so the browser only opens once per token lifetime.
If you are running in a headless/container environment where the OS keychain is unavailable, set DT_MCP_TOKEN_STORAGE=file to persist tokens in ~/.config/dynatrace-mcp/ instead.
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.
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:
Review your current Dynatrace consumption model and pricing
Understand the cost implications of the specific data you plan to query (logs, events, metrics) - see Dynatrace Pricing and Rate Card
Start with smaller timeframes (e.g., 12h-24h) and make use of buckets to reduce the cost impact
Set an appropriate DT_GRAIL_QUERY_BUDGET_GB environment variable (default: 1000 GB) to control and monitor your Grail query consumption
Grail Budget Tracking:
The MCP server includes built-in budget tracking for Grail queries to help you monitor and control costs:
Set DT_GRAIL_QUERY_BUDGET_GB (default: 1000 GB) to define your session budget limit
The server tracks bytes scanned across all Grail queries in the current session
You'll receive warnings when approaching 80% of your budget
Budget exceeded alerts help prevent unexpected high consumption
Budget resets when you restart the MCP server session
To 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...):
Natural Language to DQL - Convert plain English queries to Dynatrace Query Language
DQL Explanation - Get plain English explanations of complex DQL queries
AI Chat Assistant - Get contextual help and guidance for Dynatrace questions
Configuration
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.
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.
This configuration should be stored in <your-repo>/.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.
💡 Recommendation: Instead of self-hosting with --http / --server, consider using the official Dynatrace Remote MCP Server — it is more secure, always up to date, and requires no infrastructure management.
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:
Please secure your server with a bearer token:
bash
export MCP_BEARER_TOKEN=<bearer-token>
bash
# 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 # required for container (binds all interfaces; omitting --host defaults to 127.0.0.1)
npx -y @dynatrace-oss/dynatrace-mcp-server@latest --http -H 192.168.0.1 # recommended when sharing connection over a local network# Static OAuth callback port (useful when the port must be exposed, e.g., when running the MCP in a container)
npx -y @dynatrace-oss/dynatrace-mcp-server@latest --oauth-redirect-port 5344
# Check version
npx -y @dynatrace-oss/dynatrace-mcp-server@latest --version
Configuration for MCP clients that support HTTP transport:
Each release publishes a pre-built MCP Bundle file (.mcpb) that you can install directly in Claude Desktop without any manual JSON configuration.
Installing in Claude Desktop:
Go to the GitHub Releases page and download the latest dynatrace-mcp-server-<version>.mcpb file.
Double-click the downloaded .mcpb file, or open Claude Desktop → Settings → Developer and drag the file into the MCP servers list.
Follow the prompts to set your DT_ENVIRONMENT variable (e.g. https://abc12345.apps.dynatrace.com).
This repository also includes an MCP Bundle-compatible manifest.json for local installation.
The bundle runs the compiled local server entrypoint via stdio:
server.type: node
server.entry_point: dist/index.js
mcp_config.command: node
mcp_config.args: ["${__dirname}/dist/index.js"]
Rule File
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:
code
# 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"`.
Environment Variables
Breaking Change in v1.0.0: The MCP server no longer automatically loads .env files. To use environment variables from a .env file, you need to configure your MCP client to load environment variables using the native envFile configuration 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_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.
In addition, depending on the features you use, the following variables can be configured:
SLACK_CONNECTION_ID (string) - connection ID of a Slack Connection
Proxy Configuration
The 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 requests
http_proxy or HTTP_PROXY (optional, string, e.g., http://proxy.example.com:8080) - Proxy server URL for HTTP requests
no_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 proxy
NODE_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 certificates
Note: 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.
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 tools
app-settings:objects:read - read app-settings - needed for send_slack_message tool to read connection details from App-Settings
storage:buckets:read - needed for execute_dql tool to read all system data stored on Grail
storage:logs:read - needed for execute_dql tool to read logs for reliability guardian validations
storage:metrics:read - needed for execute_dql tool to read metrics for reliability guardian validations
storage:bizevents:read - needed for execute_dql tool to read bizevents for reliability guardian validations
storage:spans:read - needed for execute_dql tool to read spans from Grail
storage:entities:read - needed for execute_dql tool to read Entities from Grail
storage:events:read - needed for execute_dql tool to read Events from Grail
storage:security.events:read- needed for execute_dql tool to read Security Events from Grail
storage:system:read - needed for execute_dql tool to read System Data from Grail
storage:user.events:read - needed for execute_dql tool to read User events from Grail
storage:user.sessions:read - needed for execute_dql tool to read User sessions from Grail
storage:smartscape:read - needed for execute_dql tool to read Smartscape Data
storage:files:read - needed for execute_dql tool to use DQL load statements for lookup data (e.g., /lookups/http_status_codes)
storage:events:write - needed for send_event tool to send event data to Dynatrace
davis-copilot:conversations:execute - execute conversational skill (chat with Copilot)
davis-copilot:nl2dql:execute - execute Davis Copilot Natural Language (NL) to DQL skill
davis-copilot:dql2nl:execute - execute DQL to Natural Language (NL) skill
davis:analyzers:read - needed for listing and getting Davis analyzer definitions
davis:analyzers:execute - needed for executing Davis analyzers
email:emails:send - needed for send_email tool to send emails
document: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 documents
Notes:
Versions before 0.12.0 required the scope app-engine:functions:run, which is no longer required.
Versions before 0.13.0 required the scopes settings:objects:read and environment-api:entities:read, which are no longer required.
✨ Example prompts ✨
You can start with something as simple as "Is my component monitored by Dynatrace?", and follow up with more sophisticated examples.
Troubleshooting
Authentication Issues
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:
Verify your Platform Token has all the necessary scopes listed in the "Scopes for Authentication" section
Ensure your token is valid and not expired
Check that your user has the required permissions in your Dynatrace Environment
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):
Use OAuth Client ID and Secret to retrieve a Bearer Token (only valid for a couple of minutes):