• Projects
  • Service
  • About
  • branding.bz
  • Podcast
  • Tips
  • FAQ
  • Recruit
  • Download
  • Contact
  • branding.bz(ブランド構築SaaS)
  • DESIGN NOW(デザインメディア)
  • X
  • LinkedIn
  • Spotify
  • Facebook

213-0011 神奈川県川崎市高津区久本3-6-7-303

© 2026 ID INC. All rights reserved

claude-skills/スキル
SKILLOfficialmonitoring

grafana-cloud-mcp-tools

プラグイン
grafana-cloud-mcp
ソース
GitHub で見る ↗
説明

Grafana Cloud MCP サーバー(クラウドベースの監視・分析ツール連携機能)に接続し、効果的に活用するためのスキルです。自然な言葉での Grafana アシスタント(AI搭載の質問機能)への質問や、システムの健全性調査に対応しています。 セットアップ、OAuth 認証(ユーザー認証の仕組み)、各ツールの種類、読み書きアクセス権限、コンテキストウィンドウ(会話履歴の保存範囲)の管理に関するベストプラクティス(実用的な手法)を網羅しています。 次のような場合に使用: - Grafana Cloud MCP のセットアップを行いたい - Grafana アシスタントに質問したい - メトリクス(数値データ)、ログ(記録)、トレース(処理の流れ)、プロファイル(詳細な性能データ)、ダッシュボード(監視画面)、アラート、またはインシデント(障害)を調査したい - どのツールを使うべきか迷っている - アクセス権限の範囲について理解したい

原文を表示

Connect to and use the Grafana Cloud MCP server effectively, including natural-language Grafana Assistant questions and observability investigations. Covers setup, OAuth authorization, tool categories, read/write access scopes, and best practices for context window management. Use when the user wants to set up Grafana Cloud MCP, ask Grafana Assistant a question, investigate metrics, logs, traces, profiles, dashboards, alerts, or incidents, needs guidance on which tool to use, or wants to understand access scopes.

ユースケース
  • Grafana Cloud MCP のセットアップを行いたい
  • Grafana アシスタントに質問したい
  • メトリクス・ログ・トレースを調査したい
  • どのツールを使うべきか迷っている
  • アクセス権限の範囲を理解したい
本文(日本語訳)

Grafana Cloud MCP サーバー

Grafana Cloud 用のホスト型 MCP サーバーであり、60 個以上の Grafana Cloud ツールを Streamable HTTP トランスポート(通信方式)と OAuth 2.1 認可を通じて提供します。

前提条件

  • Grafana Cloud アカウント(自分でホストするタイプのユーザーはローカルの OSS MCP サーバーを使用してください)
  • Assistant Cloud MCP User ロール、または grafana-assistant-app.cloud-mcp:access 権限(Editor ロール以上は初期状態で保有)
  • 管理者が Grafana Assistant の利用規約に同意していること

設定

Cloud MCP サーバーは https://mcp.grafana.com/mcp を通じて Streamable HTTP トランスポートで接続します。ローカルへのインストールや環境変数の設定は不要です。

セットアップ手順

  1. プラグインが読み込まれると、MCP サーバーが自動的に接続します。
  2. 指示されたら、Grafana Cloud の URL を入力し、ブラウザで接続を認可します。
  3. OAuth トークンは 1 時間有効で、30 日間は自動的に更新されます。

読み取り・書き込みアクセス

認可時に、許可する権限を選択できます:

  • 読み取りアクセス: ダッシュボード、アラート、インシデント(事象)を表示し、データソースをクエリできます。常に利用可能です。
  • 書き込みアクセス: ダッシュボード、アラート、インシデントを作成・編集できます。このオプションを外すと、読み取り専用になります。

Organization Admin は既定で書き込みアクセスを付与できます。同意画面で書き込みアクセスが無効な場合、ユーザーは Assistant Admin ロールが必要です。

ツール分類

検索とナビゲーション

  • search_dashboards — クエリ文字列でダッシュボードを検索
  • search_folders — クエリ文字列でフォルダを検索
  • generate_deeplink — ダッシュボード、パネル、Explore クエリ用の直リンク URL を生成

ダッシュボードとフォルダ

  • get_dashboard_by_uid — UID で完全なダッシュボード JSON を取得
  • get_dashboard_summary — 完全な JSON なしのコンパクトな要約(推奨)
  • get_dashboard_property — JSONPath で特定部分を抽出
  • get_dashboard_panel_queries — テンプレート変数置換後のパネルクエリを取得
  • update_dashboard — ダッシュボードを作成または更新(書き込み)
  • create_folder — Grafana フォルダを作成(書き込み)

データソース

  • list_datasources — 設定済みのすべてのデータソースをリスト化(タイプでフィルタ可)
  • get_datasource — UID または名前で詳細情報を取得

Prometheus

  • list_prometheus_metric_names — 正規表現でフィルタ可能なメトリクスを発見
  • list_prometheus_metric_metadata — 現在スクレイプ中のメトリクスについてメタデータをリスト化
  • list_prometheus_label_names — ラベル名をリスト化(系列セレクタでフィルタ可)
  • list_prometheus_label_values — 特定ラベルの値を取得
  • query_prometheus — PromQL(Prometheus クエリ言語)の瞬間値またはレンジクエリを実行
  • query_prometheus_histogram — ヒストグラムのパーセンタイル値をクエリ

Loki

  • list_loki_label_names — ログで利用可能なラベル名をリスト化
  • list_loki_label_values — 特定ラベルの一意の値を取得
  • query_loki_logs — LogQL(Loki クエリ言語)でログエントリまたはメトリクス値を取得
  • query_loki_stats — ログストリームの統計情報を取得
  • query_loki_patterns — 共通のログパターンを検出・分析

Tempo

Tempo データソースがある場合、Cloud MCP サーバーは Tempo データソースのツール(TraceQL クエリと属性発見を含む)をプロキシします。

Pyroscope

  • list_pyroscope_label_names — プロファイル内で利用可能なラベル名をリスト化
  • list_pyroscope_label_values — 特定ラベルの値をリスト化
  • list_pyroscope_profile_types — 利用可能なプロファイルタイプをリスト化
  • query_pyroscope — Pyroscope からプロファイルまたはメトリクスをクエリ

ClickHouse

  • list_clickhouse_tables — メタデータ付きで利用可能なテーブルをリスト化
  • describe_clickhouse_table — テーブルのカラムスキーマを取得
  • query_clickhouse — ClickHouse データソースに対して SQL クエリを実行

CloudWatch

  • list_cloudwatch_namespaces — AWS の利用可能な名前空間をリスト化
  • list_cloudwatch_metrics — 名前空間内のメトリクスをリスト化
  • list_cloudwatch_dimensions — メトリクスの次元キーをリスト化
  • query_cloudwatch — AWS CloudWatch メトリクスをクエリ

Elasticsearch

  • query_elasticsearch — Lucene または Query DSL 検索を実行

アラート

  • alerting_manage_rules — アラートルールをリスト化、フィルタ、作成、更新(読み取り / 書き込み)
  • alerting_manage_routing — ルーティング設定、通知ポリシー、連絡先を表示(読み取り)

アノテーション

  • get_annotations — ダッシュボード UID、時間範囲、またはタグでフィルタしたアノテーションを取得
  • get_annotation_tags — アノテーションタグを取得(フィルタ可)
  • create_annotation — 新しいアノテーションを作成(書き込み)
  • update_annotation — 既存のアノテーションを更新(書き込み)

インシデント

  • list_incidents — インシデントをリスト化(ステータスでフィルタ可)
  • get_incident — ID で完全なインシデント詳細を取得
  • create_incident — 新しいインシデントを作成(書き込み)
  • add_activity_to_incident — インシデントのタイムラインにメモを追加(書き込み)

OnCall

  • list_oncall_schedules — OnCall スケジュールをリスト化(チームでフィルタ可)
  • get_oncall_shift — 詳細なシフト情報を取得
  • get_current_oncall_users — スケジュール内で現在オンコール中のユーザーを取得
  • list_oncall_teams — OnCall チームをリスト化
  • list_oncall_users — OnCall ユーザーをリスト化(フィルタ可)
  • list_alert_groups — アラートグループをリスト化(フィルタ可)
  • get_alert_group — ID で特定のアラートグループを取得

Sift

  • list_sift_investigations — Sift 調査をリスト化
  • get_sift_investigation — UUID で Sift 調査を取得
  • get_sift_analysis — 調査から特定の分析結果を取得
  • find_error_pattern_logs — エラーパターンが増加している Loki ログを検索(書き込み)
  • find_slow_requests — 低速なリクエストを Tempo データソースで検索(書き込み)

その他のツール

  • ask_assistant — Grafana Assistant にプロンプトを送信して完全な回答を取得(書き込み)
  • get_assertions — エンティティの Assertion(状態確認)サマリーを取得
  • get_panel_image — ダッシュボードパネルを PNG 画像としてレンダリング
  • describe_infrastructure — サービスグループの事前構築サマリーを取得
  • get_query_examples — データソースタイプのクエリ例を取得

ベストプラクティス

Grafana Assistant への質問

  • 自由形式の自然言語での質問(「チェックアウトのレイテンシーが急上昇しているのはなぜ?」、「現在のインシデントをまとめて」、「このアラートを説明して」など)には、ask_assistant を使用して Grafana Assistant に調査を計画させ、根拠のある回答を得てください。ask_assistant は書き込み権限が必要で、grafana:write が必要です。
  • OAuth 認可時に書き込みアクセスが付与されていない場合、ask_assistant は利用できません。対応する読み取り専用ツール(例: describe_infrastructure、get_assertions、query_prometheus、query_loki_logs、list_incidents)を使用し、ユーザーに自然言語 Assistant ツールは書き込み権限が必要であることを伝えてください。再認可で書き込み権限を付与するには、ユーザーが Assistant Admin ロールまたは grafana-assistant-app.cloud-mcp.scope:write 権限を持つか、Grafana Organization 管理者が先に付与する必要があります。
  • 特定の標的的な検索(既知のクエリ、ダッシュボード、アラート、インシデント)の場合は、ask_assistant を経由せず、対応するツールを直接呼び出してください。

コンテキストウィンドウの管理

  • 完全なダッシュボード JSON でコンテキストを消費しないよう、get_dashboard_by_uid の代わりに get_dashboard_summary を使用してください。
  • 必要な特定部分だけを抽出するため、get_dashboard_property に JSONPath を指定してください。
  • UID で取得する前に、search_dashboards でダッシュボードを発見してください。
  • Grafana データを提示する際は、ナビゲーション手順を説明する代わりに、generate_deeplink でクリック可能な URL を提供してください。

クエリ実行

  • Prometheus をクエリする場合、結果が増えすぎないよう合理的な時間範囲を常に指定してください。
  • Loki をクエリする場合、広すぎるクエリより、ラベルマッチャーで対象を絞った LogQL セレクタを使用してください。
  • クエリを書く前に、データソース発見ツール(list_datasources、list_prometheus_metric_names)を使用してください。

安全性

  • ユーザーから明示的に依頼されない限り、書き込み操作(update_dashboard、create_incident、alerting_manage_rules)は避けてください。
  • OAuth 認可時に書き込みアクセスが付与されていない場合、書き込みツールは利用できません。

アクセスと権限

  • アクセスはユーザースコープです。エージェントは Grafana RBAC(ロールベースアクセス制御)があなたに付与した権限のみを持ちます。
  • Cloud MCP サーバーの使用には Assistant Cloud MCP User ロールまたは grafana-assistant-app.cloud-mcp:access 権限が必要です。Editor 以上は既定で保有し、それ以外のロールは明示的に付与できます。
  • 書き込みツールには grafana:write OAuth スコープが必要で、OAuth 同意時に付与されます。そのスコープの付与そのものは Grafana RBAC で制限されており、ユーザーが Assistant Admin ロールまたは grafana-assistant-app.cloud-mcp.scope:write 権限を持つか、書き込み権限付きの接続を認可する必要があります。読み取り専用アクセスには不要です。
原文(English)を表示

Grafana Cloud MCP Server

Hosted MCP server providing 60+ Grafana Cloud tools via Streamable HTTP transport with OAuth 2.1 authorization.

Prerequisites

  • Grafana Cloud account (self-hosted users should use the local OSS MCP server instead)
  • Assistant Cloud MCP User role or grafana-assistant-app.cloud-mcp:access permission (Editor role or higher has this by default)
  • An administrator must have accepted the Grafana Assistant terms and conditions

Configuration

The Cloud MCP server connects via https://mcp.grafana.com/mcp using Streamable HTTP transport. No local installation or environment variables are required.

Setup steps

  1. The MCP server connects automatically when the plugin loads.
  2. When prompted, enter your Grafana Cloud URL and authorize the connection in your browser.
  3. Your OAuth token is valid for 1 hour and refreshes automatically for 30 days.

Read and write access

When authorizing, you choose which permissions to grant:

  • Read access: View dashboards, alerts, incidents, and query data sources. Always available.
  • Write access: Create and modify dashboards, alerts, and incidents. You can uncheck this to grant read-only access.

Organization Admins can grant write access by default. If write access is disabled on the consent page, the user needs the Assistant Admin role.

Tool categories

Search and navigation

  • search_dashboards — search for dashboards by query string
  • search_folders — search for folders by query string
  • generate_deeplink — generate deeplink URLs for dashboards, panels, and Explore queries

Dashboards and folders

  • get_dashboard_by_uid — retrieve the complete dashboard JSON by UID
  • get_dashboard_summary — compact summary without full JSON (preferred)
  • get_dashboard_property — extract specific parts via JSONPath
  • get_dashboard_panel_queries — retrieve panel queries with template variable substitution
  • update_dashboard — create or update a dashboard (Write)
  • create_folder — create a Grafana folder (Write)

Datasources

  • list_datasources — list all configured data sources with optional type filtering
  • get_datasource — get detailed information by UID or name

Prometheus

  • list_prometheus_metric_names — discover available metrics with regex filtering
  • list_prometheus_metric_metadata — list metadata about currently scraped metrics
  • list_prometheus_label_names — list label names with optional series selector
  • list_prometheus_label_values — get values for a specific label
  • query_prometheus — execute PromQL instant or range queries
  • query_prometheus_histogram — query histogram percentiles

Loki

  • list_loki_label_names — list available label names in logs
  • list_loki_label_values — get unique values for a specific label
  • query_loki_logs — execute LogQL queries for log entries or metric values
  • query_loki_stats — get statistics about log streams
  • query_loki_patterns — detect and analyze common log patterns

Tempo

If you have Tempo data sources, the Cloud MCP server proxies tools from the Tempo data source, including TraceQL queries and attribute discovery.

Pyroscope

  • list_pyroscope_label_names — list available label names in profiles
  • list_pyroscope_label_values — list values for a specific label
  • list_pyroscope_profile_types — list available profile types
  • query_pyroscope — query profiles or metrics from Pyroscope

ClickHouse

  • list_clickhouse_tables — list available tables with metadata
  • describe_clickhouse_table — get column schema for a table
  • query_clickhouse — execute SQL queries against ClickHouse datasources

CloudWatch

  • list_cloudwatch_namespaces — list available AWS namespaces
  • list_cloudwatch_metrics — list metrics for a namespace
  • list_cloudwatch_dimensions — list dimension keys for a metric
  • query_cloudwatch — query AWS CloudWatch metrics

Elasticsearch

  • query_elasticsearch — execute Lucene or Query DSL searches

Alerting

  • alerting_manage_rules — list, filter, create, and update alert rules (Read / Write)
  • alerting_manage_routing — view routing configuration, notification policies, contact points (Read)

Annotations

  • get_annotations — fetch annotations filtered by dashboard UID, time range, or tags
  • get_annotation_tags — get annotation tags with optional filtering
  • create_annotation — create a new annotation (Write)
  • update_annotation — update an existing annotation (Write)

Incidents

  • list_incidents — list incidents with optional status filtering
  • get_incident — get full incident details by ID
  • create_incident — create a new incident (Write)
  • add_activity_to_incident — add a note to an incident's timeline (Write)

OnCall

  • list_oncall_schedules — list OnCall schedules with optional team filtering
  • get_oncall_shift — get detailed shift information
  • get_current_oncall_users — get users currently on-call for a schedule
  • list_oncall_teams — list OnCall teams
  • list_oncall_users — list OnCall users with optional filtering
  • list_alert_groups — list alert groups with filtering
  • get_alert_group — get a specific alert group by ID

Sift

  • list_sift_investigations — list Sift investigations
  • get_sift_investigation — retrieve a Sift investigation by UUID
  • get_sift_analysis — retrieve a specific analysis from an investigation
  • find_error_pattern_logs — search Loki logs for elevated error patterns (Write)
  • find_slow_requests — search Tempo datasources for slow requests (Write)

Other tools

  • ask_assistant — send a prompt to Grafana Assistant and get the full reply (Write)
  • get_assertions — get assertion summary for an entity
  • get_panel_image — render a dashboard panel as a PNG image
  • describe_infrastructure — retrieve pre-built summaries of service groups
  • get_query_examples — get example queries for datasource types

Best practices

Grafana Assistant questions

  • For open-ended, natural-language requests ("Why is checkout latency spiking?", "Summarize the current incident", "Explain this alert"), use ask_assistant to let Grafana Assistant plan the investigation and return a grounded reply. ask_assistant is write-scoped and requires grafana:write.
  • If write access was not granted during OAuth authorization, ask_assistant is unavailable. Fall back to the appropriate read-only tools (for example describe_infrastructure, get_assertions, query_prometheus, query_loki_logs, list_incidents) and tell the user that the natural-language Assistant tool needs write scope. Re-authorizing only grants write if the user has the Assistant Admin role or the grafana-assistant-app.cloud-mcp.scope:write permission; otherwise a Grafana organization administrator must grant it first.
  • For specific, targeted lookups (a known query, dashboard, alert, or incident), call the corresponding tool directly rather than routing through ask_assistant.

Context window management

  • Use get_dashboard_summary instead of get_dashboard_by_uid to avoid consuming context with full dashboard JSON.
  • Use get_dashboard_property with JSONPath to extract only the specific parts you need.
  • Use search_dashboards to discover dashboards before retrieving by UID.
  • When presenting Grafana data, use generate_deeplink to provide clickable URLs rather than describing navigation steps.

Querying

  • When querying Prometheus, always specify a reasonable time range to avoid overwhelming results.
  • When querying Loki, prefer targeted LogQL selectors with label matchers over broad queries.
  • Use datasource discovery tools (list_datasources, list_prometheus_metric_names) before writing queries.

Safety

  • Avoid write operations (update_dashboard, create_incident, alerting_manage_rules) unless explicitly asked by the user.
  • If write access was not granted during OAuth authorization, write tools will not be available.

Access and permissions

  • Access is user-scoped: the agent has only the permissions your Grafana RBAC grants you.
  • Using the Cloud MCP server requires the Assistant Cloud MCP User role or the grafana-assistant-app.cloud-mcp:access permission. Editor and higher have this by default; other roles can be granted it explicitly.
  • Write tools require the grafana:write OAuth scope, granted during OAuth consent. Granting that scope is itself gated by Grafana RBAC: the user needs the Assistant Admin role or the grafana-assistant-app.cloud-mcp.scope:write permission to authorize a write-scoped connection. Read-only access does not require it.

原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。