-
Notifications
You must be signed in to change notification settings - Fork 209
Description
Description: When attempting to connect to the Grafana instance through the MCP Grafana server, an error has occurred. Despite the Grafana service running normally and being able to successfully access data sources via the API, the MCP server returns an EOF error when attempting to execute this action.
Grafana Version:
12.1.0
Steps to Reproduce:
Check Grafana health status using curl:
curl -v http://10.104.100.33:3000/api/health
Returned Result:
{
"database": "ok",
"version": "12.1.0",
"commit": "1fdeca10151ec766ff2e9e5eaf4c7d05b666dea4",
"enterpriseCommit": "b5c636eacf65c853df4b0639e2ac6761f8c7e241"
}
Check the data sources using curl:
curl -H "Authorization: Bearer glsa_0xZrq7pJEGpKtZfNaGN0hxiNuzKaVVU7_5e8f288b" http://10.104.100.33:3000/api/datasources
Returned Result:
[
{
"id": 3,
"uid": "ceywnxyiyrv28c",
"orgId": 1,
"name": "alertmanager",
"type": "alertmanager",
"typeName": "Alertmanager",
"typeLogoUrl": "public/plugins/alertmanager/img/logo.svg",
"access": "proxy",
"url": "",
"user": "",
"database": "",
"basicAuth": false,
"isDefault": false,
"jsonData": {},
"readOnly": false
},
{
"id": 1,
"uid": "ceu97dbbugz5sd",
"orgId": 1,
"name": "xxx",
"type": "mysql",
"typeName": "MySQL",
"typeLogoUrl": "public/plugins/mysql/img/mysql_logo.svg",
"access": "proxy",
"url": "1xxx6",
"user": "xxx",
"database": "",
"basicAuth": false,
"isDefault": true,
"jsonData": {
"connMaxLifetime": 14400,
"database": "huhang",
"maxIdleConns": 100,
"maxIdleConnsAuto": true,
"maxOpenConns": 100,
"pdcInjected": false
},
"readOnly": false
},
{
"id": 2,
"uid": "dex4wm3yymuwwe",
"orgId": 1,
"name": "yesoreyeram-infinity-datasource",
"type": "yesoreyeram-infinity-datasource",
"typeName": "Infinity",
"typeLogoUrl": "public/plugins/yesoreyeram-infinity-datasource/img/icon.svg",
"access": "proxy",
"url": "",
"user": "",
"database": "",
"basicAuth": false,
"isDefault": false,
"jsonData": {},
"readOnly": false
}
]
Start the MCP Grafana server and observe the error:
podman run --rm -p 8000:8000 -e GRAFANA_URL=http://10.104.100.33:3000
-e GRAFANA_SERVICE_ACCOUNT_TOKEN=glsa_0xZrq7pJEGpKtZfNaGN0hxiNuzKaVVU7_5e8f288b
mcp/grafana -t streamable-http
Error Log:
time=2025-11-17T03:29:54.148Z level=ERROR msg="failed to discover MCP datasources" error="failed to list datasources: Get "http://10.104.100.33:3000/api/datasources\": EOF"
Expected Behavior: I expect to successfully connect and list Grafana data sources through the MCP Grafana server rather than encountering an EOF error.
Additional Information:
Ensure that the MCP Grafana server's access permissions, network configuration, and environment variables are correct.
The Grafana instance is operational and returns valid responses.
Thank you for your attention to this issue. I hope to see a resolution soon!