npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@kivanio/mcp-new-relic

v1.0.1

Published

MCP server for querying New Relic errors and metrics

Downloads

11

Readme

MCP New Relic Server

A Model Context Protocol (MCP) server for querying New Relic errors and metrics. This server provides tools that Claude can use to monitor and analyze application performance and errors.

Features

  • Error Querying: Query application errors with customizable time ranges and filters
  • Custom NRQL Queries: Execute any NRQL query directly
  • Performance Metrics: Query response times, throughput, error rates, and Apdex scores
  • Easy Integration: Works seamlessly with Claude Desktop and other MCP clients

Installation

Option 1: NPM Package (Recommended)

Install globally via npm:

npm install -g mcp-new-relic

Or install locally in a project:

npm install mcp-new-relic

Option 2: Docker

Pull from Docker Hub:

docker pull kivanio/mcp-new-relic

Or build locally:

git clone https://github.com/kivanio/mcp-new-relic.git
cd mcp-new-relic
docker build -t mcp-new-relic .

Option 3: From Source

  1. Clone the repository:
    git clone https://github.com/kivanio/mcp-new-relic.git
    cd mcp-new-relic
  2. Install dependencies:
    npm install
  3. Build the TypeScript code:
    npm run build

Configuration

  1. Copy .env.example to .env:

    cp .env.example .env
  2. Edit .env with your New Relic credentials:

    NEW_RELIC_API_KEY=your-api-key-here
    NEW_RELIC_ACCOUNT_ID=your-account-id-here
    NEW_RELIC_REGION=US # or EU

    To get your New Relic API key:

    • Log in to New Relic
    • Go to Account Settings → API Keys
    • Create a new User Key (not an Ingest Key)

Usage with Claude Desktop

Add the server to your Claude Desktop configuration. The configuration depends on how you installed the package:

If installed via NPM globally:

  1. Open Claude Desktop settings
  2. Go to the "Developer" tab
  3. Add to your MCP servers configuration:
{
  "mcpServers": {
    "new-relic": {
      "command": "mcp-new-relic",
      "env": {
        "NEW_RELIC_API_KEY": "your-api-key",
        "NEW_RELIC_ACCOUNT_ID": "your-account-id",
        "NEW_RELIC_REGION": "US"
      }
    }
  }
}

If installed locally or from source:

{
  "mcpServers": {
    "new-relic": {
      "command": "node",
      "args": ["/path/to/mcp-new-relic/dist/index.js"],
      "env": {
        "NEW_RELIC_API_KEY": "your-api-key",
        "NEW_RELIC_ACCOUNT_ID": "your-account-id",
        "NEW_RELIC_REGION": "US"
      }
    }
  }
}

If using Docker:

{
  "mcpServers": {
    "new-relic": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "--env-file",
        "/path/to/.env",
        "kivanio/mcp-new-relic"
      ]
    }
  }
}

Using environment file:

If you have a .env file configured, you can omit the env section:

{
  "mcpServers": {
    "new-relic": {
      "command": "mcp-new-relic"
    }
  }
}

Available Tools

1. query_errors

Query application errors from New Relic.

Parameters:

  • timeRange (optional): Time range for the query (default: "4 hours ago")
    • Examples: "1 hour ago", "24 hours ago", "7 days ago"
  • appName (optional): Application name pattern (default: "%kivanio%")
    • Supports SQL LIKE patterns
  • limit (optional): Maximum number of error types to return (default: 20, max: 100)

Example usage in Claude:

Use the New Relic tool to check for errors in the last 24 hours

2. query_custom

Execute a custom NRQL query.

Parameters:

  • query (required): The NRQL query to execute

Example usage in Claude:

Run this NRQL query: SELECT count(*) FROM Transaction WHERE appName = 'kivanio-production' SINCE 1 hour ago

3. query_metrics

Query application performance metrics.

Parameters:

  • timeRange (optional): Time range for the query (default: "1 hour ago")
  • appName (optional): Application name pattern (default: "%kivanio%")
  • metrics (optional): Array of metrics to query (default: ["response_time", "throughput", "error_rate"])
    • Available metrics: "response_time", "throughput", "error_rate", "apdex"

Example usage in Claude:

Check the performance metrics for the last 6 hours

Development

Running in development mode:

npm run dev

Building:

npm run build

Project structure:

mcp-new-relic/
├── src/
│   └── index.ts      # Main server implementation
├── dist/             # Compiled JavaScript (generated)
├── package.json      # Dependencies and scripts
├── tsconfig.json     # TypeScript configuration
├── .env.example      # Example environment variables
└── README.md         # This file

Troubleshooting

Common Issues

  1. Authentication errors: Ensure your API key is valid and has the necessary permissions
  2. No results returned: Check that your application name pattern matches your New Relic app names
  3. Connection errors: Verify your region setting (US vs EU) matches your New Relic account

Debug Mode

To see detailed logs, run the server with debug output:

DEBUG=* node dist/index.js

License

MIT