Dynatrace MCP Server

MIT License
113
32

Integrations

  • Enables real-time observability data access from Dynatrace, allowing users to fetch problem details, security vulnerabilities, execute DQL queries, retrieve logs and metrics, analyze Kubernetes cluster events, and set up notifications via Slack and Dynatrace AutomationEngine.

  • Provides tools for monitoring Kubernetes clusters, retrieving problem details from services, and analyzing cluster events to troubleshoot deployment issues.

  • Allows sending notification messages to Slack channels via a Slack Connector, supporting features like alerting on availability problems and security vulnerabilities.

Dynatrace MCP サーバー

このリモートMCPサーバーは、 Dynatraceの可観測性プラットフォームとの連携を可能にします。リアルタイムの可観測性データを開発ワークフローに直接取り込むことができます。

ユースケース

  • リアルタイムの観測性により、早期検出のために本番レベルのデータを取得します。
  • 監視対象の例外、ログ、異常からコンテキスト内の問題を修正します。
  • セキュリティレベルの問題に関する詳細なコンテキスト
  • ログデータをクエリするための自然言語

機能

  • サービス(Kubernetes など)から問題の詳細を一覧表示して取得する
  • セキュリティ上の問題や脆弱性の詳細を一覧表示して取得する
  • イベントやログを取得するなどのDQL(Dynatrace Query Language)を実行する
  • Slack メッセージを送信する (Slack コネクタ経由)
  • 通知ワークフローを設定する(Dynatrace AutomationEngine経由)
  • エンティティの所有権を取得する

クイックスタート

進行中

この MCP サーバー (STDIO を使用) は、パッケージ@dynatrace-oss/dynatrace-mcp-serverを介して、VS Code、Claude、Cursor、Windsurf Github Copilot などの MCP クライアントに追加できます。

VSコード

{ "servers": { "npx-dynatrace-mcp-server": { "command": "npx", "args": ["-y", "@dynatrace-oss/dynatrace-mcp-server@latest"], "envFile": "${workspaceFolder}/.env" } } }

クロードデスクトップ

{ "mcpServers": { "mobile-mcp": { "command": "npx", "args": ["-y", "@dynatrace-oss/dynatrace-mcp-server@latest"], "env": { "OAUTH_CLIENT_ID": "", "OAUTH_CLIENT_SECRET": "", "DT_ENVIRONMENT": "" } } } }

環境変数

Dynatrace 環境と通信するには、 Dynatrace OAuth クライアントが必要です。Dynatrace で OAuth クライアントを作成する方法についてはドキュメントを参照し、この MCP が機能するように以下の環境変数を設定してください。

  • DT_ENVIRONMENT (文字列、例: https://abcd1234.apps.dynatrace.com ) - Dynatrace プラットフォームへの URL
  • OAUTH_CLIENT_ID (文字列、例: dt0s02.SAMPLE ) - Dynatrace OAuth クライアント ID
  • OAUTH_CLIENT_SECRET (文字列、例: dt0s02.SAMPLE.abcd1234 ) - Dynatrace OAuth クライアントシークレット
  • OAuth クライアント スコープ:
    • app-engine:apps:run - environmentInformationClient に必要
    • app-engine:functions:run - environmentInformationClient に必要
    • hub:catalog:read - Dynatrace 環境にインストールされているアプリの詳細を取得します
    • environment-api:security-problems:read - セキュリティ上の問題を読み取るために必要
    • environment-api:entities:read - 監視対象エンティティを読み取る
    • environment-api:problems:read - 問題を取得する
    • environment-api:metrics:read - メトリックを読み取る
    • environment-api:slo:read - SLO を読み取る
    • settings:objects:read - 設定から所有権情報とガーディアン (SRG) を読み取るために必要
    • storage:buckets:read - Grailに保存されているすべてのシステムデータを読み取る
    • storage:logs:read - 信頼性ガーディアン検証のログを読み取ります
    • storage:metrics:read - 信頼性ガーディアン検証のメトリクスを読み取る
    • storage:bizevents:read - 信頼性ガーディアン検証のためにbizeventsを読み取ります
    • storage:spans:read - Grailからスパンを読み取る
    • storage:entities:read - Grail からエンティティを読み取る
    • storage:system:read - Grail からシステムデータを読み取る
    • storage:user.events:read - Grail からユーザーイベントを読み取る
    • storage:user.sessions:read - Grail からユーザーセッションを読み取る

さらに、使用する機能に応じて、次の変数を設定できます。

  • SLACK_CONNECTION_ID (文字列) - Slack接続の接続ID
  • USE_APP_SETTINGS (ブール値、 trueまたはfalse ; デフォルト: false )
    • アプリ設定から設定オブジェクトを読み取るには、スコープapp-settings:objects:read必要です
  • USE_WORKFLOWS (ブール値、 trueまたはfalse ; デフォルト: false )
    • ワークフローの読み取り、書き込み、実行には、スコープのautomation:workflows:readautomation:workflows:writeautomation:workflows:run必要です。

✨ プロンプト例 ✨

これらのサンプルプロンプトを出発点としてご利用ください。IDEまたはエージェント設定にコピーし、サービス/スタック/アーキテクチャに合わせて調整し、必要に応じて拡張してください。これらのサンプルプロンプトは、IDEのMCPコンテキストにおいて、リアルタイムオブザーバビリティと自動化がどのように連携するかをイメージするのに役立ちます。

運用環境で未解決の脆弱性を見つけ、アラートを設定します。

I have this code snippet here in my IDE, where I get a dependency vulnerability warning for my code. Check if I see any open vulnerability/cve on production. Analyze a specific production problem. Setup a workflow that sends Slack alerts to the #devops-alerts channel when availability problems occur.

断続的に発生する 503 エラーをデバッグします。

Our load balancer is intermittently returning 503 errors during peak traffic. Pull all recent problems detected for our front-end services and run a query to correlate error rates with service instance health indicators. I suspect we have circuit breakers triggering, but need confirmation from the telemetry data.

メモリの問題をログと関連付けます。

There's a problem with high memory usage on one of our hosts. Get the problem details and then fetch related logs to help understand what's causing the memory spike? Which file in this repo is this related to?

要求フローの分析をトレースします。

Our users are experiencing slow checkout processes. Can you execute a DQL query to show me the full request trace for our checkout flow, so I can identify which service is causing the bottleneck?

Kubernetes クラスターのイベントを分析します。

Our application deployments seem to be failing intermittently. Can you fetch recent events from our "production-cluster" to help identify what might be causing these deployment issues?

発達

開発目的では、VSCode と GitHub Copilot を使用できます。

まず、ワークスペース.vscode/settings.jsonで Copilot を有効にします。

{ "github.copilot.enable": { "*": true } }

次に、MCP を.vscode/mcp.jsonに追加します。

{ "servers": { "my-dynatrace-mcp-server": { "command": "node", "args": [ "${workspaceFolder}/dist/index.js" ], "envFile": "${workspaceFolder}/.env" } } }

3 番目に、このリポジトリに.envファイルを作成し ( .env.templateからコピーできます)、上記のように環境変数を構成します。

最後に、CoPilot でエージェント モードに切り替えて、ツールをリロードします。

注記

この製品はDynatraceによる公式サポート対象外です。機能のご要望、ご質問、またはサポートが必要な場合は、 GitHub Issuesからお問い合わせください。

-
security - not tested
A
license - permissive license
-
quality - not tested

Dynatrace の可観測性プラットフォームとのリアルタイムのやり取りを可能にし、運用レベルの監視データを開発ワークフローに直接取り込むリモート MCP サーバー。

  1. ユースケース
    1. 機能
      1. クイックスタート
        1. 環境変数
          1. ✨ プロンプト例 ✨
            1. 発達
              1. 注記

                Related MCP Servers

                • -
                  security
                  A
                  license
                  -
                  quality
                  MCP server for interacting with Prometheus metrics and data.
                  Last updated -
                  8
                  JavaScript
                  MIT License
                  • Apple
                • -
                  security
                  F
                  license
                  -
                  quality
                  A configurable MCP server that dynamically loads capabilities from a remote configuration to bridge MCP clients with remote APIs for executing actions, accessing resources, and utilizing prompt templates.
                  Last updated -
                  1,261
                  4
                  TypeScript
                • A
                  security
                  A
                  license
                  A
                  quality
                  The MCP server provides an interface to the Datadog API, enabling seamless management of incidents, monitoring, logs, dashboards, metrics, traces, and hosts. Its extensible design allows easy integration of additional Datadog APIs for future expansions.
                  Last updated -
                  14
                  322
                  36
                  TypeScript
                  Apache 2.0
                  • Apple
                • A
                  security
                  F
                  license
                  A
                  quality
                  An MCP server implementation that enables interaction with the Unstructured API, providing tools to list, create, update, and manage sources, destinations, and workflows.
                  Last updated -
                  39
                  25
                  • Apple

                View all related MCP servers

                ID: 3pwqt25s6z