execute_dqlLABSCO SUMMARY
Final release 2.1.2, with two named successors.
As a piece of design this one still reads well — DQL gets verified before it is executed, every Grail query counts against a byte budget you set, and the scope list tells you exactly which capability each permission buys. But no further updates are coming, and Dynatrace directs local editor use to Dynatrace-for-AI with dtctl and remote use to its own hosted MCP server, so this is worth reading to see how the observability surfaces map onto tools rather than as something to standardise a team on.
What it is
The local Dynatrace MCP server: a Node process your MCP client spawns that brings problems, vulnerabilities, exceptions, Kubernetes events and Grail queries into the editor. Its README now opens with a deprecation notice — version 2.1.2 was the final release, no further updates will be made — and points at two actively maintained paths instead: Dynatrace-for-AI with dtctl for local development, and the Dynatrace Remote MCP Server for agent-to-agent and remote use, which needs no local setup. The repository also notes the project was never officially supported by Dynatrace; support ran through GitHub Issues.
What you get
- Problem and risk surfaces:
list_problems,list_vulnerabilities,list_exceptions,get_kubernetes_events - Grail querying:
execute_dqlto run DQL,verify_dqlto check syntax before you spend on a scan, andreset_grail_budgetto clear the session's byte counter - DQL in both directions:
generate_dql_from_natural_languagewrites the query,explain_dql_in_natural_languagereads one back to you in prose - Entity and environment lookup:
find_entity_by_name,get_environment_info - Davis:
chat_with_davis_copilotfor questions,list_davis_analyzersandexecute_davis_analyzerfor anomaly detection and forecasting - Getting results out:
send_slack_message,send_email,send_event,create_dynatrace_notebook, pluslist_documents,read_documentandcreate_document - A session budget for Grail:
DT_GRAIL_QUERY_BUDGET_GB(default 1000) tracks bytes scanned, warns at 80% of the limit and resets when the server restarts
Requirements
Node.js v24 or newer, and DT_ENVIRONMENT set to your Dynatrace Platform URL — the apps URL, not a classic one. With only that set, the server opens a browser once for the Authorization Code Flow and keeps the token in the OS keychain; in a headless or container environment set DT_MCP_TOKEN_STORAGE=file to store it under ~/.config/dynatrace-mcp/ instead. DT_PLATFORM_TOKEN, or OAUTH_CLIENT_ID with OAUTH_CLIENT_SECRET, cover service users and backend-to-backend cases. Scopes are per feature and listed one by one in the README — app-engine:apps:run for almost everything, the storage:*:read family for what execute_dql may read, email:emails:send for send_email. Running it as an HTTP service additionally requires MCP_BEARER_TOKEN; the server refuses to start without it and answers unauthenticated requests with 401. Telemetry is on by default and is turned off with DT_MCP_DISABLE_TELEMETRY=true. Package @dynatrace-oss/dynatrace-mcp-server (2.1.2) on npm over stdio. MIT licensed.
Setup effort
One command plus credentials — npx -y @dynatrace-oss/dynatrace-mcp-server, then supply credentials
USE CASES
Working a production problem from the editor
List open problems, pull the exceptions and Kubernetes events around the affected service, then query Grail for the logs in that window.
Writing DQL you do not yet know how to write
Describe the query in English, check the generated statement is syntactically valid, and only then run it against Grail.
Keeping a Grail bill inside a known ceiling
Set the session budget in GB before you start exploring; the server warns at 80% of it and you can clear the counter without restarting.
Handing an investigation to the rest of the team
Turn what you found into a Dynatrace notebook, or push the summary straight into Slack or email from the same session.
Deciding how to move off this server
The migration guide maps each local tool to its remote equivalent and marks the ones with no counterpart, so you can see what you would lose before switching.
21 tools
Listed in project docs. Your client may show a different list.
verify_dqlreset_grail_budgetgenerate_dql_from_natural_languageexplain_dql_in_natural_languagechat_with_davis_copilotlist_problemslist_vulnerabilitieslist_exceptionsget_kubernetes_eventsfind_entity_by_nameget_environment_infolist_davis_analyzersexecute_davis_analyzersend_slack_messagesend_emailsend_eventcreate_dynatrace_notebooklist_documentsread_documentcreate_documentBEFORE YOU INSTALL
What to know first
Tools you get
21 tools named in the project's documentation.
Requires
- npx on PATH
- Node.js v24 or later
- DT_ENVIRONMENT in your environment
INSTALLATION
Connect your client
Server setup
npx -y @dynatrace-oss/dynatrace-mcp-serverMCP Clients
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"
}
}
}
}https://abc12345.apps.dynatrace.com is a sample; yours is your own Dynatrace Platform URL (the apps.dynatrace.com form, not a classic live.dynatrace.com URL). On first start the server opens a browser to sign in to Dynatrace; no token is needed in the block.
Claude Desktop, Amazon Q, Amazon Kiro
{
"mcpServers": {
"dynatrace-mcp-server": {
"command": "npx",
"args": [
"-y",
"@dynatrace-oss/dynatrace-mcp-server@latest"
],
"env": {
"DT_ENVIRONMENT": "https://abc12345.apps.dynatrace.com"
}
}
}
}https://abc12345.apps.dynatrace.com is a sample; yours is your own Dynatrace Platform URL (the apps.dynatrace.com form, not a classic live.dynatrace.com URL). On first start the server opens a browser to sign in to Dynatrace; no token is needed in the block.
Gemini CLI
{
"mcpServers": {
"dynatrace": {
"command": "npx",
"args": [
"@dynatrace-oss/dynatrace-mcp-server@latest"
],
"env": {
"DT_ENVIRONMENT": "https://abc12345.apps.dynatrace.com"
},
"timeout": 30000,
"trust": false
}
}
}https://abc12345.apps.dynatrace.com is a sample; yours is your own Dynatrace Platform URL (the apps.dynatrace.com form, not a classic live.dynatrace.com URL). On first start the server opens a browser to sign in to Dynatrace; no token is needed in the block.
Any MCP client — HTTP
Start it in HTTP mode and keep it running
export DT_ENVIRONMENT=https://abc12345.apps.dynatrace.com
export MCP_BEARER_TOKEN=<YOUR_MCP_BEARER_TOKEN>
npx -y @dynatrace-oss/dynatrace-mcp-server@latest --httpThen add this to your client
Use your own Dynatrace environment URL for DT_ENVIRONMENT, and send the same MCP_BEARER_TOKEN value in the Authorization header. The server refuses to start without MCP_BEARER_TOKEN and listens on port 3000 unless you pass --port.
{
"mcpServers": {
"dynatrace-http": {
"url": "http://localhost:3000",
"type": "http",
"headers": {
"Authorization": "Bearer <YOUR_MCP_BEARER_TOKEN>"
}
}
}
}