oshaani MCP Marketplace
Sign in

← Documentation

Grafana MCP Observability

Search dashboards, inspect panels, run data source queries (Prometheus, Loki, SQL and more) and check alerts in Grafana.

1 credits / tool call

Quick start

  1. Add a Grafana connection with the settings below, then click Test configuration.
  2. Create an API key for your agent.
  3. Paste the key below, click Test endpoint, and copy the configuration for your platform.
Endpointhttps://market.oshaani.com/grafana (your default connection) or https://market.oshaani.com/grafana/<connection-id>
TransportStreamable HTTP (stateless, JSON responses). MCP protocol versions 2024-11-05 to 2025-11-25 and 2026-07-28.
AuthenticationAuthorization: Bearer <API key>, using a key from the API keys page.

Agent configuration

The default URL uses your organisation's default Grafana connection; a URL with an ID pins one connection.
Get a key
The key is filled into the snippets below. It stays in this page and is only sent with the test request.
Runs initialize and tools/list against the endpoint, exactly like an agent. No credits are charged.

Any MCP client that supports remote (Streamable HTTP) servers with custom headers.

{
  "name": "grafana",
  "transport": "streamable-http",
  "url": "https://market.oshaani.com/grafana",
  "headers": {
    "Authorization": "Bearer YOUR_API_KEY"
  }
}

Connection settings

Entered once per connection on market.oshaani.com. Secrets are encrypted and never shown again or sent to agents.

SettingTypeDescription
Grafana URL
url required
string (uri) e.g. https://your-stack.grafana.net
min length 1, max length 2083
Service account token
token required secret
string Administration > Service accounts; the Viewer role is enough
Organization ID
org_id
integer Only needed when the token can see several organizations
min 1
Verify TLS certificate
verify_tls
boolean
default true

Tools (6)

search_dashboards read-only

Search dashboards by title, tag or folder

ArgumentTypeDescription
query string Part of the dashboard title
tag string
limit integer
default 50

min 1, max 500

get_dashboard read-only

Get a dashboard's panels with their data sources and queries, plus its variables

ArgumentTypeDescription
uid required string
pattern ^[\w-]{1,64}$

list_datasources read-only

List configured data sources and their UIDs

No arguments.

query_datasource read-only

Run a query against a data source (PromQL, LogQL, SQL, Lucene...) and return the results as tables

ArgumentTypeDescription
datasource_uid required string
pattern ^[\w-]{1,64}$
query required string Query in the data source's language, e.g. sum(rate(http_requests_total[5m]))
min length 1
time_from string
default "now-1h"
Grafana time, e.g. now-1h, now-7d, now, or epoch milliseconds
time_to string
default "now"
Grafana time, e.g. now-1h, now-7d, now, or epoch milliseconds
max_data_points integer
default 300

min 1, max 5000
instant boolean
default false
Prometheus only: evaluate at a single point in time
extra object Extra fields for the query target, for data sources not covered by 'query'
max_rows integer
default 500

min 1, max 5000

list_alert_rules read-only

List Grafana-managed alert rules

No arguments.

list_firing_alerts read-only

List alerts that are currently firing

No arguments.

Billing & errors

Each successful tool call costs 1 oshaani.com credit. initialize, tools/list, failed calls and timeouts are free.

JSON-RPC codeMeaning
-32054 (HTTP 401)Missing, unknown or revoked API key
-32053 (HTTP 404)No Grafana connection configured for your organisation, or the connection ID is wrong
-32055 (HTTP 403)Connection disabled or origin not allowed
-32052 (HTTP 429)Rate limit reached; retry after a minute
-32050Not enough oshaani.com credits for the call
-32051Billing temporarily unavailable; the call was not run

Errors from Grafana itself (bad IDs, permissions) come back as tool results with isError: true so the agent can read and correct them. See the Grafana API documentation.