Dynatrace MCP
Allows interaction with any Dynatrace SaaS/Grail tenant, providing tools for Kubernetes pod status and events, bounded log search, Davis problem triage, metrics queries, security and vulnerability summaries, entity lookup, and raw DQL execution.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Dynatrace MCP show me crashing pods in the production namespace and their recent logs"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Dynatrace MCP
Local MCP server for any Dynatrace SaaS/Grail tenant — Kubernetes pod status, bounded log search, Davis problem triage, metrics, and security summaries. Nothing is hardcoded to a cluster, namespace, or workload; pass filters (or discover them with list_clusters / list_namespaces).
Runs on your machine (stdio)
npm:
@raviraj87/dynatrace-mcpReplaces the hosted Dynatrace MCP gateway for agent workflows. Does not clone Davis Copilot NL→DQL or docs RAG.
Quick start
Edit ~/.cursor/mcp.json:
{
"mcpServers": {
"dynatrace": {
"command": "npx",
"args": ["-y", "@raviraj87/dynatrace-mcp@latest"],
"env": {
"DYNATRACE_URL": "https://abc12345.apps.dynatrace.com",
"DYNATRACE_API_TOKEN": "dt0s16.your-platform-token"
}
}
}
}Local checkout:
{
"mcpServers": {
"dynatrace-local": {
"command": "node",
"args": ["/path/to/dynatrace-mcp/dist/index.js"],
"env": {
"DYNATRACE_URL": "https://abc12345.apps.dynatrace.com",
"DYNATRACE_API_TOKEN": "dt0s16.your-platform-token"
}
}
}
}Restart Cursor. Ask: "Use dynatrace_health".
Platform token scopes should include Grail reads (storage:logs:read, storage:events:read, storage:metrics:read, storage:entities:read, storage:buckets:read, storage:security.events:read) plus problem/entity access as needed.
DT_ENVIRONMENT / DT_PLATFORM_TOKEN are accepted as aliases.
Related MCP server: K8s Lens MCP
Environment variables
Variable | Required | Description |
| Yes* |
|
| Yes* | Token only ( |
| No | Named |
| No | Named |
| No | JSON map of extra |
| No | Default connection name |
| No | Session Grail scan cap (default 1000) |
| No | Corporate CA PEM |
| No | Skip TLS verify (insecure) |
*Or DT_ENVIRONMENT + DT_PLATFORM_TOKEN.
Every tool accepts optional connection (default, stage, prod, …).
Time bounds
All query tools take from / to (e.g. now-30m, ISO-8601) or calendar startDate / endDate (YYYY-MM-DD, UTC day). around + window pin a pivot. Raw logs default to the last 30 minutes and cap at 7 days unless allowLongRange is true. Never unbounded.
Tools
Core
Tool | Purpose |
| Connectivity + tiny Grail query |
| Named connections |
| Raw DQL |
| Parse DQL without executing |
| Clear session scan budget |
| Davis problems ( |
| One problem ( |
| ERROR/exception logs |
| Cluster/pod events |
| OOM / CrashLoop / Evicted / Warning |
| Entity lookup |
Kubernetes Explorer
Tool | Purpose |
| Inventory |
| Nodes by container CPU/mem |
| Pod table from kube CPU/mem metrics (quiet pods included). |
| One pod: metrics status, entity, ready/restarts if present |
| CrashLoop / Warning events for one pod |
| CPU / memory usage (quota tables) |
| Kubernetes Explorer CPU + Memory quota (requests, limits, %) |
| Events for a pod/workload |
| Desired vs ready |
| Failure rate / latency |
| Error spans by service |
| Highest-duration spans |
| Spans (+ optional logs) by |
Logs (summary → exact → surround)
Tool | Purpose |
| Counts by level × pod × container |
| Exact matching lines (limit 50/200) |
| ±30s around a hit timestamp |
| Last N lines for one pod |
| Poll new lines ( |
| Integration-test wait for a pattern (max 120s) |
Log filters: cluster, namespace, workload, pod(s), container, node, loglevel, contains / containsAll / containsAny / notContains / regex, trace/span id, excludePatterns, sample, date bounds. Content is truncated and likely secrets are redacted.
Triage
Tool | Purpose |
|
|
| Namespace/workload snapshot without a P-id |
Prompt | Full SRE workflow |
Security & metrics
Tool | Purpose |
| Aggregated security.events |
| Vulnerability summary |
| Compliance summary |
| DQL timeseries or classic |
Typical triage
dynatrace_list_clusters/dynatrace_list_namespacesif the target is unknowndynatrace_triage_problem(P-id) ordynatrace_triage_scope(cluster/namespace/workload)dynatrace_log_summarythendynatrace_search_logsloglevel=ERRORdynatrace_logs_surroundingon a match timestampdynatrace_k8s_issue_events/dynatrace_pod_quota/dynatrace_get_poddynatrace_failed_spans/dynatrace_slow_spans/dynatrace_get_traceif app latency or errors
Integration test tail
dynatrace_logs_wait pods=["my-app-7f8c9d4b6-abc12"] namespace=default contains="started" timeoutSeconds=60
dynatrace_logs_tail pods=["my-app-7f8c9d4b6-abc12"] namespace=default since=<nextSince>Verify
export DYNATRACE_URL=https://abc12345.apps.dynatrace.com
export DYNATRACE_API_TOKEN=your-token
npm run build
npm run test:readonlyLicense
MIT — Copyright © 2026 Ravi Raj
Available Tools
38 toolsdynatrace_compliance_findingsCompliance Findings SummaryB
Summarized compliance findings from Grail (aggregated, max 100).
Inputs: to, from, around, window, +5 more.
dynatrace_execute_dqlExecute DQLB
Run a DQL query against Grail. Use templated tools when possible. Requires valid DQL, not natural language.
Inputs: dql (required), to, from, around, +6 more.
dynatrace_failed_spansFailed SpansA
Error spans grouped by service/span/pod. Use after service_health shows failures or for latency vs error triage.
Inputs: to, from, limit, around, +7 more.
dynatrace_get_entity_idGet Entity IDB
Look up Dynatrace entity IDs by type (dt.entity.host, dt.entity.service, ...) and name substring.
Inputs: entityType (required), entityNameFilter (required), connection.
dynatrace_get_entity_nameGet Entity NameB
Resolve a Dynatrace entity ID to its display name.
Inputs: entityId (required), entityType (required), connection.
dynatrace_get_podGet PodB
Detail for one pod: kube-metrics status (CPU/mem), entity lifetime, ready/restarts if ingested.
Inputs: pod (required), to, from, around, +7 more.
dynatrace_get_problemGet Davis ProblemB
Get a Davis problem by display id (P-123) or event id.
Inputs: problemId (required), to, from, around, +5 more.
dynatrace_get_traceGet TraceC
Fetch spans for a trace_id (from a log line) plus optional linked logs.
Inputs: traceId (required), to, from, limit, +7 more.
dynatrace_healthDynatrace HealthB
Check Dynatrace connectivity and Grail access for a named connection.
Inputs: connection.
dynatrace_k8s_eventsKubernetes EventsC
Kubernetes cluster/pod/workload events in a time range.
Inputs: to, pod, from, limit, +10 more.
dynatrace_k8s_issue_eventsKubernetes Issue EventsC
OOMKilled, CrashLoop/BackOff, Evicted, Failed, Unhealthy, probe failures, Warning events. Scope with cluster/namespace/workload/pod.
Inputs: to, pod, from, limit, +9 more.
dynatrace_list_clustersList Kubernetes ClustersA
List Kubernetes clusters known to this Dynatrace tenant (k8s.cluster.name). Call this before filtering pods.
Inputs: to, from, around, window, +4 more.
dynatrace_list_connectionsList Dynatrace ConnectionsB
List configured named connections (default, stage, prod, ...).
Inputs: no named parameters.
dynatrace_list_exceptionsList ExceptionsC
Recent ERROR/exception log lines. Use log filters and date bounds.
Inputs: to, pod, from, host, +31 more.
dynatrace_list_namespacesList Kubernetes NamespacesC
List namespaces in this tenant, optionally filtered by cluster.
Inputs: to, from, around, window, +5 more.
dynatrace_list_nodesList Kubernetes NodesB
Nodes ranked by container CPU/memory on that node. Pass cluster from dynatrace_list_clusters.
Inputs: to, from, limit, around, +6 more.
dynatrace_list_podsList PodsA
Pod table from kube CPU/memory metrics for any cluster/namespace/workload. Quiet pods (no logs) are included. Pass filters from list_clusters / list_namespaces or the user; do not assume names. Unfiltered lists are capped. includeLogs is an optional extra Grail scan.
Inputs: to, pod, from, limit, +10 more.
dynatrace_logs_surroundingSurrounding LogsB
Lines around a pivot timestamp for the same pod/container (grep -C in time). before/after default 30s, max 5m.
Inputs: pivot (required), to, pod, from, +34 more.
dynatrace_logs_tailTail LogsB
Polling live tail for one or more pods. Pass since from the previous nextSince. First call defaults to now-30s. Not a websocket; poll from the agent.
Inputs: pods (required), sort, limit, regex, +19 more.
dynatrace_log_summaryLog SummaryA
Count logs by level, namespace, pod, and container. Call this before fetching raw lines. Requires date/time bounds.
Inputs: to, pod, from, host, +31 more.
dynatrace_logs_waitWait For Log PatternB
Poll until contains/regex appears on the given pods or timeout (default 30s, max 120s). For integration tests.
Inputs: pods (required), sort, limit, regex, +19 more.
dynatrace_metrics_queryQuery MetricsC
Run a DQL timeseries or Environment API v2 metric selector within date bounds.
Inputs: metric (required), by, to, from, +8 more.
dynatrace_pod_eventsPod EventsC
Kubernetes events for one pod or workload (Explorer Events tab).
Inputs: to, pod, from, limit, +9 more.
dynatrace_pod_issuesPod IssuesC
CrashLoop / OOM / not-Ready signals: restarts plus Warning events for a pod.
Inputs: pod (required), to, from, around, +7 more.
dynatrace_pod_logsPod LogsB
Last N log lines for a pod (still time-bounded). Prefer log_summary / search_logs for filters.
Inputs: pod (required), to, from, host, +31 more.
dynatrace_pod_quotaPod CPU/Memory QuotaB
Kubernetes Explorer quota tables for any namespace: CPU (mcore usage, throttled, requests, limits, %, unused) and Memory (usage, requests, limits, %, unused). Discover cluster/namespace first; do not assume names.
Inputs: to, pod, from, sort, +10 more.
dynatrace_pod_utilizationPod UtilizationC
Kubernetes Explorer CPU and Memory quota: usage, throttled, requests, limits, % of request/limit, unused. Filter by cluster/namespace/workload/pod. Same report as dynatrace_pod_quota.
Inputs: to, pod, from, limit, +9 more.
dynatrace_query_problemsQuery Davis ProblemsA
List Davis problems. status: ACTIVE, CLOSED, or ALL. Optional search on description/id/category. Date bounds apply (default last 2h, max 30d).
Inputs: to, from, limit, around, +7 more.
dynatrace_reset_grail_budgetReset Grail BudgetA
Clear session Grail scanned-bytes budget so queries can continue.
Inputs: no named parameters.
dynatrace_search_logsSearch LogsB
Exact matching log lines only (not a dump). Filter by cluster/namespace/pod/container, loglevel, contains/regex, trace id, and date bounds. Default limit 50, max 200.
Inputs: to, pod, from, host, +31 more.
dynatrace_security_events_summarySecurity Events SummaryB
Summarize security.events by provider, type, and risk level. Always aggregated.
Inputs: to, from, around, window, +6 more.
dynatrace_service_healthService HealthC
Request count, failure count, and response time for a service/workload.
Inputs: to, from, around, window, +7 more.
dynatrace_slow_spansSlow SpansB
Highest-duration spans in the window (latency triage). Follow a row with dynatrace_get_trace.
Inputs: to, from, limit, around, +7 more.
dynatrace_triage_problemTriage ProblemA
Investigate a Davis problem: problem record, kube pods/quota, ERROR logs, OOM/CrashLoop events. Pass P-123 or paste alert text. Optional cluster/namespace/workload override extracted hints.
Inputs: to, from, around, window, +9 more.
dynatrace_triage_scopeTriage Cluster/Namespace/WorkloadA
SRE snapshot without a problem id: active Davis problems, OOM/CrashLoop events, ERROR log counts, CPU/memory quota hotspots, replica mismatch, restarts, service golden signals, failed spans. Pass the user's cluster/namespace/workload (discover first). Default window 30m.
Inputs: to, pod, from, around, +9 more.
dynatrace_verify_dqlVerify DQLB
Parse/verify a DQL statement without executing it against Grail storage.
Inputs: dql (required), connection.
dynatrace_vulnerabilitiesVulnerabilities SummaryC
Summarized vulnerability findings from Grail security.events (max 100 groups).
Inputs: to, from, around, window, +6 more.
dynatrace_workload_statusWorkload StatusC
Desired vs ready replicas for a Kubernetes workload (covers No pod ready).
Inputs: to, from, around, window, +7 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 38 tools
Several tools overlap significantly: dynatrace_pod_utilization and dynatrace_pod_quota are explicitly the same report, while dynatrace_k8s_events, dynatrace_pod_events, and dynatrace_k8s_issue_events all surface Kubernetes events with subtly different scopes. Log tools also overlap (list_exceptions vs search_logs, pod_logs vs search_logs), though descriptions provide guidance. Boundaries are mostly documented, but an agent can still misselect among event and log tools.
All tools use the dynatrace_ prefix and snake_case, which is highly predictable. However, many names are noun phrases (pod_issues, workload_status, compliance_findings) rather than the verb_noun pattern, so the convention is consistent in style but not uniformly action-oriented. Minor deviations only.
38 tools is well above the 15-tool threshold for a well-scoped server and falls into the 'too many' range. While the domain is broad, the count increases surface area and contributes to overlap, with several specialized tools that could be consolidated.
The server covers a wide incident-triage surface: DQL, problems, logs, K8s resources, traces, spans, security, and compliance. Gaps remain around metrics discovery (no list_metrics), entity relationships, SLOs, and broader platform resources, but generic execute_dql mitigates many of these. For the apparent observability/troubleshooting purpose, coverage is strong with minor workaroundable gaps.
Maintenance
Related MCP Connectors
Open-source agent that observes and fixes your application. Query logs, traces, metrics, incidents.
Fail-closed policy guardrails for AI agents running kubectl, terraform, helm, and argocd.
Develop, manage, and debug Railway projects, services, and deployments from within agents.
Query your app's logs, metrics and incidents from your AI assistant.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables interactive Kubernetes cluster monitoring and troubleshooting through natural language queries. Users can diagnose pod issues, check service status, and investigate cluster problems using conversational AI.-
- AlicenseNot gradedqualityBmaintenanceEnables natural language Kubernetes operations, including smart resource queries, pod root-cause analysis, cross-environment diffs, and manifest generation.MIT
- FlicenseNot gradedqualityBmaintenanceEnables exploration of Kubernetes metrics, logs, traces, and service graph data via simple tools.1-
- AlicenseNot gradedqualityFmaintenanceEnables AI-powered management of multi-cluster Kubernetes environments through natural language, supporting kubectl operations, function execution, and agent interactions with multiple AI providers.6Apache 2.0