Overview
Grafana MCP server is a Model Context Protocol (MCP) server designed to provide access to Grafana instances and their surrounding ecosystem.
To use the Grafana MCP server, create a service account in Grafana with the necessary permissions, generate a service account token, and configure your client with the server settings.
- Search for dashboards - List and fetch datasource information - Query Prometheus metadata and metrics - Manage incidents within Grafana - Configurable tool availability for the MCP client
- Searching and managing Grafana dashboards.
- Fetching and querying data from various datasources like Prometheus.
- Handling incidents and activities within Grafana.
Add to your AI client
Use these steps to connect Grafana MCP server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"mcp-grafana-grafana": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-grafana-grafana"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"mcp-grafana-grafana": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-grafana-grafana"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"mcp-grafana-grafana": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-grafana-grafana"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"mcp-grafana-grafana": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-grafana-grafana"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mcp-grafana-grafana": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-grafana-grafana"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"mcp-grafana-grafana": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-grafana-grafana"
]
}
}
}FAQ
What is the purpose of the Grafana MCP server?
It provides a structured way to access and manage Grafana instances and their data sources.
Is it necessary to have a service account?
Yes, a service account with appropriate permissions is required to use the server effectively.
Can I disable certain tools in the MCP client?
Yes, you can configure which tools to enable or disable in the client settings.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":841,"uuid":"515750b4-a9f5-4f08-a4ef-ce3a70a0e4fe","name":"mcp-grafana","title":"Grafana MCP server","description":"MCP server for Grafana","avatar_url":"https://avatars.githubusercontent.com/u/7195757?v=4","created_at":"2025-01-28T02:14:03.222Z","updated_at":"2025-02-23T07:12:48.418Z","status":"created","author_name":"grafana","author_avatar_url":"https://avatars.githubusercontent.com/u/7195757?v=4","tags":"[]","category":"monitoring","is_featured":false,"sort":1,"url":"https://github.com/grafana/mcp-grafana","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"881\",\"license\":\"Apache-2.0 license\",\"language\":\"Go\",\"is_official\":false,\"latest_commit_time\":\"2025-06-04 10:50:51\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]