-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Hi there! 👋
Please use the latest version v2.0.7, and follow the 4 steps below exactly as written, without making any changes along the way. We've fully validated this process—if followed step-by-step without modifications, it will work as expected and let you experience the full effect.
If you still run into any issues, feel free to reach out and we’ll troubleshoot together! 🙌
1. Install & Verify Version
npm install -g grafana-mcp-analyzer
grafana-mcp-analyzer -v # Confirm the version2. IDE / Platform Config: mcp.json
{
"mcpServers": {
"grafana": {
"command": "grafana-mcp-analyzer",
"env": {
"CONFIG_PATH": "https://raw.githubusercontent.com/SailingCoder/grafana-mcp-analyzer/main/config/grafana-config-play.js"
}
}
}
}3. Configuration File Content (Do Not Modify)
✅ You can skip this step if you just want to try it out quickly.
🛠️ If you’d like to use your own data source or parameters, refer to the example below for customization.
Here’s the default config from step 2 (CONFIG_PATH), directly from the docs:
/**
* Configuration file based on Grafana Play demo instance.
* Data Source: https://play.grafana.org/d/candlesticksss/candlestick2?orgId=1&from=2021-07-13T22:13:30.740Z&to=2021-07-13T22:46:18.921Z&timezone=utc
*/
const config = {
baseUrl: 'https://play.grafana.org',
defaultHeaders: {
'Content-Type': 'application/json',
'Accept': 'application/json, text/plain, */*'
},
healthCheck: {
url: 'api/health'
},
queries: {
// Query 1 - curl format (Dogecoin OHLC data from Panel 2)
'dogecoin_panel_2': {
curl: `curl 'https://play.grafana.org/api/ds/query?ds_type=grafana-testdata-datasource&requestId=SQR108' \\
-X POST \\
-H 'accept: application/json, text/plain, */*' \\
-H 'content-type: application/json' \\
-H 'x-datasource-uid: 9cY0WtPMz' \\
-H 'x-grafana-org-id: 1' \\
-H 'x-panel-id: 2' \\
-H 'x-panel-plugin-id: candlestick' \\
-H 'x-plugin-id: grafana-testdata-datasource' \\
--data-raw '{"queries":[{"csvFileName":"ohlc_dogecoin.csv","datasource":{"type":"grafana-testdata-datasource","uid":"9cY0WtPMz"},"refId":"A","scenarioId":"csv_file","datasourceId":153,"intervalMs":2000,"maxDataPoints":1150}],"from":"1626214410740","to":"1626216378921"}'`,
systemPrompt: 'You are a Dogecoin data analysis expert, specializing in OHLC (Open, High, Low, Close) chart interpretation. Please analyze Dogecoin price data focusing on: 1. Trend and volatility patterns 2. Support and resistance levels 3. Trading opportunities 4. Risk assessment and advice 5. Technical indicators. Provide professional investment insights.'
},
// Query 2 - HTTP API format (Dogecoin OHLC data from Panel 7)
'dogecoin_panel_7': {
url: 'api/ds/query',
method: 'POST',
params: {
ds_type: 'grafana-testdata-datasource',
requestId: 'SQR109'
},
headers: {
'accept': 'application/json, text/plain, */*',
'content-type': 'application/json',
'x-datasource-uid': '9cY0WtPMz',
'x-grafana-org-id': '1',
'x-panel-id': '7',
'x-panel-plugin-id': 'candlestick',
'x-plugin-id': 'grafana-testdata-datasource'
},
data: {
queries: [{
csvFileName: "ohlc_dogecoin.csv",
datasource: {
type: "grafana-testdata-datasource",
uid: "9cY0WtPMz"
},
refId: "A",
scenarioId: "csv_file",
datasourceId: 153,
intervalMs: 2000,
maxDataPoints: 1150
}],
from: "1626214410740",
to: "1626216378921"
},
systemPrompt: 'You are a technical analyst focused on the cryptocurrency market. Analyze Dogecoin data and focus on: 1. Market trend and momentum 2. Price pattern recognition (head and shoulders, double bottom, etc.) 3. Price-volume correlation 4. Market sentiment 5. Short- and long-term strategy recommendations. Provide a detailed technical analysis report.'
}
}
};
module.exports = config;After completing all steps above, don’t forget to restart Cursor or your IDE. Only then will it behave as expected—like in the screenshot below:
4. Start Your First Conversation 🎯
👤 You: Analyze dogecoin_panel_2
🤖 AI: Connecting to Grafana and analyzing...
If you followed all 4 steps but still encounter issues, feel free to leave a message — we’ll troubleshoot together! 🚀