nr-mcp: New Relic MCP Server

nr-mcp: New Relic MCP Server

New Relic MCP server

ducduyn31

Developer Tools
Visit Server

README

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.

Prerequisites

  • New Relic account with:
    • API key
    • Account ID
    • Region (US or EU)

Quick Start

Option 1: Using Docker (Recommended)

# Run the Docker container with required environment variables
docker run -it --rm \
  -e NEW_RELIC_API_KEY=your_api_key \
  -e NEW_RELIC_ACCOUNT_ID=your_account_id \
  -e NEW_RELIC_REGION=US \
  danielng123/nr-mcp

Option 2: Using npx

Not yet supported

MCP Client Configuration

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"
      ],
      "env": {
        "NEW_RELIC_API_KEY": "<YOUR_API_KEY>",
        "NEW_RELIC_ACCOUNT_ID": "<YOUR_ACCOUNT_ID>",
        "NEW_RELIC_REGION": "US"
      }
    }
  }
}

Local Installation Connection

{
  "mcpServers": {
    "newrelic": {
      "command": "nr-mcp",
      "args": [],
      "env": {
        "NEW_RELIC_API_KEY": "<YOUR_API_KEY>",
        "NEW_RELIC_ACCOUNT_ID": "<YOUR_ACCOUNT_ID>",
        "NEW_RELIC_REGION": "US"
      }
    }
  }
}

Using with AI Assistants

When using nr-mcp with AI assistants like Claude Opus or GPT-4o, include the following in your prompt:

I need to analyze New Relic data for my application.
Please use the nr-mcp server to:
1. Run NRQL queries
2. Fetch dashboard data
3. Analyze logs
4. [Your specific task]

Example NRQL query: SELECT count(*) FROM Transaction SINCE 1 hour ago

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

Docker Development

Building the Docker Image

# Build the Docker image locally
docker build -t nr-mcp .

# Build with a specific tag
docker build -t nr-mcp:1.6.0 .

Running the Docker Container for Development

# Run with environment variables for development
docker run -it --rm \
  -e NEW_RELIC_API_KEY=your_api_key \
  -e NEW_RELIC_ACCOUNT_ID=your_account_id \
  -e NEW_RELIC_REGION=US \
  nr-mcp

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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
MCP Package Docs Server

MCP Package Docs Server

Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.

Featured
Local
TypeScript
Claude Code MCP

Claude Code MCP

An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.

Featured
Local
JavaScript
@kazuph/mcp-taskmanager

@kazuph/mcp-taskmanager

Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.

Featured
Local
JavaScript
Linear MCP Server

Linear MCP Server

Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.

Featured
JavaScript
mermaid-mcp-server

mermaid-mcp-server

A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.

Featured
JavaScript
Jira-Context-MCP

Jira-Context-MCP

MCP server to provide Jira Tickets information to AI coding agents like Cursor

Featured
TypeScript
Linear MCP Server

Linear MCP Server

A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.

Featured
JavaScript
Sequential Thinking MCP Server

Sequential Thinking MCP Server

This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.

Featured
Python