Skip to main content
Glama
Dynatrace MCP Server

Dynatrace MCP Server

Dynatrace MCP Server

本项目实现了一个模型上下文协议 (MCP) 服务器,提供与 Dynatrace Grail 和 API 端点交互的接口。

功能

  • DQL 执行: 执行任意 Dynatrace 查询语言 (DQL) 查询。

  • 日志检索: 获取并筛选应用程序日志。

  • 问题报告: 从 Dynatrace 获取当前活跃问题。

  • 指标查询: 使用 DQL 查询指标。

Related MCP server: Dynatrace Managed MCP Server

前置条件

  • 版本 Python 3.14+(需要 Python 3.14 或更高版本)

  • 一个具有 API 访问令牌的 Dynatrace 环境。

设置

  1. 环境变量: 在根目录创建一个 .env 文件,包含以下变量:

    DYNATRACE_URL=<your-dynatrace-url>
    DYNATRACE_API_TOKEN=<your-api-token>
    DYNATRACE_PLATFORM_URL=<your-platform-url>
    DYNATRACE_PLATFORM_TOKEN=<your-platform-token>
    DYNATRACE_LOG_INGEST_TOKEN=<your-log-ingest-token>
  2. 依赖项: 安装所需的依赖:

    pip install -r requirements.txt

使用

启动 MCP 服务器:

python server.py

将其添加到 gemini/settings.json

"mcpServers": {
   "dynatrace": {
   "command": "D:\\Dynatrace_MCP\\venv\\Scripts\\python.exe",
   "args": [
      "D:\\Dynatrace_MCP\\server.py"
   ]
   }
}

然后运行 gemini CLI

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      D
      maintenance
      Enables interaction with Datadog's monitoring platform to search logs, search trace spans, and perform trace span aggregation for analysis.
      3
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI assistants to interact with self-hosted Dynatrace Managed environments to retrieve observability data, security insights, and performance metrics. It allows users to query problems, logs, events, and SLOs through natural language interfaces in both local and remote modes.
      18
      1,223 npm
      35
      Apache 2.0
    • A
      license
      B
      quality
      C
      maintenance
      Enables LLM agents to query Dynatrace SaaS for observability data (logs, metrics, traces, entities, problems, vulnerabilities) and manage configurations (dashboards, notebooks, SLOs, synthetic monitors, settings).
      100
      MIT
    • A
      license
      C
      quality
      C
      maintenance
      Enables agents to inspect Kubernetes cluster, node, and pod status, run bounded log searches with surrounding context, triage Davis problems and alerts, query metrics and traces, and review security and compliance summaries. It runs locally over stdio against any Dynatrace SaaS/Grail tenant using configurable connections and filters rather than hardcoded scopes.
      38
      11 npm
      MIT