Skip to content

Commit 7748b9e

Browse files
committed
feat: add Grafana MCP server definition
Signed-off-by: Mohammod Al Amin Ashik <maa.ashik00@gmail.com>
1 parent 70d4335 commit 7748b9e

1 file changed

Lines changed: 115 additions & 0 deletions

File tree

servers/com.grafana-mcp.json

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
{
2+
"$schema": "../schemas/server-definition.schema.json",
3+
"id": "com.grafana-mcp",
4+
"name": "Grafana",
5+
"alias": "grafana",
6+
"description": "Search dashboards, query Prometheus and Loki datasources, manage alerts, and investigate incidents through the official Grafana MCP server.",
7+
"icon": "https://avatars.githubusercontent.com/u/7195757?v=4",
8+
"schema_version": "2.1",
9+
"categories": ["monitoring", "developer-tools"],
10+
"tags": ["grafana", "monitoring", "dashboards", "prometheus", "loki", "alerts", "observability", "metrics"],
11+
12+
"transport": {
13+
"type": "stdio",
14+
"command": "docker",
15+
"args": [
16+
"run", "-i", "--rm",
17+
"-e", "GRAFANA_URL",
18+
"-e", "GRAFANA_SERVICE_ACCOUNT_TOKEN",
19+
"-e", "GRAFANA_USERNAME",
20+
"-e", "GRAFANA_PASSWORD",
21+
"-e", "GRAFANA_ORG_ID",
22+
"grafana/mcp-grafana",
23+
"-t", "stdio"
24+
],
25+
"env": {
26+
"GRAFANA_URL": "${input:GRAFANA_URL}",
27+
"GRAFANA_SERVICE_ACCOUNT_TOKEN": "${input:GRAFANA_TOKEN}",
28+
"GRAFANA_USERNAME": "${input:GRAFANA_USERNAME}",
29+
"GRAFANA_PASSWORD": "${input:GRAFANA_PASSWORD}",
30+
"GRAFANA_ORG_ID": "${input:GRAFANA_ORG_ID}"
31+
},
32+
"metadata": {
33+
"inputs": [
34+
{
35+
"id": "GRAFANA_URL",
36+
"label": "Grafana URL",
37+
"description": "URL of your Grafana instance. Include the protocol (http:// or https://).",
38+
"type": "url",
39+
"required": true,
40+
"secret": false,
41+
"placeholder": "http://localhost:3000"
42+
},
43+
{
44+
"id": "GRAFANA_TOKEN",
45+
"label": "Grafana Service Account Token",
46+
"description": "Service account token with appropriate permissions. Create a service account with the Editor role for full read/write access.",
47+
"type": "password",
48+
"required": true,
49+
"secret": true,
50+
"placeholder": "glsa_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
51+
"obtain": {
52+
"url": "https://grafana.com/docs/grafana/latest/administration/service-accounts/",
53+
"instructions": "1. Go to your Grafana instance\n2. Navigate to Administration > Service accounts\n3. Click 'Add service account'\n4. Assign the 'Editor' role\n5. Click 'Add service account token'\n6. Copy the generated token (starts with glsa_)",
54+
"button_label": "Learn More"
55+
}
56+
},
57+
{
58+
"id": "GRAFANA_USERNAME",
59+
"label": "Grafana Username",
60+
"description": "Username for basic authentication. Use as an alternative to service account token authentication.",
61+
"type": "string",
62+
"required": false,
63+
"secret": false,
64+
"placeholder": "admin"
65+
},
66+
{
67+
"id": "GRAFANA_PASSWORD",
68+
"label": "Grafana Password",
69+
"description": "Password for basic authentication. Used together with GRAFANA_USERNAME.",
70+
"type": "password",
71+
"required": false,
72+
"secret": true
73+
},
74+
{
75+
"id": "GRAFANA_ORG_ID",
76+
"label": "Grafana Organization ID",
77+
"description": "Organization ID for multi-org Grafana setups. Leave empty for single-org instances.",
78+
"type": "string",
79+
"required": false,
80+
"secret": false,
81+
"default": "1",
82+
"placeholder": "1"
83+
}
84+
]
85+
}
86+
},
87+
88+
"auth": {
89+
"type": "api_key",
90+
"instructions": "Create a service account token in your Grafana instance under Administration > Service accounts"
91+
},
92+
93+
"contributor": {
94+
"name": "Grafana Labs",
95+
"github": "grafana",
96+
"url": "https://grafana.com"
97+
},
98+
99+
"links": {
100+
"repository": "https://github.com/grafana/mcp-grafana",
101+
"homepage": "https://grafana.com",
102+
"documentation": "https://github.com/grafana/mcp-grafana#readme"
103+
},
104+
105+
"platforms": ["all"],
106+
107+
"capabilities": {
108+
"tools": true,
109+
"resources": false,
110+
"prompts": false,
111+
"read_only_mode": false
112+
},
113+
114+
"changelog_url": "https://github.com/grafana/mcp-grafana/releases"
115+
}

0 commit comments

Comments
 (0)