app-metrics/mcp-grafana - 2.3.0 (inode64-overlay)

Search

Install

Install this version:

emerge -a =app-metrics/mcp-grafana-2.3.0

If this version is masked, you can unmask it using the autounmask tool or standard emerge options:

autounmask =app-metrics/mcp-grafana-2.3.0

Or alternatively:

emerge --autounmask-write -a =app-metrics/mcp-grafana-2.3.0

Package Information

Description:
Model Context Protocol (MCP) server for Grafana
Homepage:
https://github.com/grafana/mcp-grafana
License:
Apache-2.0 BSD BSD-2 ISC MIT MIT-0 MPL-2.0

Ebuild Details

Version EAPI Keywords Slot
2.3.0 8 ~amd64 0
View Raw Ebuild
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit go-module systemd

DESCRIPTION="Model Context Protocol (MCP) server for Grafana"
HOMEPAGE="https://github.com/grafana/mcp-grafana"
SRC_URI="https://github.com/grafana/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
	https://www.inode64.com/dist/${P}-vendor.tar.xz"

LICENSE="Apache-2.0"
# Dependent licenses
LICENSE+=" BSD BSD-2 ISC MIT MIT-0 MPL-2.0"
SLOT="0"
KEYWORDS="~amd64"

RDEPEND="
	acct-user/mcp-grafana
"
BDEPEND=">=dev-lang/go-1.26.10"

src_compile() {
	# Without cgo, as upstream does: the binary links no shared library.
	CGO_ENABLED=0 ego build -trimpath \
		-ldflags "-X github.com/grafana/${PN}/v2.version=${PV}" \
		-o ${PN} ./cmd/${PN}
}

src_test() {
	ego test -tags unit ./...
}

src_install() {
	dobin ${PN}
	einstalldocs

	# Shared by the systemd unit and the OpenRC script. It holds the bearer
	# token that MCP clients must present.
	insinto /etc/${PN}
	doins "${FILESDIR}"/${PN}.conf
	fperms 0600 /etc/${PN}/${PN}.conf
	fperms 0700 /etc/${PN}

	systemd_dounit "${FILESDIR}"/${PN}.service
	newinitd "${FILESDIR}"/${PN}.initd ${PN}
}

pkg_postinst() {
	elog "To run it as a service (streamable HTTP on 127.0.0.1:8000, read only):"
	elog "  1. Put a Grafana service account token in /etc/${PN}/token (mode 0600)"
	elog "  2. Review /etc/${PN}/${PN}.conf"
	elog "  3. systemctl enable --now ${PN}, or rc-update add ${PN} default"
	elog "Without a transport flag it speaks stdio, for a local MCP client."
}

Inherited Eclasses

Dependencies

RDEPEND

	acct-user/mcp-grafana

BDEPEND

>=dev-lang/go-1.26.10

Manifest for 2.3.0

Type File Size Source URLs
DIST mcp-grafana-2.3.0-vendor.tar.xz 7580672 bytes https://www.inode64.com/dist/mcp-grafana-2.3.0-vendor.tar.xz
DIST mcp-grafana-2.3.0.tar.gz 1994407 bytes https://github.com/grafana/mcp-grafana/archive/v2.3.0.tar.gz