Skip to main content
Glama

nr-mcp: New Relic MCP Server

MCP server allowing AI agents to query New Relic for debugging incidents.


For Users

This section is for users who want to use the nr-mcp server with their AI assistants.

For detailed information on available tools and resources, see the Documentation section.

Prerequisites

  • New Relic account with:

    • API key

    • Account ID

    • Region (US or EU)

Related MCP server: triage-agent-mcp

Quick Start

To connect an AI assistant to nr-mcp, add the following configuration to your MCP client setup:

Docker Connection

{
  "mcpServers": {
    "newrelic": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "NEW_RELIC_API_KEY",
        "-e",
        "NEW_RELIC_ACCOUNT_ID",
        "-e",
        "NEW_RELIC_REGION",
        "danielng123/nr-mcp:latest"
      ],
      "env": {
        "NEW_RELIC_API_KEY": "<YOUR_API_KEY>",
        "NEW_RELIC_ACCOUNT_ID": "<YOUR_ACCOUNT_ID>",
        "NEW_RELIC_REGION": "US"
      }
    }
  }
}

For Developers

This section is for developers who want to contribute to the nr-mcp project.

Development Setup

# Clone the repository
git clone https://github.com/ducduyn31/nr-mcp.git
cd nr-mcp

# Install dependencies
pnpm install

# Build the project
pnpm build

The MCP Inspector is a powerful tool for debugging and testing MCP servers and clients. We've added a streamlined development workflow that automatically watches for file changes, rebuilds the project, and runs the inspector:

# Start the development workflow
pnpm dev

This command:

  1. Watches the src directory for changes to .ts files

  2. Automatically rebuilds the project when changes are detected

  3. Runs the MCP Inspector in parallel

Manual Testing

You can also run these commands separately:

# Watch for file changes and rebuild
pnpm watch

# Start the inspector
pnpm inspector

Using the Inspector

Once the inspector is running:

  1. Open the web interface (typically at http://localhost:5173)

  2. Select "Connect to Server"

  3. Choose "Stdio" as the transport type

  4. Enter the command to start your server: node dist/index.js

  5. Click "Connect"

After connecting, you can:

  • Browse available tools

  • Make test calls with custom parameters

  • View responses and any errors

  • Record and replay testing sessions

Debugging Tips

  • Use the inspector to compare expected vs. actual responses

  • Monitor the full request/response cycle for each tool call

  • Check for proper error handling by intentionally sending invalid inputs

  • Verify that your tools adhere to their declared schemas

Development

# Create a new tool
pnpm create-tool

# Lint code
pnpm lint

# Format code
pnpm format

License

MIT


Documentation

Available Tools

2 tools
query-logsB

Query New Relic logs by field and value with customizable parameters

Inputs: queryValue (required), limit, queryField, endTimeRange, +5 more.

run-nrql-queryC

Execute a NRQL query and return the results as data points

Inputs: query (required), timeout, valueKey, visualize, +2 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.9/5.0

    Scored across 2 tools

    Disambiguation4/5

    The two tools target different data types: 'run-nrql-query' returns generic data points from NRQL queries, while 'query-logs' specifically targets log data with field/value filtering. There's a small risk of confusion since NRQL can also query logs, but the descriptions clearly differentiate the intended use cases.

    Naming Consistency4/5

    Both tool names follow a verb_noun pattern with hyphens ('run-nrql-query', 'query-logs'), which is consistent. The only minor inconsistency is that one uses 'run-' prefix while the other uses 'query-' prefix, but both are action verbs and the pattern is maintained.

    Tool Count3/5

    Two tools feels thin for a server called 'nr-mcp' given New Relic's broad API surface (alerts, dashboards, entities, etc.). While the two tools may serve a focused need, the count is borderline—adequate for a minimal implementation but missing many common operations.

    Completeness2/5

    The tool surface is severely incomplete for New Relic's capabilities. There are no tools for managing alerts, dashboards, entities, deployments, or even fetching raw NRQL query results beyond data points. An agent relying on this server will hit dead ends quickly when needing anything beyond logs or basic NRQL queries.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      A 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.
      24
      38 npm
      2
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      MCP server that gives AI agents access to your application's OpenTelemetry traces for querying, analysis, and debugging.
      5
      17 npm
      2
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server for New Relic workflows, enabling NRQL queries, NerdGraph access, entity lookup, logs, alerts, dashboards, and service levels.
      1,164 npm
      3
      MIT