newrelic-mcp
Allows interaction with New Relic, providing tools for NRQL queries, NerdGraph API calls, entity lookup, logs, alerts, dashboards, and service levels.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@newrelic-mcplist all alert policies"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
newrelic-mcp
MCP server for New Relic workflows (NRQL, NerdGraph, entity lookup, logs, alerts, dashboards, and service levels).
Prerequisites
Node.js 22+ (this repo uses
npx;.nvmrcisv24)New Relic account ID
New Relic user API key
Required environment variables:
ACCOUNT_ID(numeric account id)API_KEY(New Relic user API key)NERDGRAPH_URL(usuallyhttps://api.newrelic.com/graphql)
EU region: If your New Relic dashboard is at
one.eu.newrelic.com, usehttps://api.eu.newrelic.com/graphqlas yourNERDGRAPH_URLinstead.
Related MCP server: New Relic MCP Server
Quick Start
Run the MCP server directly:
# US region (default)
ACCOUNT_ID=123456 \
API_KEY=your_new_relic_user_key \
NERDGRAPH_URL=https://api.newrelic.com/graphql \
npx -y git@github.com:alanhoff/newrelic-mcp.git
# EU region
ACCOUNT_ID=123456 \
API_KEY=your_new_relic_user_key \
NERDGRAPH_URL=https://api.eu.newrelic.com/graphql \
npx -y git@github.com:alanhoff/newrelic-mcp.gitThis server speaks MCP over stdio, so it is normally started by an MCP client/agent.
Install In Common CLI Agents
EU region: Replace
https://api.newrelic.com/graphqlwithhttps://api.eu.newrelic.com/graphqlin all configs below if your account is on the EU region.
Codex CLI
Add this to ~/.codex/config.toml:
[mcp_servers.newrelic]
command = "npx"
args = ["-y", "git@github.com:alanhoff/newrelic-mcp.git"]
env = { ACCOUNT_ID = "123456", API_KEY = "your_new_relic_user_key", NERDGRAPH_URL = "https://api.newrelic.com/graphql" }Verify:
codex mcp listClaude Code CLI
Use the CLI installer:
claude mcp add-json newrelic '{"type":"stdio","command":"npx","args":["-y","git@github.com:alanhoff/newrelic-mcp.git"],"env":{"ACCOUNT_ID":"123456","API_KEY":"your_new_relic_user_key","NERDGRAPH_URL":"https://api.newrelic.com/graphql"}}'Verify:
claude mcp get newrelicMultiple Environments (Staging + Prod)
Name each MCP server with an environment suffix to run staging and prod configs side by side — Claude Code treats each name as a separate server.
claude mcp add-json newrelic-staging '{"type":"stdio","command":"npx","args":["-y","git@github.com:alanhoff/newrelic-mcp.git"],"env":{"ACCOUNT_ID":"111111","API_KEY":"your_staging_api_key","NERDGRAPH_URL":"https://api.newrelic.com/graphql"}}'
claude mcp add-json newrelic-prod '{"type":"stdio","command":"npx","args":["-y","git@github.com:alanhoff/newrelic-mcp.git"],"env":{"ACCOUNT_ID":"222222","API_KEY":"your_prod_api_key","NERDGRAPH_URL":"https://api.newrelic.com/graphql"}}'Verify both:
claude mcp get newrelic-staging
claude mcp get newrelic-prodBoth servers stay registered and available at same time — pick per query which one (newrelic-staging or newrelic-prod) tool calls target. Same pattern works for any env split (dev/prod, region A/region B), just swap suffix and ACCOUNT_ID/API_KEY/NERDGRAPH_URL per env.
Gemini CLI
Add this to ~/.gemini/settings.json (or .gemini/settings.json for project scope):
{
"mcpServers": {
"newrelic": {
"command": "npx",
"args": ["-y", "git@github.com:alanhoff/newrelic-mcp.git"],
"env": {
"ACCOUNT_ID": "123456",
"API_KEY": "your_new_relic_user_key",
"NERDGRAPH_URL": "https://api.newrelic.com/graphql"
}
}
}
}Verify inside Gemini CLI:
/mcpCursor (cursor-agent CLI)
Add this to ~/.cursor/mcp.json (or .cursor/mcp.json for project scope):
{
"mcpServers": {
"newrelic": {
"command": "npx",
"args": ["-y", "git@github.com:alanhoff/newrelic-mcp.git"],
"env": {
"ACCOUNT_ID": "123456",
"API_KEY": "your_new_relic_user_key",
"NERDGRAPH_URL": "https://api.newrelic.com/graphql"
}
}
}
}Verify:
cursor-agent mcp list
cursor-agent mcp list-tools newrelicInstall The Skills
This repo ships three skills:
newrelic-entity-scoutnewrelic-incident-correlationnewrelic-nrql-debug-ladder
If you are running inside this repository with AGENTS.md, they are already available from .agents/skills/.
To install them globally for Codex:
mkdir -p ~/.codex/skills
for skill in newrelic-entity-scout newrelic-incident-correlation newrelic-nrql-debug-ladder; do
cp -R ".agents/skills/$skill" "$HOME/.codex/skills/$skill"
doneAlternative (keep them synced to this repo with symlinks):
mkdir -p ~/.codex/skills
for skill in newrelic-entity-scout newrelic-incident-correlation newrelic-nrql-debug-ladder; do
ln -sfn "$(pwd)/.agents/skills/$skill" "$HOME/.codex/skills/$skill"
doneLocal Development
npm install
npm testMain server entrypoint: index.js
This server cannot be deployed
Maintenance
Related MCP Connectors
Access New Relic observability data through MCP - query metrics, logs, traces, entities, and more
- SupabaseOAuthcom.supabase
MCP server for interacting with the Supabase platform
An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceA Model Context Protocol server that enables Large Language Models like Claude to query New Relic logs and metrics using NRQL queries.28-
- AlicenseBqualityBmaintenanceRun NRQL, NerdGraph, and REST v2 operations to query data, manage incidents, create synthetics, and annotate deployments — all from your MCP client.18898 npm14MIT
- AlicenseAqualityDmaintenanceA comprehensive MCP server providing over 26 tools for querying, monitoring, and analyzing NewRelic data through NRQL queries and entity management. It enables interaction with NewRelic's NerdGraph API for managing alerts, logs, and incidents directly within Claude Code sessions.2460 npm2MIT
- FlicenseCqualityDmaintenanceMCP server allowing AI agents to query New Relic for debugging incidents.2-