Newrelic MCP

MCP运维云端

提供方 xelber

运维云端 未标注 API Key 社区 / 第三方 Claude DesktopClaude

一个通过NerdGraph API为AI代理提供New Relic日志和应用性能管理(APM)数据访问的模型上下文协议(MCP)服务器。

一句话选型结论

按资料字段整理

Newrelic MCP 属于运维云端类 MCP 服务器,传输方式未标注,API Key,可直接接入 Claude Desktop、Claude,没有现成安装命令,需按官方文档接入。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类运维云端 传输方式未标注 鉴权API Key 部署方式支持远程部署
GitHub 星标 1 仓库热度,无公开仓库时显示未标注
工具数 6 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

运维云端
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量6暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

支持客户端

适用场景

日志分析TypeScript本地部署性能监控APMNRQL查询AI集成

安装与配置

未标注 API Key
上游未给出传输方式
  1. 1
    准备运行环境

    确认你的客户端支持远程端点,并拿到服务地址。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后客户端会列出约 6 个工具,随便调一个只读工具确认能返回结果。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
云资源查询

查实例、存储、账单等云上资源状态。

部署与发布

把部署、重启、回滚这类操作接进对话。

监控与告警

拉取监控指标,异常时让模型帮你判断。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 资料标注 6 个工具,职责相对集中,接入后不容易误操作。
  • 已适配 Claude Desktop、Claude,换客户端不用重新研究配置。

先想清楚的地方

  • 远程端点依赖网络与服务方可用性,注意密钥与调用额度。
  • 没有现成安装命令,需要按官方文档自己填启动命令和参数。
  • 使用前要准备好API Key对应的凭据,并按最小权限配置。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在运维云端场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop、Claude 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 不方便管理密钥或第三方授权的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Newrelic MCP当前 6 未标注 支持远程部署 无 2026-05-17
lobehub 未标注 stdio · 本地进程 本地部署 有 2026-04-11
TrendRadar 未标注 stdio · 本地进程 本地部署 有 2026-04-13
Ui Tars Desktop 8a825770 未标注 stdio · 本地进程 本地部署 有 2026-05-17
ruflo 未标注 stdio · 本地进程 本地部署 有 2026-04-13
FastGPT 未标注 stdio · 本地进程 本地部署 有 2026-04-11

服务器档案

运维云端
字段来自项目仓库与公开索引,中文说明由本站标注
提供方xelber上游标注的维护方 xelber
分类运维云端本站按上游分类展示
连接方式未标注上游未给出传输方式
鉴权方式API Key远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · 未标注本地安装时用到的包标识与运行时
部署类型支持远程部署上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

9.4 KB
来自项目仓库与上游目录的原文,未做删改

New Relic MCP Server

A Model Context Protocol (MCP) server that provides AI agents like Claude Code with access to New Relic logs and APM data through the NerdGraph API.

Features

Log Tools

  • query-logs: Execute custom NRQL queries against New Relic logs
  • search-logs: Search logs with keyword filtering and optional attributes
  • get-recent-logs: Retrieve the most recent log entries

APM Tools

  • query-apm: Execute custom NRQL queries against APM data (transactions, metrics, etc.)
  • get-apm-metrics: Get application performance metrics (response time, throughput, error rate, Apdex)
  • get-transaction-traces: Retrieve transaction traces with optional filtering for slow transactions

Prerequisites

  • Node.js 18 or higher
  • New Relic account with:
  • User API Key (create one here)
  • Account ID (find it here)

Installation

  1. Clone this repository:```bash
    git clone https://github.com/xelber/newrelic-mcp.git
    cd newrelic-mcp

2. Install dependencies:```bash
npm install
  1. Build the project:```bash
    npm run build

## Configuration

Set the following environment variables:```bash
export NEW_RELIC_API_KEY="your-user-api-key"
export NEW_RELIC_ACCOUNT_ID="your-account-id"

Or create a .env file in the project root (not committed to git):```env
NEW_RELIC_API_KEY=your-user-api-key
NEW_RELIC_ACCOUNT_ID=your-account-id


## Usage with Claude Desktop and Claude Code

### Step 1: Configure in Claude Desktop

First, add this server to your Claude Desktop configuration file:

**Configuration file location:**
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
- **Linux**: `~/.config/Claude/claude_desktop_config.json`

**Add the following configuration:**```json
{
"mcpServers": {
"newrelic": {
"command": "node",
"args": ["/absolute/path/to/newrelic-mcp/dist/index.js"],
"env": {
"NEW_RELIC_API_KEY": "your-user-api-key",
"NEW_RELIC_ACCOUNT_ID": "your-account-id"
}
}
}
}

Important:
- Replace /absolute/path/to/newrelic-mcp with the actual path to this project
- Replace your-user-api-key with your New Relic User API Key
- Replace your-account-id with your New Relic Account ID

Example (macOS):```json
{
"mcpServers": {
"newrelic": {
"command": "node",
"args": ["/Users/yourusername/newrelic-mcp/dist/index.js"],
"env": {
"NEW_RELIC_API_KEY": "NRAK-XXXXXXXXXXXXXXXXXXXXX",
"NEW_RELIC_ACCOUNT_ID": "1234567"
}
}
}
}


After updating the configuration:
1. **Save the file**
2. **Restart Claude Desktop** completely (Quit and reopen)
3. Look for the 🔌 icon in Claude Desktop to verify the MCP server is connected

### Step 2: Import into Claude Code

Once configured in Claude Desktop, you can import the server into Claude Code:

1. Open **Claude Code** in your terminal or IDE
2. The MCP server will be **automatically available** if you have Claude Desktop configured
3. Alternatively, you can add it directly to Claude Code's MCP settings

**For Claude Code direct configuration**, create/edit the file at:
- **macOS/Linux**: `~/.config/claude-code/mcp_settings.json`

With the same configuration format as above.

## Available Tools

### 1. query-logs

Execute custom NRQL queries for complex filtering and aggregations.

**Example queries:**```
query-logs with query: "SELECT * FROM Log WHERE message LIKE '%error%' SINCE 1 HOUR AGO LIMIT 100"

query-logs with query: "SELECT count(*) FROM Log WHERE level = 'ERROR' FACET host SINCE 1 DAY AGO"

query-logs with query: "SELECT * FROM Log WHERE service.name = 'api-server' AND response.status >= 500 SINCE 30 MINUTES AGO"

2. search-logs

Simplified search with keyword and attribute filtering.

Parameters:
- keywords (optional): Text to search for in log messages
- timeRange (default: "1 HOUR AGO"): Time range for the search
- limit (default: 100): Maximum number of results
- attributes (optional): Key-value pairs for filtering

Example:```
search-logs with keywords: "database timeout", timeRange: "2 HOURS AGO", limit: 50

search-logs with keywords: "authentication failed", attributes: { "service.name": "auth-service" }


### 3. get-recent-logs

Quick access to the most recent log entries.

**Parameters:**
- `limit` (default: 50): Number of recent entries
- `timeRange` (default: "1 HOUR AGO"): Time window to search

**Example:**```
get-recent-logs with limit: 100

get-recent-logs with limit: 25, timeRange: "30 MINUTES AGO"

4. query-apm

Execute custom NRQL queries against APM data for advanced analysis.

Example queries:```
query-apm with query: "SELECT average(duration) FROM Transaction WHERE appName = 'MyApp' SINCE 1 HOUR AGO"

query-apm with query: "SELECT count(*) FROM Transaction WHERE error IS true FACET appName SINCE 1 DAY AGO"

query-apm with query: "SELECT percentile(duration, 95) FROM Transaction WHERE transactionType = 'Web' SINCE 30 MINUTES AGO TIMESERIES"


### 5. get-apm-metrics

Get comprehensive application performance metrics including response time, throughput, error rate, and Apdex score.

**Parameters:**
- `appName` (optional): Filter metrics for a specific application. If not provided, returns aggregated metrics across all applications.
- `timeRange` (default: "1 HOUR AGO"): Time range for metrics
- `metrics` (default: ["responseTime", "throughput", "errorRate"]): Array of metrics to retrieve
- Options: "responseTime", "throughput", "errorRate", "apdex"

**Behavior:**
- With `appName`: Returns time-series metrics for the specified application
- Without `appName`: Returns aggregated metrics across all applications (not broken down by app)

**Examples:**```
get-apm-metrics with appName: "MyApp", timeRange: "2 HOURS AGO"

get-apm-metrics with metrics: ["responseTime", "errorRate", "apdex"]

get-apm-metrics with appName: "EcommerceApp", metrics: ["throughput", "responseTime"], timeRange: "1 DAY AGO"

Note: To get metrics for multiple specific applications, call this tool separately for each application name.

6. get-transaction-traces

Retrieve transaction traces to identify performance bottlenecks and slow operations.

Parameters:
- appName (optional): Filter transactions for a specific application
- minDuration (optional): Minimum transaction duration in seconds to filter slow transactions
- limit (default: 10): Maximum number of transaction traces to return
- timeRange (default: "1 HOUR AGO"): Time range to search

Examples:```
get-transaction-traces with appName: "MyApp", minDuration: 2.0, limit: 20

get-transaction-traces with minDuration: 5.0, timeRange: "30 MINUTES AGO"

get-transaction-traces with appName: "APIService", limit: 50


## Development

Run tests:```bash
npm test

Run tests with coverage:```bash
npm run test:coverage


Run tests in watch mode:```bash
npm run test:watch

Run in development mode (builds and starts):```bash
npm run dev


Watch mode for auto-rebuilding:```bash
npm run watch

Build the project:bash npm run build

Example Interactions

Once configured, you can ask Claude (in Claude Desktop or Claude Code):

Log Queries

  • "Show me recent errors from New Relic logs"
  • "Search for logs containing 'payment failed' in the last 2 hours"
  • "Query New Relic for all logs from the api-gateway service with 500 status codes"
  • "Get the last 100 log entries from New Relic"
  • "Find all logs with response time > 5000ms in the last hour"
  • "Show me error logs grouped by service name"

APM Queries

  • "Show me the response time and throughput for MyApp in the last hour"
  • "Get APM metrics for all applications including error rates"
  • "Find slow transactions that took longer than 3 seconds"
  • "What's the error rate for MyApp over the past 2 hours?"
  • "Show me the slowest 20 transactions from the EcommerceApp"
  • "Get the Apdex score and response time for all my applications"
  • "Find all transactions that resulted in errors in the last 30 minutes"

Troubleshooting

MCP Server Connection Issues

Server not showing in Claude Desktop:
- Verify the config file path is correct for your OS
- Check that the JSON syntax is valid (no trailing commas, proper quotes)
- Ensure the path to dist/index.js is absolute, not relative
- Restart Claude Desktop completely (Quit, not just close window)
- Check Claude Desktop logs: View > Developer > Show Logs

"Cannot find module" errors:
- Make sure you ran npm install in the project directory
- Verify you ran npm run build to compile TypeScript
- Check that the dist/ folder exists and contains the compiled files

New Relic API Issues

"Configuration error" on startup:
- Ensure NEW_RELIC_API_KEY and NEW_RELIC_ACCOUNT_ID are set correctly
- Verify your API key has the necessary permissions (User key, not Ingest key)
- Get your User API key from: https://one.newrelic.com/api-keys

"Failed to query New Relic":
- Check your API key is valid and not expired
- Verify your account ID is correct (find it at https://one.newrelic.com/admin-portal)
- Ensure you have access to the Logs product in New Relic
- Test your credentials using the NerdGraph API Explorer

No results returned:
- Verify you have log data in New Relic for the specified time range
- Check your NRQL syntax is valid
- Try a broader time range (e.g., "1 DAY AGO" instead of "1 HOUR AGO")
- Use the New Relic UI to confirm logs exist for your query

NRQL Resources

  • New Relic NRQL Documentation
  • Log Query Examples
  • APM Data and NRQL
  • Query APM Metric Data
  • Transaction Event Attributes

License

MIT

常见问题

8 问
答案由本站依据条目字段整理,不引用上游原文
Newrelic MCP 怎么安装?

资料没有给出安装命令,请到官方仓库或文档按说明接入;这类条目多数是生态应用,或尚未发布可安装包。

Newrelic MCP 怎么在 Claude Desktop、Claude 里配置?

它的传输方式未标注,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

Newrelic MCP 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Newrelic MCP 需要 API Key 吗?

资料标注需要API Key认证,使用前准备好对应凭据,并按最小权限配置。

Newrelic MCP 支持哪些客户端?

资料标注支持 Claude Desktop、Claude;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

Newrelic MCP 能提供哪些能力?

资料显示约 6 个工具;能力标签包括 日志分析、性能监控、TypeScript、Claude。具体工具清单以官方文档为准。

Newrelic MCP 需要什么运行环境?

属于远程端点,不需要在本地装运行时。

Newrelic MCP 是本地还是远程?

它是远程端点,连服务地址即可。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。