Dynatrace MCP Server
for AI Agents
Connect your AI agent to StackOne's Dynatrace MCP server and give it 21 MCP tools out of the box. Auth, tool execution, and security all managed.
Coverage
21 Agent Actions
Read-only access to Dynatrace. Extend your agent's capabilities with custom actions.
Authentication
Agent Tool Authentication
Per-user OAuth in one call. Your Dynatrace MCP server gets session-scoped tokens with zero credentials stored on your infra.
Agent Auth →Security
Agent Protection
Every Dynatrace tool response scanned for prompt injection in about 2.5 ms, with 0.94 F1 on tool-response attacks, all running on a CPU.
Prompt Injection Defense →Performance
Max Agent Context. Min Cost.
Free up to 96% of your agent's context window to enhance reasoning and reduce cost, on every Dynatrace call.
Tools Discovery →What is the Dynatrace MCP Server?
A Dynatrace MCP server lets AI agents read Dynatrace data through the Model Context Protocol, Anthropic's open standard for connecting LLMs to external tools. StackOne's Dynatrace MCP server ships with 21 pre-built actions, fully extensible via the Connector Builder, plus managed authentication, prompt injection defense, observability, and agent execution runtime. Connect it from MCP clients like Claude Desktop, Claude Code, Cursor, Goose, and VS Code, or from agent frameworks like OpenAI Agents SDK, LangChain, and Vercel AI SDK.
All Dynatrace MCP Tools
Every StackOne action for Dynatrace, ready for your agent. Read-only, scoped to exactly what you need.
Smartscape Agents
- Smartscape Agent
Looks up Dynatrace entity IDs and types by their name using the contains function. Use this tool when the user references an entity by name and you need its ID for other tools (e.g., get-dynatrace-vulnerabilities, query-problems). Returns an empty result if no matching entity is found.
- Smartscape Agent
Resolves a Dynatrace smartscape/entity ID to its human-readable display name.
Other (19)
- Autoadaptive Threshold Analysis Agent
Detects anomalies in time series data by learning a single adaptive threshold from the data distribution that separates outliers from normal observations. Use create-dql first to generate a valid timeseries query as input for this tool. The analysis timeframe must not be set in the future.
- Help Agent
Answers questions about Dynatrace documentation, product features, and terminology (e.g., Grail, OneAgent, Smartscape, pipeline, SLO, SLA, OpenPipeline). Use this tool when the user asks about Dynatrace concepts, configuration, or capabilities. Also use for questions about observability, monitoring, or third-party technologies (e.g., CouchDB, Kubernetes) when they relate to Dynatrace integration or industry-standard observability practices.
- Grail Query Agent
Converts a natural language description into a valid Dynatrace Query Language (DQL) data retrieval query. Always call this tool first when the user wants to fetch data from Grail (logs, spans, traces, metrics, timeseries, events, or aggregations). The generated DQL query can then be executed with execute-dql or passed as input to analyzer tools (e.g., timeseries-forecast, timeseries-novelty-detection). IMPORTANT: This tool CANNOT generate statistical analysis queries such as forecasts, anomaly detection, or timeseries characterization. It only produces queries that fetch historical data.
- Data Analysis Agent
Executes a valid DQL query against Grail and returns the result set. The input MUST be a syntactically valid DQL query string, not natural language. Use the create-dql tool first to generate a valid query from a natural language request.
- DQL Explanation Agent
Returns a human-readable explanation of a given DQL (Dynatrace Query Language) query. Only call this tool when the provided input is already a valid DQL query string, not natural language. Examples of valid input: "fetch logs", "timeseries avg(dt.host.cpu.usage)", "smartscapeNodes "HOST" | limit 10".
- Document Agent
Searches all dashboards and notebooks in the Dynatrace platform by title substring match. Use this tool when the user wants to find a specific dashboard or notebook by name. This tool performs exact substring matching against document titles (case-insensitive).
- Troubleshooting Agent
Searches pre-indexed dashboards and notebooks in the "Problems troubleshooting" collection to find relevant troubleshooting guides. Use this tool when the user needs help diagnosing a problem or finding runbooks. For best results, pass the event.description field of a problem record as the search string.
- Security Posture Agent
Retrieve all compliance findings generated by Dynatrace Security Posture Management. This tool only queries Dynatrace-generated compliance findings and not the compliance findings from external tools. For compliance findings ingested from external security products, you need to complement with get-security-events-summary tool. Use this tool as a complementary information to the get-security-events-summary tool when asked about all compliance findings/misconfigurations in the environment or in specific entities. The query looks at the latest compliance assessments for each affected entity, so it returns the latest snapshot of compliance findings for each entity in the specified time range. Note this query uses 1h time frame implicitly, and this is how Dynatrace compliance assessments work, and it gets the latest compliance findings in the runtime in the last 1 hour. Note: when querying for entity IDs of related entities, and no results received, try also querying for the entity names. Important: `NOT_RELEVANT` status of compliance findings should not count to the total number of findings, and should be reported separately.
- Runtime Vulnerability Agent
Retrieve all open (muted and non-muted) security vulnerabilities generated by Dynatrace Runtime Vulnerability Analytics. This tool only queries Dynatrace-generated vulnerabilities. For vulnerability findings ingested from external security products, you need to complement with get-security-events-summary tool-based results. Do not use this tool to query detection findings or compliance findings, use the get-security-events-summary tool or any other dedicated tool instead for those types of findings. Use this tool as a complementary information when asked about security findings or vulnerabilities in the environment, recent/newly detected findings, or findings in specific entities. The query looks at the latest vulnerability state report and change events for each affected entity, so it returns the latest snapshot of vulnerabilities for each entity in the specified time range. The results can be filtered by risk levels, CVEs, vulnerability IDs, affected entity IDs, and affected entity names. This query uses 30m time frame implicitly, and this is how state reports work, and it gets the latest detected vulnerabilities in the runtime in the last 30 min. The change events will bring also any changes occured since the last snapshot, so that the latest status will be correclty reflected in the output. Note: when querying for entity IDs of related entities, and no results received, try also querying for the entity names. Important: Since the open muted vulnerabilities will be included by default (ALL) in the results, summarize separately the open non-muted vulnerabilities when asked about any vulnerabilities. Important: Always try to summarize the findings using `customSummarizationAndFieldsSelection` variable, unless user wants to list vulnerabilities. The output will be by limited to 100 vulnerabilities.
- Kubernetes Agent
Retrieves events for Kubernetes clusters within a specified time range. Use this tool when the user asks about Kubernetes cluster events, health, or status. By default returns events for all K8s clusters. To filter for a specific cluster, set findAllK8Events to false and provide either a clusterId (k8s.cluster.uid) or a kubernetesEntityId (dt.entity.kubernetes_cluster).
- Root Cause Details Agent
Retrieves full details of a single problem by its display ID. The display ID corresponds to the event.id or display_id field in problem records. If no problem is found, inform the user which timeframe was queried (e.g. "I searched the last 24 hours but found no problem with that ID") and ask them how old the problem might be so you can retry with an appropriate timeframe. Do NOT mention the timeframe if the problem is found successfully. Note that the field dt.analysis.offset can be positive or negative and is not configurable by the user. Do NOT confuse it with query offset, which is not related to this tool.
- Security Event Details Agent
Retrieve the latest security event using a specific finding or scan ID or title. This tool searches across all security event types (detection findings, vulnerability findings, compliance findings, etc.) to find and return the most recent event that matches the provided finding, scan ID, or title. The results are sorted by timestamp in descending order to show the latest occurrence first. When asked about latest findings, start with the 24h timeRange filter, and then adjust the time range as needed to find older findings if necessary.
- Security Summary Agent
Query security events — both findings (vulnerabilities, detections, compliance issues, and misconfigurations) and scan events — from external products ingested into Dynatrace, as well as Dynatrace-generated detection findings (e.g. from Runtime Attack Protection). For Dynatrace-native findings from Runtime Vulnerability Analytics (vulnerabilities) or Security Posture Management (compliance/misconfigurations), prefer or complement with the dedicated specialized tools, which are optimized for those types. This tool is also useful for discovering which external security providers are integrated with Dynatrace. Always use this tool alongside the specialized tools when asked about all security findings or recently/newly detected findings in the environment. Custom filtering and summarization options allow you to get the most relevant information for your specific use case and question. Start with a 2h `timeRange` and widen as needed if no results are found. Do not start with longer time frames. For a specific finding type (e.g. vulnerabilities, detections, compliance issues): apply the eventTypes filter accordingly.
- Log Pattern Agent
Analyze log lines coming from grail queries to find common patterns The logQuery input should always be a DQL query that fetches log lines from grail. Timeframe for analysis should never be set in the future. It is advisable to use the create-dql tool beforehand to get a valid DQL query as input for this tool.
- Root Cause Agent
Queries problems and returns up to 200 of the most recent results, filtered by status and time range. Use this tool when the user asks about active, closed, or all problems in their environment. Problem lifecycle: a problem with no end time is ACTIVE; once an end time is set, it is CLOSED. Use the status parameter to filter accordingly.
- Seasonal Baseline Agent
Detects anomalies in time series data by learning normal behavior from historical data and establishing dynamic baselines that account for seasonal patterns (e.g., daily and weekly traffic cycles). Use create-dql first to generate a valid timeseries query as input for this tool. The analysis timeframe must not be set in the future.
- Static Threshold Analysis Agent
Detects anomalies in time series data by checking whether metric values violate a fixed threshold. Use create-dql first to generate a valid timeseries query as input for this tool. Constraints: - The violatingSamples and dealertingSamples values must never exceed the slidingWindow value. - The threshold must be in the base unit of the queried metric. For response-time metrics (e.g., dt.service.request.response_time), the base unit is microseconds, so 5 seconds = 5000000. - The analysis timeframe must not be set in the future.
- Forecasting Agent
Predicts future time series values using a statistical forecasting model based on historical data from a DQL query. Use create-dql first to generate a valid timeseries query as input for this tool. Constraints: - The forecast horizon maximum is 600 data points. - The analysis timeframe must not be set in the future. - Input queries should always include a record limit. If the user does not specify one, default to 500 records (e.g., "timeseries avg(dt.service.request.response_time), by:{dt.entity.service} | limit 500").
- Changepoint Agent
Detects changepoints in time series data, including outliers (spikes), level shifts, and significant trend changes, by computing novelty scores. Use create-dql first to generate a valid timeseries query as input for this tool. The analysis timeframe must not be set in the future.
Set Up Your Dynatrace MCP Server in Minutes
One endpoint. Any framework. Your agent is talking to Dynatrace in under 10 lines of code.
Agent Frameworks
{
"mcpServers": {
"stackone": {
"command": "npx",
"args": [
"-y",
"mcp-remote@latest",
"https://api.stackone.com/mcp?x-account-id=<account_id>",
"--header",
"Authorization: Basic <YOUR_BASE64_TOKEN>"
]
}
}
}Check More Data Infrastructure MCP Servers
560+ actions
239+ actions
178+ actions
172+ actions
172+ actions
145+ actions
138+ actions
Platform Resources
Comparing BM25, TF-IDF, and Hybrid Search for MCP Tool Discovery
Benchmarking BM25, TF-IDF, and hybrid search for MCP tool discovery across 916 tools. The 80/20 TF-IDF/BM25 hybrid hits 21% Top-1 accuracy in under 1ms.
10 min
Indirect Prompt Injection Defense for MCP Tools: A Technical Guide
MCP tools that read emails, CRM records, and tickets are indirect prompt injection vectors. Here's how we built a two-tier defense that scans tool results in ~11ms.
12 min
MCP vs A2A: Architecture, Security, and When to Use Each
MCP vs A2A: what each protocol standardizes, how they differ, the security risks they share, and when to use one, both or a hybrid.
12 min
MCP vs API: What Hundreds of Connector Builds Taught Us
MCP wraps APIs, it doesn't replace them. After building hundreds of connectors that serve both, here's when each approach wins.
14 min read
FAQ
Dynatrace MCP Server FAQ
origin_owner_id.