-
Notifications
You must be signed in to change notification settings - Fork 167
chore: add Claude Code plugin configuration #333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey! thanks for contributing this. I would like to solve the hardcoded version issue before merging. I'll work on this separately since it'll require a new CI workflow to bump versions I suspect.
The other question I had is around Windows compatibility. The script does handle the Windows OS case but still relies on Cygwin/Git Bash etc, so we would need a separate script for Powershell users, which I don't really want to maintain... I'm curious if there is a nicer solution. It's not a blocker though.
VERSION_FILE="${PLUGIN_ROOT}/.mcp-grafana-version" | ||
if [ ! -f "${BINARY_PATH}" ] || [ ! -f "${VERSION_FILE}" ] || [ "$(cat ${VERSION_FILE})" != "${VERSION}" ]; then | ||
echo "Downloading mcp-grafana ${VERSION} for ${OS}-${ARCH}..." >&2 | ||
|
||
TEMP_DIR=$(mktemp -d) | ||
trap "rm -rf ${TEMP_DIR}" EXIT | ||
|
||
ARCHIVE_PATH="${TEMP_DIR}/${ARCHIVE_NAME}" | ||
curl -fsSL "${DOWNLOAD_URL}" -o "${ARCHIVE_PATH}" | ||
|
||
# Extract archive | ||
if [ "${EXT}" = "tar.gz" ]; then | ||
tar -xzf "${ARCHIVE_PATH}" -C "${TEMP_DIR}" | ||
else | ||
unzip -q "${ARCHIVE_PATH}" -d "${TEMP_DIR}" | ||
fi | ||
|
||
# Move binary to plugin root | ||
mv "${TEMP_DIR}/${BINARY_NAME}" "${BINARY_PATH}" | ||
chmod +x "${BINARY_PATH}" | ||
echo "${VERSION}" > "${VERSION_FILE}" | ||
|
||
echo "Successfully installed mcp-grafana ${VERSION}" >&2 | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should verify checksums after downloading, too.
Summary
Add Claude Code plugin configuration to enable this MCP server as a Claude Code plugin.
Closes #315
Changes
.claude-plugin/plugin.json
with plugin metadata.claude-plugin/install-binary.sh
for automatic binary installationHow it works
The install script:
Installation
Users can add this plugin via a marketplace:
Then install via:
The plugin will automatically download and configure the mcp-grafana binary on first use.
Platform Support
Testing
The install script has been designed to work with Grafana's release format:
mcp-grafana_${OS}_${ARCH}.tar.gz
containingmcp-grafana
binarymcp-grafana_${OS}_${ARCH}.zip
containingmcp-grafana.exe
binaryRelated