MCP Directory

New Relic MCP Server

Query New Relic via NerdGraph: entity search, NRQL, deployments and infrastructure.

Verified
stdio (local)
API key
Python

Add to your client

Copy the config for your MCP client and paste it into its config file.

Install / run
uvx newrelic-mcp-server

Paste into ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "new-relic-mcp-server": {
      "command": "uvx",
      "args": [
        "newrelic-mcp-server"
      ],
      "env": {
        "NEWRELIC_REGION": "US",
        "NEWRELIC_API_KEY": "<your-user-api-key>",
        "NEWRELIC_ACCOUNT_ID": "<your-account-id>"
      }
    }
  }
}

Requires `uv` (the Python package runner). Install it from https://docs.astral.sh/uv/ if `uvx` is not found.

Before you start

  • Python 3.10 or newer
  • A New Relic User API key (starts with NRAK), created from New Relic's API Keys page after logging in
  • Your New Relic account ID and region (US/EU), set via NEWRELIC_API_KEY, NEWRELIC_ACCOUNT_ID, and NEWRELIC_REGION (or stored in the macOS keychain)
  • An MCP-compatible client (Claude Desktop, Cursor, etc.); the server runs locally over stdio

About New Relic MCP Server

This community-built New Relic MCP server gives AI assistants programmatic access to New Relic's observability platform through NerdGraph, New Relic's GraphQL API. Agents can search entities, run NRQL queries, read applications and their metrics, manage deployments, inspect dashboards and alert policies, and create/test log-parsing rules.

It is written in Python (3.10+) on top of FastMCP and httpx, runs locally over stdio, and is installable from PyPI as newrelic-mcp-server. Authentication uses a New Relic User API key (prefixed NRAK), which can be stored in the OS keychain on macOS or supplied via environment variables.

Because almost everything is expressed as NRQL or raw NerdGraph queries, the server is flexible: if a dedicated tool doesn't cover your need, the nerdgraph_query and query_nrql tools let the agent reach the full New Relic API surface. Note this is a third-party project (by piekstra), not maintained by New Relic.

Tools & capabilities (12)

query_nrql

Run a NRQL query and return the results

nerdgraph_query

Execute an arbitrary NerdGraph (GraphQL) query for full API access

search_entities

Search across New Relic entities (apps, hosts, services, etc.)

list_applications

List APM applications; get_application and get_application_metrics fetch details and metrics

list_deployments

List deployments; create_deployment records a new deployment marker

list_dashboards

List dashboards; get_dashboard returns a dashboard definition

list_alert_policies

List alert policies; get_alert_policy returns policy details

list_synthetic_monitors

List Synthetics monitors; get_synthetic_monitor returns monitor details

list_servers

List infrastructure servers/hosts; get_server returns host details

create_log_parsing_rule

Create, update, delete, test, and generate log-parsing (Grok) rules

list_users

List account users; get_user returns user details

manage_credentials

Manage the stored New Relic API credentials used by the server

When to use it

  • Use it when you want to run NRQL queries against your telemetry in natural language
  • Use it when you need to find an entity (app, host, service) and pull its current metrics
  • Use it when you want to record a deployment marker as part of a CI/release workflow
  • Use it when you need to review alert policies or Synthetics monitors during an incident
  • Use it when you want to author and test log-parsing rules without hand-writing Grok
  • Use it when a dedicated tool is missing and you want raw NerdGraph access to the full API

Quick setup

  1. 1Create a User API key (NRAK...) from New Relic's API Keys page
  2. 2Install the server with `pip install newrelic-mcp-server`
  3. 3Set NEWRELIC_API_KEY, NEWRELIC_ACCOUNT_ID, and NEWRELIC_REGION (or store the key in the macOS keychain)
  4. 4Add the server to your MCP client config as a stdio command
  5. 5Restart your client and verify by asking the agent to list applications or run a simple NRQL query

Security notes

A New Relic User API key grants broad NerdGraph access including account data and user management, so scope the key carefully and avoid admin keys. Prefer the macOS keychain setup wizard over plaintext env vars, and set NEWRELIC_REGION to EU if your account is EU-hosted.

New Relic MCP Server FAQ

Is this an official New Relic server?

No. It is a third-party, community-maintained project by piekstra. It uses New Relic's public NerdGraph API but is not built or supported by New Relic.

What kind of API key do I need?

A New Relic User API key, which starts with NRAK. You create it from the API Keys page in the New Relic UI. License/ingest keys won't work for NerdGraph queries.

Does it support the EU data center?

Yes. Set NEWRELIC_REGION (US or EU) so requests hit the correct NerdGraph endpoint for your account.

What runtime does it require?

Python 3.10+. It is built on FastMCP and httpx and runs locally over stdio; install it from PyPI with pip.

What if there's no tool for what I need?

Use nerdgraph_query for arbitrary NerdGraph (GraphQL) calls or query_nrql for any NRQL, which together cover essentially the entire New Relic API surface.

Alternatives to New Relic MCP Server

Official Elastic server: list indices, read mappings, and search with Query DSL.

Verified
stdio (local)
API key
TypeScript
5 tools
Updated 4 months agoRepo

Official PostHog server: product analytics, feature flags, experiments, error tracking and SQL.

Verified
stdio (local)
API key
TypeScript
12 tools
Updated 4 months agoRepo

Run PromQL queries and analyze Prometheus metrics from any MCP client.

Verified
stdio (local)
No auth
Python
6 tools
Updated 1 month agoRepo