📊grafana-cloud-mcp-tools
- プラグイン
- Grafana Cloud MCP
- ソース
- GitHub で見る ↗
説明
Grafana Cloud MCP サーバーに接続して効果的に活用する方法をまとめたドキュメントです。 セットアップ(初期設定)、OAuth認可(ユーザー確認)、ツールの分類、読み書きアクセスの権限範囲、そしてコンテキストウィンドウ(処理できる情報量)の管理に関するベストプラクティス(推奨される使い方)をカバーしています。 次のような場合に使用: - Grafana Cloud MCP のセットアップを始めたい - どのツールを使うべきか迷っている - アクセス権限の範囲について理解したい
原文を表示
Connect to and use the Grafana Cloud MCP server effectively. 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, needs guidance on which tool to use, or wants to understand access scopes.
ユースケース
- ✓Grafana Cloud MCP のセットアップを始めるとき
- ✓使用するツールを選択するとき
- ✓アクセス権限の範囲を理解したいとき
本文(日本語訳)
Grafana Cloud MCP サーバー
Grafana Cloud の60以上のツールを提供するホスト型MCP サーバーで、ストリーミング可能な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 経由でストリーミング可能なHTTP通信を使用して接続します。ローカルインストールや環境変数は不要です。
セットアップ手順
- MCP サーバーはプラグイン読み込み時に自動接続します。
- 求められたら、Grafana Cloud のURLを入力し、ブラウザで接続を認可します。
- OAuth トークンは1時間有効で、30日間は自動更新されます。
読み取りと書き込みアクセス
認可時に、付与する権限を選択できます:
- 読み取りアクセス: ダッシュボード、アラート、インシデント(重大事象)の表示、およびデータソースのクエリ実行が可能。常に利用可能です。
- 書き込みアクセス: ダッシュボード、アラート、インシデントの作成・変更が可能。チェックを外すことで、読み取り専用にできます。
Organization 管理者はデフォルトで書き込みアクセスを付与できます。同意画面で書き込みアクセスが無効な場合、ユーザーは 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(クエリ言語)のインスタント/範囲クエリを実行query_prometheus_histogram— ヒストグラムのパーセンタイルをクエリ
Loki
list_loki_label_names— ログで利用可能なラベル名を一覧表示list_loki_label_values— 特定ラベルの一意の値を取得query_loki_logs— LogQL(ログクエリ言語)でログエントリまたはメトリクス値を実行query_loki_stats— ログストリーム(ログの流れ)に関する統計を取得query_loki_patterns— ログの共通パターンを検出・分析
Tempo
Tempo データソースがある場合、Cloud MCP サーバーは TraceQL クエリと属性検出を含むTempo データソースツールをプロキシします。
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— エンティティのアサーション(検証条件)要約を取得get_panel_image— ダッシュボードパネルをPNG 画像としてレンダリング(描画)describe_infrastructure— サービスグループの事前構築要約を取得get_query_examples— データソースタイプのクエリ例を取得
ベストプラクティス
コンテキストウィンドウの管理
- 完全なダッシュボード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 サーバーの使用には Editor ロール以上が必要です。
- 書き込みツールは OAuth 同意時に付与される
grafana: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:accesspermission (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
- The MCP server connects automatically when the plugin loads.
- When prompted, enter your Grafana Cloud URL and authorize the connection in your browser.
- 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 stringsearch_folders— search for folders by query stringgenerate_deeplink— generate deeplink URLs for dashboards, panels, and Explore queries
Dashboards and folders
get_dashboard_by_uid— retrieve the complete dashboard JSON by UIDget_dashboard_summary— compact summary without full JSON (preferred)get_dashboard_property— extract specific parts via JSONPathget_dashboard_panel_queries— retrieve panel queries with template variable substitutionupdate_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 filteringget_datasource— get detailed information by UID or name
Prometheus
list_prometheus_metric_names— discover available metrics with regex filteringlist_prometheus_metric_metadata— list metadata about currently scraped metricslist_prometheus_label_names— list label names with optional series selectorlist_prometheus_label_values— get values for a specific labelquery_prometheus— execute PromQL instant or range queriesquery_prometheus_histogram— query histogram percentiles
Loki
list_loki_label_names— list available label names in logslist_loki_label_values— get unique values for a specific labelquery_loki_logs— execute LogQL queries for log entries or metric valuesquery_loki_stats— get statistics about log streamsquery_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 profileslist_pyroscope_label_values— list values for a specific labellist_pyroscope_profile_types— list available profile typesquery_pyroscope— query profiles or metrics from Pyroscope
ClickHouse
list_clickhouse_tables— list available tables with metadatadescribe_clickhouse_table— get column schema for a tablequery_clickhouse— execute SQL queries against ClickHouse datasources
CloudWatch
list_cloudwatch_namespaces— list available AWS namespaceslist_cloudwatch_metrics— list metrics for a namespacelist_cloudwatch_dimensions— list dimension keys for a metricquery_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 tagsget_annotation_tags— get annotation tags with optional filteringcreate_annotation— create a new annotation (Write)update_annotation— update an existing annotation (Write)
Incidents
list_incidents— list incidents with optional status filteringget_incident— get full incident details by IDcreate_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 filteringget_oncall_shift— get detailed shift informationget_current_oncall_users— get users currently on-call for a schedulelist_oncall_teams— list OnCall teamslist_oncall_users— list OnCall users with optional filteringlist_alert_groups— list alert groups with filteringget_alert_group— get a specific alert group by ID
Sift
list_sift_investigations— list Sift investigationsget_sift_investigation— retrieve a Sift investigation by UUIDget_sift_analysis— retrieve a specific analysis from an investigationfind_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 entityget_panel_image— render a dashboard panel as a PNG imagedescribe_infrastructure— retrieve pre-built summaries of service groupsget_query_examples— get example queries for datasource types
Best practices
Context window management
- Use
get_dashboard_summaryinstead ofget_dashboard_by_uidto avoid consuming context with full dashboard JSON. - Use
get_dashboard_propertywith JSONPath to extract only the specific parts you need. - Use
search_dashboardsto discover dashboards before retrieving by UID. - When presenting Grafana data, use
generate_deeplinkto 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.
- Editor role or higher is required to use the Cloud MCP server.
- Write tools require the
grafana:writescope, granted during OAuth consent.
原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。