This guide documents the secure and automated publishing process for the New Relic MCP server.
Releases are automated via GitHub Actions and npm provenance.
What happens on push to main:
- CI runs tests, lint, typecheck, and build on Node 20.
- If
package.jsonversion differs from the version on npm, CI publishes the package with provenance and creates a GitHub Release with notes extracted fromCHANGELOG.md.
Prerequisites
- In GitHub repo: Settings → Actions → General → Workflow permissions: Read and write permissions
- Secret:
NPM_TOKEN(npm automation token, not a personal token) - Optional: Repository variables for integration tests (e.g.
USE_REAL_ENV,NEW_RELIC_API_KEY,NEW_RELIC_ACCOUNT_ID)
Security and best practices
package.jsonenforces"engines": { "node": ">=20" }andpublishConfig.provenance: true.- Publishing uses an npm automation token via
NODE_AUTH_TOKENin CI. - Only publishes from
mainand only when the version changes.
How to cut a release
- Update
CHANGELOG.md(Keep a Changelog) by moving items from Unreleased to a new version section. - Bump the version using semantic versioning:
# choose one of: patch | minor | major npm version patch git push origin main --tags - CI will:
- Validate (tests/lint/typecheck/build)
- Publish to npm (if version changed)
- Create a GitHub Release with notes from the changelog
Notes
- A prepack step builds the package before publish.
- Binary is exposed via
bin.newrelic-mcp→dist/server.js. Ensure the built file is executable and contains a shebang (#!/usr/bin/env node). If needed, add it tosrc/server.ts's first line and rebuild.
Use only when CI is unavailable. Prefer automated releases above.
npm ci
npm run build
# optional dry run
npm publish --dry-run
# publish (public package with provenance)
NPM_CONFIG_PROVENANCE=true npm publish --access public- Published NPM package
- GitHub repository set up
-
Fill in the form:
- Name: New Relic MCP
- Package Name: newrelic-mcp
- Description: Model Context Protocol server for New Relic observability platform
- Repository: https://github.com/cloudbring/newrelic-mcp
- NPM Package: https://www.npmjs.com/package/newrelic-mcp
- Author: @cloudbring
- Categories: Select "Monitoring", "DevOps", "Observability"
- License: MIT
-
Provide configuration example:
{
"mcpServers": {
"newrelic": {
"command": "npx",
"args": ["-y", "newrelic-mcp"],
"env": {
"NEW_RELIC_API_KEY": "your-api-key",
"NEW_RELIC_ACCOUNT_ID": "your-account-id"
}
}
}
}Users can install via Smithery:
npx @smithery/cli install newrelic-mcp --client claudeSubmit at: https://github.com/modelcontextprotocol/mcp-hub
- Fork the repository
- Add your server to
servers.json - Submit PR
Example entry:
{
"name": "newrelic-mcp",
"description": "New Relic observability platform integration",
"author": "cloudbring",
"repository": "https://github.com/cloudbring/newrelic-mcp",
"npm": "newrelic-mcp",
"categories": ["monitoring", "observability", "devops"]
}Submit PR to: https://github.com/punkpeye/awesome-mcp-servers
Add to appropriate section:
- [New Relic MCP](https://github.com/cloudbring/newrelic-mcp) - Query metrics, manage alerts, and monitor applications in New RelicWhen Anthropic launches an app store, ensure you're registered.
Use semantic versioning (MAJOR.MINOR.PATCH):
- MAJOR: Breaking changes
- MINOR: New features (backwards compatible)
- PATCH: Bug fixes
Use semantic versioning and keep CHANGELOG.md in sync with releases (Keep a Changelog).
# Update CHANGELOG.md (move Unreleased → new version section)
# Update version
npm version patch # or minor/major
# Push and tag
git push origin main --tags
# GitHub Actions (CI) will build, test, publish (if version changed),
# and create a GitHub Release with notes from CHANGELOG.md- Write blog post/tweet announcing the MCP server
- Include:
- What it does
- Installation instructions
- Example use cases
- Link to GitHub
- Anthropic Discord (if you have access)
- r/LocalLLaMA subreddit
- r/OpenAI subreddit
- Hacker News (Show HN post)
- New Relic community forums (with disclaimer about being unofficial)
- MCP GitHub Discussions: https://github.com/modelcontextprotocol/specification/discussions
Consider creating:
- GitHub Pages site from
docs/folder - Video tutorial
- Example notebooks
Check downloads at: https://www.npmjs.com/package/newrelic-mcp
Monitor:
- Stars
- Issues
- Pull requests
- Fork count
- Enable GitHub Discussions
- Monitor issues for bug reports
- Check Smithery reviews
Before publishing, ensure:
- All tests pass (
npm test) - Coverage is >90% (
npm run test:coverage) - No linting errors (
npm run lint) - Documentation is complete
-
.env.examplehas clear instructions - README has installation for all platforms
- Package.json has all required fields
- GitHub Actions CI is set up
- Shebang added to server.ts
- Build works (
npm run build) - Local testing works (
npx .in project root)
402 Payment Required:
- Package name might be taken or reserved
- Try different name or namespace (@cloudbring/newrelic-mcp)
403 Forbidden:
- Not logged in:
npm login - No publish access: check npm account
E404 Not Found:
- For scoped packages, use:
npm publish --access public
- Ensure NPM package is published first
- Verify GitHub repo is public
- Check smithery.json is valid
- Check NPM_TOKEN secret is set
- Ensure Node version compatibility
- Review workflow logs
For issues or questions:
- GitHub Issues: https://github.com/cloudbring/newrelic-mcp/issues
- Email: [your email]
- Twitter: @cloudbring