{"id":27948,"library":"mcp-grafana","title":"mcp-grafana","description":"MCP server for Grafana – enables AI agents to interact with Grafana via the Model Context Protocol. Current version: 0.14.0. Released roughly monthly by Grafana Labs.","status":"active","version":"0.14.0","language":"python","source_language":"en","source_url":"https://github.com/grafana/mcp-grafana","tags":["grafana","mcp","agent","ai","monitoring"],"install":[{"cmd":"pip install mcp-grafana","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core MCP server framework","package":"mcp","optional":false},{"reason":"Interacting with Grafana API","package":"grafana-client","optional":false}],"imports":[{"note":"mcp-grafana does not re-export MCP Server; import from mcp directly.","wrong":"from mcp_grafana import Server","symbol":"Server","correct":"from mcp import Server"},{"note":"Entry point typically called via CLI, but main() can be imported programmatically.","wrong":"","symbol":"main","correct":"from mcp_grafana import main"}],"quickstart":{"code":"import os\nfrom mcp_grafana import main\n\n# Set environment variables for authentication\nos.environ['GRAFANA_URL'] = os.environ.get('GRAFANA_URL', 'http://localhost:3000')\nos.environ['GRAFANA_API_KEY'] = os.environ.get('GRAFANA_API_KEY', '')\n\n# Run the MCP server\nif os.environ['GRAFANA_API_KEY']:\n    main()\nelse:\n    print('Set GRAFANA_API_KEY environment variable')","lang":"python","description":"Run the Grafana MCP server. Requires GRAFANA_URL and GRAFANA_API_KEY environment variables."},"warnings":[{"fix":"Use `search_logs` substitute if available, or query logs via `generic_request` tool added in v0.14.0.","message":"In v0.13.0 the `search_logs` tool was removed. Tools that relied on it will fail.","severity":"breaking","affected_versions":">=0.13.0"},{"fix":"Set GRAFANA_URL without trailing slash (e.g., http://localhost:3000).","message":"The `GRAFANA_URL` must not have a trailing slash; mcp-grafana trim logic may cause double slashes in paths.","severity":"gotcha","affected_versions":">=0.12.1"},{"fix":"Set the environment variables to enable OTLP export.","message":"OpenTelemetry OTLP trace and log export is enabled only when environment variables `OTEL_EXPORTER_OTLP_ENDPOINT` or `OTEL_EXPORTER_OTLP_LOGS_ENDPOINT` are set. No telemetry by default.","severity":"gotcha","affected_versions":">=0.14.0"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Run 'pip install mcp-grafana' in the target Python environment.","cause":"mcp-grafana is not installed or installed in wrong environment.","error":"ModuleNotFoundError: No module named 'mcp_grafana'"},{"fix":"Set GRAFANA_URL before running (e.g., export GRAFANA_URL='http://localhost:3000').","cause":"Environment variable GRAFANA_URL is missing.","error":"Error: GRAFANA_URL not set"},{"fix":"Ensure GRAFANA_API_KEY is set with a valid Grafana API key. For service account, use SA token directly.","cause":"Missing or invalid GRAFANA_API_KEY or service account token.","error":"401 Unauthorized"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}