Trying to deploy an mcp server for Grafana OSS

  • What Grafana version and what operating system are you using?
    Grafana 12

  • What are you trying to achieve?
    Deploy Grafana MCP server that talks to grafana apis (Opensource)

  • How are you trying to achieve it?
    Created a SA with Admin role in Grafana. Configured Grafana url and api token in Grafana MCP helm chart.

  • What happened?
    Attached openapi.json of my MCPO. Looks like Grafana MCP is not exposing any tools.
    `{
    “openapi”: “3.1.0”,
    “info”: {
    “title”: “MCP OpenAPI Proxy”,
    “description”: “Automatically generated API from MCP Tool Schemas\n\n- available tools:\n - grafana_mcp\n - memory”,
    “version”: “1.0”
    },
    “paths”: {

    }
    }`

  • What did you expect to happen?
    I believe MCP server needs to expose tools when it’s able to access Grafana APIs. I did a curl from grafana-mcp pod, it’s able to reach Grafana apis.

  • Can you copy/paste the configuration(s) that you are having problems with?
    Grafana mcp
    grafana:
    url: “``http://kube-prometheus-stack-grafana.kube-prometheus- stack.svc.cluster.local:80``”
    apiKey: “<token>”

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

    No errors

  • Did you follow any online instructions? If so, what is the URL?

I would say do a standard investigation: go to pod, check configmaps/env variables on the pod level, check pod logs (increase log level), configure that MCP server in standard agent tools (e.g. Cursor, VS Code, …) to verify that Grafana MCP is exposing tools properly (that means problem is in other place), …

There are no pod logs. I’m able to do a curl from grafana-mcp pod and was able to reach grafana apis using the SA token. So I understand that access is not the issue.

As I said increase log level:

Debug and Logging:

  • --debug: Enable debug mode for detailed HTTP request/response logging

I gave you other ideas.

Enabled debug mode. Attached mcp-grafana logs:

time=2025-11-12T19:54:50.868Z level=INFO msg=“Starting Grafana MCP server using SSE transport” version=(devel) address=0.0.0.0:8000 basePath=/
GET /api/datasources HTTP/1.1
Host: kube-prometheus-stack-grafana.kube-prometheus-stack.svc.cluster.local:80
User-Agent: Go-http-client/1.1
Accept: application/json
Authorization: Bearer <token>
Accept-Encoding: gzip

HTTP/1.1 200 OK
Content-Length: 2022
Cache-Control: no-store
Content-Type: application/json
Date: Wed, 12 Nov 2025 19:56:31 GMT
X-Content-Type-Options: nosniff
X-Frame-Options: deny
X-Xss-Protection: 1; mode=block

[{“id”:2,“uid”:“alertmanager”,“orgId”:1,“name”:“Alertmanager”,“type”:“alertmanager”,“typeName”:“Alertmanager”,“typeLogoUrl”:“public/plugins/alertmanager/img/logo.svg”,“access”:“proxy”,“url”:“http://kube-prometheus-stack-alertmanager.kube-prometheus-stack:9093/“,“user”:”“,“database”:”“,“basicAuth”:false,“isDefault”:false,“jsonData”:{“handleGrafanaManagedAlerts”:false,“implementation”:“prometheus”},“readOnly”:true},{“id”:3,“uid”:“loki”,“orgId”:1,“name”:“loki”,“type”:“loki”,“typeName”:“Loki”,“typeLogoUrl”:“public/plugins/loki/img/loki_icon.svg”,“access”:“proxy”,“url”:“http://loki.loki.svc.cluster.local:3100”,“user”:”“,“database”:”“,“basicAuth”:false,“isDefault”:false,“jsonData”:{“derivedFields”:[{“datasourceUid”:“tempo”,“matcherRegex”:“traceId=([a-f0-9]{32})”,“name”:“TraceId”,“url”:”${__value.raw}“},{“datasourceUid”:“tempo”,“matcherRegex”:“traceID=([a-f0-9]{32})”,“name”:“traceId”,“url”:”${__value.raw}“}]},“readOnly”:false},{“id”:1,“uid”:“prometheus”,“orgId”:1,“name”:“Prometheus”,“type”:“prometheus”,“typeName”:“Prometheus”,“typeLogoUrl”:“public/plugins/prometheus/img/prometheus_logo.svg”,“access”:“proxy”,“url”:“http://kube-prometheus-stack-prometheus.kube-prometheus-stack:9090/”,“user”:”“,“database”:”“,“basicAuth”:false,“isDefault”:true,“jsonData”:{“exemplarTraceIdDestinations”:[{“datasourceUid”:“jaeger”,“name”:“trace_id”,“urlDisplayLabel”:null}],“httpMethod”:“POST”,“timeInterval”:“15s”},“readOnly”:true},{“id”:4,“uid”:“tempo”,“orgId”:1,“name”:“tempo”,“type”:“tempo”,“typeName”:“Tempo”,“typeLogoUrl”:“public/plugins/tempo/img/tempo_logo.svg”,“access”:“proxy”,“url”:“http://tempo.tempo.svc.cluster.local:3200”,“user”:”“,“database”:”“,“basicAuth”:false,“isDefault”:false,“jsonData”:{“serviceMap”:{“datasourceUid”:“prometheus”},“tracesToLogsV2”:{“customQuery”:false,“datasourceUid”:“loki”,“filterBySpanID”:true,“filterByTraceID”:true,“spanEndTimeShift”:“10s”,“spanStartTimeShift”:”-10s",“tags”:[{“key”:“service.name”,“value”:“service_name”},{“key”:“service.instance.id”,“value”:“pod”}]}},"readOnly”:false}]
DELETE /api/datasources/proxy/uid/tempo/api%2Fmcp HTTP/1.1
Host: kube-prometheus-stack-grafana.kube-prometheus-stack.svc.cluster.local:80
User-Agent: Go-http-client/1.1
Accept: application/json
Authorization: Bearer <token>
Accept-Encoding: gzip

HTTP/1.1 404 Not Found
Content-Length: 19
Content-Security-Policy: sandbox
Content-Type: text/plain; charset=utf-8
Date: Wed, 12 Nov 2025 19:56:29 GMT
Via: 1.1 grafana
X-Content-Type-Options: nosniff
X-Frame-Options: deny
X-Xss-Protection: 1; mode=block

404 page not found

time=2025-11-12T19:56:30.766Z level=INFO msg=“connected to proxied MCP servers” session=f8769ab7-7541-4e44-9d43-99ca57609c05 datasources=0

You are doing something wrong, because Grafana MCP server receives Grafana API call (which is wrong, of course it doesn’t understand those requests).

Check documentation of your “MCPO” (BTW: who knows what is it :-() - I bet that “MCPO” should be connecting to Grafana API, not to Grafana MCP server.

I’m expecting my Grafana MCP Server to talk to Grafana APIs. So, I can connect this MCP Server in OpenwebUI. Since open webui only accepts OPENAPI compatible Tools, I’m using MCPO as just an orchestrator that can expose my MCP Server as Openapi. So basically, I wanted to build a chat kind of thing to talk to Grafana.

You have complex setup with tools, which are outside out of the scope Grafana forum (e.g. OpenWebUI, MCPO).
Make sensible start from simple setup and add additional complexity only when that simple setup is working and it is tested properly, e.g.:

  • Grafana in Docker on localhost - test in web browser
  • Grafana MCP server in Docker on localhost - test with MCP inspector/VS Code/Cursor/…
  • deploy that on K8S and retest again
    In this stage you have proper validated setup, so you can safely assume that problem is outside of Grafana stack when it is not working.

The issue was that the Grafana MCP server is attempting to connect to Tempo’s MCP endpoint since Tempo is registered as a data source in Grafana. I just had to enable MCP in Tempo and tested my MCP in vs code. It worked.