Set up Grafana in Metorial for Claude, ChatGPT and Cursor
Share Grafana with your team in Claude, ChatGPT and Cursor through Metorial: service account token or basic authentication sign-in, 54 tools (20 read-only).
To give your team Grafana in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Grafana integration in a Metorial portal, and each person connects with a service account token. Agents can manage dashboards, data sources, alerts, and observability resources in Grafana. The integration has 54 tools, 20 read-only, 22 write and 12 destructive, plus 2 triggers.
What you'll learn
- How an admin shares Grafana in a portal and how each person connects
- What Grafana asks for when you connect, and where to find it
- How to keep the 20 read-only tools and reject the other 34
Before you start
- A portal with at least one access group
- A service account token from Grafana for each person, or one for a shared connection
- For the CLI steps: the Metorial CLI, signed in to your portal
Sign-in methods
| Method | Type | What a person provides |
|---|---|---|
| Service Account Token (default) | API token | instanceUrl and token |
| Basic Authentication | Custom credentials | instanceUrl, username and password |
The portal and metorial setup use Service Account Token unless someone picks another method.
Service Account Token
To connect, a person enters these values:
instanceUrl: Base URL of the Grafana instance, e.g. https://your-grafana.grafana.nettoken: Grafana Service Account token. Create one under Administration > Users and access > Service Accounts.
Basic Authentication
To connect, a person enters these values:
instanceUrl: Base URL of the Grafana instance, e.g. https://your-grafana.grafana.netusername: Grafana usernamepassword: Grafana password
Setup settings
Whichever method you pick, setup also asks for:
instanceUrl: Base URL of the Grafana instance, e.g. https://your-grafana.grafana.net or https://grafana.example.com. Do not include a trailing slash or /api path.organizationId(optional): Organization ID to scope API requests to. If not set, the default organization context is used.apiNamespace(optional): Grafana App Platform namespace for /apis endpoints. Defaults to "default" for org 1 or org-<organizationId> when organizationId is set. Grafana Cloud stacks can use stacks-<stack_id>.
Admin: share Grafana in a portal
In the dashboard
Open Shared Resources
Open Workforce, choose the portal, and select Shared Resources under Access.
Share a new integration
Select Share a Resource, then New Integration, and choose Grafana. Under Auth Method, keep Service Account Token or pick another. For how members connect, choose Each person connects so everyone enters their own service account token, or Shared connection to enter one service account token for everyone.
Limit the tools
Under Tool Filters, set the write and destructive groups to Reject if agents should only read from Grafana.
Choose who gets it
Add the access groups that should see Grafana. When a person asks for access from the portal, the request appears under Access Requests.
With the CLI
The CLI cannot create the per-user Grafana integration. Once it exists, check which groups have it:
Employee: connect Grafana
In the portal
Open Grafana in the catalog
Sign in to your portal and open Grafana. The status reads Available.
Authenticate
Under Quick setup, select Authenticate. In the setup window, enter your service account token (instanceUrl and token).
Confirm
The status changes to Configured. If it later reads Needs reconnect, select Reconnect and sign in again.
With the CLI
catalog search prints the catalog item ID. metorial setup uses Service Account Token. To connect with Basic Authentication instead, find its ID with metorial catalog get <catalog-item-id> and add --auth-method <auth-method-id>.
Add it to your AI client
metorial install adds your Grafana connection to a local MCP client such as Claude Code, Cursor or Codex. metorial list prints the integration ID and metorial client list the client identifiers.
For a client that takes a server URL, such as ChatGPT, metorial install custom <integration-id> creates an installation token and shows the endpoint details.
Make it read-only
Open the integration's Tool Filters and set the write and destructive groups to Reject. Agents keep the 20 read-only tools, such as get_team and get_folder, and lose the 22 write tools, such as create_team or update_team, and the 12 destructive tools, such as delete_team or delete_folder.
Employees see the result on the integration's page in the portal under Tool access. For the full walkthrough, see Tool permissions.
Check it worked
metorial tools lists the 54 tools, minus any you rejected. list_org_users takes no input. It lists all users in the current organization with their roles.
To see every input a tool takes, run metorial schema <integration-id> <tool-key>.
Tools
Read-only tools (20)
get_dashboard: Retrieve a dashboard by its UID, including the full dashboard model, metadata, folder information, and version history details. NeedsdashboardUid.find_annotations: Search and filter annotations in Grafana.get_alert_rule: Retrieve a specific alert rule by its UID, including full condition configuration, labels, and annotations. NeedsruleUid.get_team_members: List all members of a team by team ID. NeedsteamId.get_notification_policies: Retrieve the notification policy tree that controls how alerts are routed to contact points.get_data_source: Retrieve detailed information about a specific data source by its UID, including connection settings and configuration. NeedsdataSourceUid.list_contact_points: List all contact points configured for alert notifications.list_folders: List all folders in the Grafana instance.list_alert_rules: List all Grafana-managed alert rules configured in the instance, including their conditions, evaluation intervals, and notification settings.search_teams: Search and list teams in the current organization.search_dashboards: Search and list dashboards in Grafana.list_snapshots: List dashboard snapshots.list_data_sources: List all configured data sources in the Grafana instance, including their types, URLs, and connection details.list_org_users: List all users in the current organization with their roles.get_team: Retrieve a Grafana team by ID, including its name, email, and timestamps. NeedsteamId.list_mute_timings: List alert notification mute timings configured in Grafana.list_playlists: List Grafana playlists.get_folder: Retrieve a folder by UID, including its title, URL, parent folder, and version metadata. NeedsfolderUid.get_playlist: Retrieve a Grafana playlist by UID, including its rotation interval and dashboard selectors. NeedsplaylistUid.get_mute_timing: Retrieve a mute timing by name, including its configured recurring time intervals and provenance. Needsname.
Write tools (22)
update_alert_rule: Update an existing Grafana-managed alert rule. NeedsruleUid,title,folderUid,ruleGroup,conditionandqueries.create_annotation: Create a new annotation to mark an event on a dashboard or across the organization. Needstext.update_folder: Update a folder's title by its UID. NeedsfolderUidandtitle.create_contact_point: Create a new contact point for alert notifications. Needsname,typeandsettings.create_folder: Create a new folder for organizing dashboards. Needstitle.create_snapshot: Create a dashboard snapshot for sharing. Needsdashboard.create_data_source: Create a new data source connection. Needsnameandtype.create_alert_rule: Create a new Grafana-managed alert rule. Needstitle,folderUid,ruleGroup,conditionandqueries.update_org_user_role: Change a user's role within the current organization. NeedsuserIdandrole.save_dashboard: Create a new dashboard or update an existing one. Needsdashboard.update_notification_policies: Update the notification policy tree. Needsreceiver.add_org_user: Add a user to the current organization with a specified role. NeedsloginOrEmailandrole.create_team: Create a new team in the current organization. Needsname.add_team_member: Add a user to a team by their user ID. NeedsteamIdanduserId.update_data_source: Update an existing data source's configuration by its UID. NeedsdataSourceUid.update_annotation: Update an existing annotation's text, tags, or time range. NeedsannotationId.create_mute_timing: Create a mute timing for Grafana alert notification policies. NeedsnameandtimeIntervals.update_contact_point: Update an existing alert notification contact point by UID. NeedscontactPointUid,name,typeandsettings.update_team: Update a Grafana team's name and optional email address by ID. NeedsteamIdandname.create_playlist: Create a Grafana playlist that cycles through dashboards selected by UID or tag. NeedsplaylistUid,title,intervalanditems.update_playlist: Replace an existing Grafana playlist definition. NeedsplaylistUid,title,intervalanditems.update_mute_timing: Replace an existing mute timing by name. NeedsnameandtimeIntervals.
Destructive tools (12)
delete_alert_rule: Delete a Grafana-managed alert rule by its UID. NeedsruleUid.delete_annotation: Delete an annotation by its ID. NeedsannotationId.delete_folder: Delete a folder and optionally all alert rules within it. NeedsfolderUid.remove_team_member: Remove a user from a team. NeedsteamIdanduserId.delete_data_source: Permanently delete a data source by its UID. NeedsdataSourceUid.delete_contact_point: Delete a contact point by its UID. NeedscontactPointUid.remove_org_user: Remove a user from the current organization. NeedsuserId.delete_snapshot: Delete a dashboard snapshot by its key. Needskey.delete_dashboard: Permanently delete a dashboard by its UID. NeedsdashboardUid.delete_team: Delete a team by its ID. NeedsteamId.delete_mute_timing: Delete a mute timing by name. Needsname.delete_playlist: Delete a Grafana playlist by UID. NeedsplaylistUid.
Triggers
Grafana has 2 triggers, which fire on events in Grafana:
alert_notification: Receives Grafana alert notifications via webhook.annotation_events: [Polling fallback] Polls for new annotations in Grafana.
Next steps
- Claude Code, Cursor, Codex and ChatGPT: connect each client to your portal and use Grafana there
- Tool permissions: tool filters and what employees see
- Grafana on metorial.com: the integration overview