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 buildfirst.
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
{"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"}}}}