New Relic MCP Server
Provides comprehensive access to the New Relic observability platform through 55 MCP tools, enabling APM, infrastructure, logs, traces, alerts, dashboards, synthetics, workflows, notifications, service levels, tags, entities, and workloads via a single GraphQL endpoint.
README
New Relic MCP Server
A Go-native MCP (Model Context Protocol) server for the New Relic observability platform, providing comprehensive access to APM, infrastructure, logs, traces, alerts, dashboards, synthetics, workflows, notifications, service levels, tags, entities, and workloads — all through a single GraphQL endpoint.
Overview
- 55 registered MCP tools covering the full NerdGraph API surface
- Safety-first design: every tool carries
EnforcerProfilemetadata (risk, impact, resource cost, PII flag, idempotency) for automated policy enforcement via MCP Bridge - Write protection: all mutation tools gated behind a
-write-enabledflag; disabled by default - Multi-region: US and EU data center support (
NEWRELIC_REGION=us|eu) - TDD-built: 80%+ test coverage across all tools
Registries
This server is published on the following MCP registries:
- Smithery:
karldane/newrelic-mcp - MCP Registry:
io.github.karldane/newrelic-mcp
API Architecture
All tools communicate with a single NerdGraph endpoint:
| Region | Endpoint |
|---|---|
| US (default) | https://api.newrelic.com/graphql |
| EU | https://api.eu.newrelic.com/graphql |
Internal query helpers determine the response-scope:
| Helper | Returns | Used For |
|---|---|---|
actorGraphQuery |
data.actor.* |
Entity queries, cross-account NRQL |
nerdGraphQuery |
data.actor.account.* |
Account-scoped queries (alerts, workflows, etc.) |
rawGraphQuery |
data.<mutationName> |
All mutations |
executeNRQL |
Parsed NRQL results | NRQL-based tools |
Tools
NRQL Querying
| Tool | Description | GraphQL Operation | Risk | Impact |
|---|---|---|---|---|
nrql_query |
Execute arbitrary NRQL queries | actor.account.nrql |
Med | Read |
APM & Applications
| Tool | Description | GraphQL Operation | Risk | Impact |
|---|---|---|---|---|
list_applications |
List all APM-monitored applications | actor.entitySearch (domain:APM, type:APPLICATION) |
Low | Read |
get_apm_metrics |
Get APM performance metrics | actor.account.nrql (FROM APMApplication) |
Low | Read |
get_application_metrics |
Get detailed metrics for a specific app | actor.account.nrql (FROM APMApplication) |
Low | Read |
query_traces |
Query distributed traces | actor.account.nrql (FROM Transaction) |
Low | Read |
get_transaction_traces |
Get transaction trace details | NRQL via executeNRQL | Low | Read |
get_trace_details |
Get specific trace details | NRQL via executeNRQL | Low | Read |
Alert Policies & Conditions
| Tool | Description | GraphQL Operation | Risk | Impact |
|---|---|---|---|---|
list_alerts |
List all alert policies | actor.account.alerts.policiesSearch |
Low | Read |
get_alert_policy |
Get a single alert policy by ID | actor.account.alerts.policy |
Low | Read |
get_alert_conditions |
Get conditions for a policy | actor.account.alerts.alertConditionsSearch |
Low | Read |
get_alert_violations |
Get active alert violations | actor.account.nrql (NRQL alert query) |
Low | Read |
list_nrql_alert_conditions |
List NRQL conditions for a policy | actor.account.alerts.nrqlConditionsSearch |
Low | Read |
create_alert_policy |
Create a new alert policy | alertsPolicyCreate |
Low | Write |
update_alert_policy |
Update an alert policy | alertsPolicyUpdate |
Low | Write |
delete_alert_policy |
Delete an alert policy | alertsPolicyDelete |
High | Write |
create_alert_condition |
Create an NRQL alert condition | alertsNrqlConditionCreate |
Med | Write |
acknowledge_alert_violation |
Acknowledge an alert violation | alertsViolationAcknowledge |
Med | Write |
Synthetic Monitoring
| Tool | Description | GraphQL Operation | Risk | Impact |
|---|---|---|---|---|
list_synthetic_monitors |
List all synthetic monitors | actor.entitySearch (domain:SYNTH, type:MONITOR) |
Low | Read |
get_synthetic_monitor |
Get a synthetic monitor by GUID | actor.entity (SyntheticMonitorEntityOutline) |
Low | Read |
list_private_locations |
List private locations | actor.entitySearch (domain:SYNTH, type:PRIVATE_LOCATION) |
Low | Read |
create_ping_monitor |
Create a simple ping monitor | syntheticsCreateSimpleMonitor |
Low | Write |
delete_synthetic_monitor |
Delete a synthetic monitor | syntheticsDeleteMonitor |
Med | Write |
Dashboards
| Tool | Description | GraphQL Operation | Risk | Impact |
|---|---|---|---|---|
list_dashboards |
List all dashboards | actor.entitySearch (domain:DASH, type:DASHBOARD) |
Low | Read |
get_dashboard |
Get full dashboard configuration by GUID | actor.entity (DashboardEntity) |
Low | Read |
get_dashboard_data |
Get dashboard widget data | actor.entity (DashboardEntity) |
Low | Read |
create_dashboard |
Create a new dashboard | dashboardCreate |
Low | Write |
update_dashboard |
Update an existing dashboard | dashboardUpdate |
Low | Write |
delete_dashboard |
Delete a dashboard | dashboardDelete |
Med | Write |
add_dashboard_widget |
Add a widget to a dashboard | dashboardUpdate |
Med | Write |
Logs
| Tool | Description | GraphQL Operation | Risk | Impact |
|---|---|---|---|---|
search_logs |
Search logs with Lucene syntax | actor.account.nrql (FROM Log) |
Med | Read |
tail_logs |
Stream recent log entries | actor.account.nrql (FROM Log) |
Med | Read |
Infrastructure
| Tool | Description | GraphQL Operation | Risk | Impact |
|---|---|---|---|---|
get_infrastructure_metrics |
Get host/container metrics | actor.account.nrql (FROM SystemSample) |
Low | Read |
Alert Workflows (aiWorkflows)
| Tool | Description | GraphQL Operation | Risk | Impact |
|---|---|---|---|---|
list_workflows |
List alert notification workflows | actor.account.aiWorkflows.workflows |
Low | Read |
get_workflow |
Get a workflow by ID | actor.account.aiWorkflows.workflows (filter) |
Low | Read |
create_workflow |
Create a new alert workflow | aiWorkflowsCreateWorkflow |
Low | Write |
update_workflow |
Update a workflow | aiWorkflowsUpdateWorkflow |
Low | Write |
delete_workflow |
Delete a workflow | aiWorkflowsDeleteWorkflow |
High | Write |
Notification Channels & Destinations (aiNotifications)
| Tool | Description | GraphQL Operation | Risk | Impact |
|---|---|---|---|---|
list_notification_channels |
List all notification channels | actor.account.aiNotifications.channels |
Low | Read |
list_destinations |
List notification destinations | actor.account.aiNotifications.destinations |
Low | Read |
create_slack_channel |
Create a Slack notification channel | aiNotificationsCreateChannel (type:SLACK) |
Low | Write |
create_email_channel |
Create an email notification channel | aiNotificationsCreateChannel (type:EMAIL) |
Low | Write |
delete_notification_channel |
Delete a notification channel | aiNotificationsDeleteChannel |
High | Write |
Service Levels
| Tool | Description | GraphQL Operation | Risk | Impact |
|---|---|---|---|---|
list_service_levels |
List SLIs for an entity | actor.entity (... EntityInterfaceWithServiceLevel) |
Low | Read |
create_service_level |
Create an SLI with SLO | serviceLevelCreate |
Med | Write |
update_service_level |
Update an SLI's SLO target | serviceLevelUpdate |
Low | Write |
Tag Management (tagging)
| Tool | Description | GraphQL Operation | Risk | Impact |
|---|---|---|---|---|
get_entity_tags |
Get all tags for an entity | actor.entity.tags |
Low | Read |
add_entity_tags |
Add tags to an entity | taggingAddTagsToEntity |
Low | Write |
remove_entity_tags |
Remove tags from an entity | taggingDeleteTagFromEntity |
Med | Write |
replace_entity_tags |
Replace all tags on an entity | taggingReplaceTagsOnEntity |
Med | Write |
Entity Operations
| Tool | Description | GraphQL Operation | Risk | Impact |
|---|---|---|---|---|
search_entities |
Advanced entity search | actor.entitySearch (queryBuilder) |
Low | Read |
delete_entity |
Delete entities by GUID | entityDelete |
High | Write |
Cross-Account NRQL
| Tool | Description | GraphQL Operation | Risk | Impact |
|---|---|---|---|---|
cross_account_nrql |
Run NRQL across multiple accounts | actor.nrql (multi-account) |
Med | Read |
Workloads
| Tool | Description | GraphQL Operation | Risk | Impact |
|---|---|---|---|---|
list_workloads |
List all workloads for an account | actor.account.workload.workloads |
Low | Read |
get_workload |
Get a workload by GUID | actor.entity (WorkloadEntity) |
Low | Read |
NerdGraph Reference
All tools access the New Relic NerdGraph API. The following NerdGraph query/mutation names are used:
| GraphQL Operation | Documentation |
|---|---|
actor.entity |
Entity |
actor.entitySearch |
Entity Search |
actor.account.nrql |
NRQL |
alertsPolicyCreate / Update / Delete |
Alert Policies |
alertsNrqlConditionCreate |
NRQL Alert Conditions |
syntheticsCreateSimpleMonitor |
Synthetic Monitoring |
dashboardCreate / Update / Delete |
Dashboards |
aiWorkflowsCreate / Update / DeleteWorkflow |
Workflows |
aiNotificationsCreateChannel / DeleteChannel |
Notification Channels |
serviceLevelCreate / Update |
Service Levels |
taggingAddTagsToEntity / DeleteTagFromEntity / ReplaceTagsOnEntity |
Tags |
entityDelete |
Entity Deletion |
Installation
Prerequisites
- Go 1.22 or later
- New Relic account with API access
Building from Source
git clone https://github.com/karldane/newrelic-mcp.git
cd newrelic-mcp
make
Build Options
make # Download deps and build (default)
make deps # Download dependencies only
make build # Build binary only (assumes deps exist)
make build-all # Build for Linux, macOS, and Windows
make test # Run tests
make clean # Remove build artifacts
make install # Install to GOPATH/bin
make help # Show all options
Configuration
Environment Variables
| Variable | Description | Required | Default |
|---|---|---|---|
NEWRELIC_API_KEY |
New Relic API key (User or Admin) | Yes | - |
NEWRELIC_REGION |
Data center region (us or eu) |
No | us |
Obtaining an API Key
- Log in to your New Relic account
- Go to API Keys in the account settings
- Create a User Key (for read-only) or Admin Key (for write operations)
- Copy the key and set it as
NEWRELIC_API_KEY
Usage
Basic Usage (Read-Only)
export NEWRELIC_API_KEY="your-api-key"
./newrelic-mcp
Enable Write Operations
Write operations require the -write-enabled flag:
export NEWRELIC_API_KEY="your-api-key"
./newrelic-mcp -write-enabled
Write tools are disabled by default. When -write-enabled is set, all mutations (create, update, delete, acknowledge) become available. Each write tool carries an EnforcerProfile with ImpactWrite so MCP Bridge operators can enforce policies independently.
Tools List
Query the full tool list via MCP:
{
"tool": "tools/list"
}
Safety Features
EnforcerProfile Metadata
Every tool declares its safety profile:
| Field | Description | Values |
|---|---|---|
RiskLevel |
Potential impact of misuse | low, med, high, critical |
ImpactScope |
What the tool affects | read, write |
ResourceCost |
API call weight (1-10) | integer |
PIIExposure |
Whether tool returns sensitive data | true / false |
Idempotent |
Whether retries are safe | true / false |
This metadata enables automated policy enforcement by MCP Bridge without hardcoding tool lists.
Risk Classification
- Low Risk: Read-only queries, log searches, metric retrieval, listing operations
- Medium Risk: Creating non-destructive resources (alert conditions, service levels, dashboards, channels), acknowledging alerts
- High Risk: Deleting resources (policies, entities, dashboards, workflows, channels)
Write Protection
Write tools are disabled by default and require:
- Valid New Relic API key with appropriate permissions
-write-enabledcommand-line flag
Examples
Query Application Performance
{
"tool": "nrql_query",
"arguments": {
"query": "SELECT average(duration) FROM Transaction WHERE appName = 'MyApp' TIMESERIES SINCE 1 hour ago"
}
}
List Active Alerts
{
"tool": "get_alert_violations",
"arguments": {}
}
Create a Ping Monitor
{
"tool": "create_ping_monitor",
"arguments": {
"name": "My Monitor",
"uri": "https://example.com/health",
"locations": "US_EAST_1,US_WEST_1",
"period": "EVERY_5_MINUTES"
}
}
Cross-Account NRQL Query
{
"tool": "cross_account_nrql",
"arguments": {
"query": "SELECT count(*) FROM Transaction",
"account_ids": "1234567,7654321"
}
}
Architecture
The server wraps the New Relic GraphQL client and registers each tool through the MCP Framework. The tools map 1:1 to NerdGraph operations — no REST API calls are made.
Client (MCP Host)
│
▼
newrelic-mcp (MCP Server)
│
├── actorGraphQuery → actor.* (entities, entitySearch, cross-account NRQL)
├── nerdGraphQuery → actor.account.* (alerts, workflows, notifications, workloads)
├── rawGraphQuery → mutation results
└── executeNRQL → actor.account.nrql (NRQL query tools)
│
▼
New Relic NerdGraph (api.newrelic.com/graphql)
Testing
go test ./newrelic -v
Tests cover:
- Happy path (mock NerdGraph responses)
- Empty/no-results responses
- Missing required parameters
- Write-enabled / write-disabled gating
- API error responses
- Unexpected response format
License
This project is licensed under the Functional Source License, Version 1.1, ALv2 Future License.
Copyright 2026 Karl Dane
See LICENSE file for full terms.
References
- MCP Framework — Base framework with EnforcerProfile support
- New Relic NerdGraph API
- NRQL Reference
- New Relic API Explorer — Interactive GraphQL playground
Tool Inventory
The server registers 55 tools total:
- 6 NRQL / APM / Trace tools: nrql_query, list_applications, get_apm_metrics, get_application_metrics, query_traces, get_transaction_traces, get_trace_details
- 10 Alert tools: list_alerts, get_alert_policy, get_alert_conditions, get_alert_violations, list_nrql_alert_conditions, create_alert_policy, update_alert_policy, delete_alert_policy, create_alert_condition, acknowledge_alert_violation
- 5 Synthetic Monitoring tools: list_synthetic_monitors, get_synthetic_monitor, list_private_locations, create_ping_monitor, delete_synthetic_monitor
- 7 Dashboard tools: list_dashboards, get_dashboard, get_dashboard_data, create_dashboard, update_dashboard, delete_dashboard, add_dashboard_widget
- 2 Log tools: search_logs, tail_logs
- 1 Infrastructure tool: get_infrastructure_metrics
- 5 Workflow tools: list_workflows, get_workflow, create_workflow, update_workflow, delete_workflow
- 5 Notification tools: list_notification_channels, list_destinations, create_slack_channel, create_email_channel, delete_notification_channel
- 3 Service Level tools: list_service_levels, create_service_level, update_service_level
- 4 Tag tools: get_entity_tags, add_entity_tags, remove_entity_tags, replace_entity_tags
- 2 Entity tools: search_entities, delete_entity
- 1 Cross-account NRQL tool: cross_account_nrql
- 2 Workload tools: list_workloads, get_workload
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。