feat(agents): add project-scoped Grafana MCP for opencode and codex (#339)

This commit is contained in:
ryan4yin | 二花 authored and GitHub committed 2026-10-02 12:01:01 +08:00
1 parent c913813ac6
commit 51e86d1168
4 files changed
+37 -3

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
{
// Project-scoped MCP: loaded only while working in this repo, so its tools
// cost context here and nowhere else.
//
// mcp-grafana talks to the homelab Grafana. The service-account token stays in
// the environment (GRAFANA_SERVICE_ACCOUNT_TOKEN, set by nushell-secrets.nu),
// never in git.
"$schema": "https://opencode.ai/config.json",
"mcp": {
"servers": {
"grafana": {
"type": "local",
// Read-only surface; drop --disable-write to allow dashboard/alert edits.
"command": ["mcp-grafana", "--disable-write"],
"environment": {
"GRAFANA_URL": "https://grafana.writefor.fun",
"GRAFANA_SERVICE_ACCOUNT_TOKEN": "{env:GRAFANA_SERVICE_ACCOUNT_TOKEN}",
},
},
},
},
}