
New Relic MCP Server
io.github.Meet-Bhalodiya由 GitHub 帳號 Meet-Bhalodiya 發布v1.0.0更新於 Oct 24, 2026
Secure, self-hosted New Relic observability and administration tools for MCP clients
發布方自己的服務:New Relic MCP Server
概覽
自架的 New Relic MCP 伺服器,讓助理預設以唯讀方式透過 NerdGraph 存取 NRQL、日誌、指標、追蹤、告警、事件、儀表板與合成監控。
- 可以做什麼
- 以 NRQL 查詢可觀測性資料,並檢視日誌、指標、追蹤與錯誤
- 瀏覽實體、工作負載、服務等級與儀表板
- 檢視告警政策、事件與合成監控結果
- 在明確開啟閘門後執行部分管理操作
- 以資源形式提供伺服器能力、帳號與型別化範本,並提供事件排查、服務健康、告警政策檢視、SLO 檢視、儀表板設計與合成失敗分析等提示
- 適用情境
- 適合想讓助理排查生產問題、彙整事件、檢查 SLO 風險或檢視告警涵蓋範圍,且偏好在自己的網路內以自有憑證執行橋接服務、而非使用 New Relic 代管伺服器的情境。
- 執行需求
- 需要 Node.js 22.7.5 以上版本(正式環境建議 Node 24 LTS),以及支援 stdio 或 Streamable HTTP 的本機 MCP 用戶端。需要 New Relic 使用者金鑰,透過 NEW_RELIC_API_KEY(或檔案形式)提供;以 NEW_RELIC_REGION 指定區域(US、EU 或 JP);可選用 NEW_RELIC_DEFAULT_ACCOUNT_ID 與 NEW_RELIC_ACCOUNT_ALLOWLIST。需要能對外連線至 NerdGraph。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 New Relic MCP Server,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
New Relic MCP Server
[CI] [License: Apache-2.0] [Node.js]
Connect your AI assistant to New Relic — safely.
A production-oriented, self-hostable Model Context Protocol (MCP) server that gives Claude, Cursor, Codex, and other MCP clients typed, read-only-by-default access to NRQL, logs, metrics, traces, errors, entities, alerts, incidents, dashboards, synthetics, workloads, service levels, and selected administration APIs — all over New Relic's NerdGraph.
It deliberately does not expose arbitrary GraphQL, forward client credentials to New Relic, or accept New Relic keys as tool arguments. Mutations are absent unless their feature gates are explicitly enabled, and every write uses a dry-run, confirmation phrase, and post-write readback workflow.
Highlights
- 🔒 Safe by default — read-only out of the box; writes are opt-in, gated, and run a dry-run → confirmation-phrase → post-write readback flow.
- 🧱 Bounded API surface — a fixed, documented set of NerdGraph operations; no arbitrary GraphQL and no credentials passed as tool arguments.
- 🔌 Works with any MCP client — Claude Code, Claude Desktop, Cursor, Codex, and more, over stdio or stateless Streamable HTTP.
- 📈 Usage telemetry built in — a Prometheus
/metricsendpoint with per-tool call counts, durations, and outcomes, plus upstream NerdGraph, queue-depth, retry, rate-limit, and cache metrics. - 🏢 Enterprise-ready — bearer/OIDC authentication, Host/Origin allowlists, account allowlists, secret and PII redaction, Docker, and Helm.
- 🧰 Broad coverage — independently selectable toolsets for NRQL, entities, alerts, dashboards, synthetics, workloads, service levels, logs, and metrics.
- 📚 Documented and tested — architecture docs, ADRs, and a unit/integration/contract/security/load test suite that gates every change in CI.
What you can ask
Once connected, ask your MCP client in plain language — it selects and calls the right read-only tools for you:
- "What are the slowest transactions for the checkout service in the last hour?"
- "Summarize the open incidents for the payments team and their likely causes."
- "Which service levels are at risk of missing their objective this week?"
- "Review my alert policies and point out coverage gaps."
- "Why did the login synthetic monitor fail overnight?"
See the tool catalog for the complete set of capabilities.
Why this MCP?
New Relic offers an official, New Relic-hosted MCP server (New Relic AI MCP, currently in preview). This project is a complementary, self-hostable and open-source alternative. Choose it when you want:
- Self-hosting and control — run the MCP bridge inside your own network with your own credentials; only outbound NerdGraph calls leave your perimeter. (New Relic's preview is not offered for FedRAMP-regulated accounts.)
- Read-only by default, with gated writes — every mutation is opt-in and runs a dry-run → confirmation-phrase → readback flow.
- A fixed, auditable operation surface — a documented set of NerdGraph operations, with no arbitrary GraphQL and no New Relic keys passed as tool arguments.
- Your own controls — bearer/OIDC auth, Host/Origin and account allowlists, secret redaction, and independently selectable toolsets.
- First-class telemetry — Prometheus metrics for tool usage and upstream calls that you can scrape into your existing observability stack.
- Apache-2.0 and forkable — inspect, pin, and extend exactly what you deploy.
If you'd rather have a zero-operations, New Relic-managed experience integrated with New Relic AI, the official server may be the better fit. This project trades that convenience for self-hosting, control, and auditability.
Project status: 1.0.0. Review the supported operation matrix and validate permissions against a non-production New Relic account before enabling writes. The MCP Registry, npm, container, and MCPB metadata are prepared, but this repository does not publish artifacts without maintainer credentials.
Requirements
- Node.js 22.7.5 or newer; Node 24 LTS is recommended for production.
- A New Relic user key with only the permissions the enabled toolsets require.
- A New Relic account using the US or EU endpoint, or a verified JP compatibility endpoint deployment (see configuration).
- An MCP client supporting stdio or Streamable HTTP.
New Relic applies a limit of 25 concurrent NerdGraph requests per user across all keys owned by that user. This server defaults to 20 total requests and five complex NRQL queries. See performance and scaling before adding replicas. Ordinary HTTP calls are sessionless; prompt SDK cancellation across multiple replicas additionally requires deterministic load-balancer affinity.
Quick start: stdio
Install the package globally:
Or let the MCP client invoke the pinned package through npx:
Stdio reserves stdout for MCP frames. Runtime diagnostics and logs go to stderr.
Quick start: authenticated HTTP
Create two files readable only by the service account:
Start a loopback-only container:
The MCP endpoint is http://127.0.0.1:3000/mcp; health probes are at /healthz
and /readyz. Docker Compose deliberately enables static bearer authentication.
Read the token from ./secrets/mcp_bearer_token and send it in
Authorization: Bearer <token>.
For a native process:
Non-loopback HTTP must use bearer or OIDC auth, an explicit Host allowlist, TLS at the reverse proxy, and an Origin allowlist for browser clients. See deployment and security.
Client setup
These short examples use the read-only stdio server. The full guide includes remote bearer and OAuth setups plus client-specific caveats.
Claude Code
Use /mcp inside Claude Code to verify the connection.
Claude Desktop
For the safest local installation, build or download the .mcpb bundle and use
Settings → Extensions → Advanced settings → Install Extension. Claude Desktop
stores fields marked sensitive in OS secure storage. A manual local stdio JSON
example is in client configuration. Remote servers
must be added through Settings → Connectors, not claude_desktop_config.json.
Cursor
Copy examples/cursor.mcp.json to .cursor/mcp.json
for one project or ~/.cursor/mcp.json globally. Launch Cursor from an environment
where NEW_RELIC_API_KEY is available, then enable the server under MCP settings.
Codex
Codex CLI, the Codex IDE extension, and the ChatGPT desktop app on the same Codex
host share config.toml. See the Codex examples
for Streamable HTTP bearer and OAuth modes.
CLI
stdio(or no subcommand) starts the local transport.httpserves sessionless Streamable HTTP at/mcpplus health endpoints; its bounded cancellation registry is process-local.doctorvalidates configuration, credentials, region, accessible accounts, and one bounded fixed-query schema selection for every effectively enabled toolset; it never issues mutations or prints secrets.toolsreports enabled toolsets and safety gates without contacting New Relic.
Safety model
Enabling a gate registers the corresponding tool; it does not bypass New Relic permissions or HTTP authorization scopes. Writes still default to dry-run. Apply the exact confirmation phrase returned by the dry-run using otherwise identical arguments. Confirmation phrases bind to the normalized change and the pre-read state; another state change requires a fresh dry-run.
The project deliberately excludes API-key creation, synthetic secure-credential mutation, live-dashboard passwords and resets, historical-export URLs, Slack destination creation, arbitrary entity deletion, telemetry ingest, and raw GraphQL.
Toolsets and MCP capabilities
The default read surface is split into independently selectable toolsets:
corenrqlentitiesalertsdashboardssyntheticsworkloadsservice-levelslogsmetricsadmin(never enabled implicitly)
Use newrelic-mcp tools --json for the exact runtime catalog and
tool-catalog.md for descriptions. Resources include server
capabilities, accounts, and typed entity/configuration templates. Static prompts
cover incident triage, service health, alert policy review, SLO review, dashboard
design, and synthetic failure analysis. Tools remain the authoritative universal
interface because prompt and resource support varies between MCP clients.
Configuration
Configuration is validated at startup. The most important settings are:
File-based secrets are preferred for services and take the same value as their environment equivalents. Do not set both forms. Review configuration.md for precedence, every setting, validation rules, and examples.
Development
Run locally with a workspace-specific HTTP port:
Opt-in live tests require an explicit account and are read-only unless the separate disposable-account write flag is set. See development.md and CONTRIBUTING.md.
Documentation
- Architecture
- Configuration reference
- Tool catalog
- New Relic permissions and editions
- Client configuration
- Deployment
- Performance
- Security and threat model
- Troubleshooting
- Official API source matrix
- Release process
- Dependency policy
- Architecture decisions
Contributing
Contributions are welcome — bug reports, features backed by official New Relic documentation, docs, and tests. Start with CONTRIBUTING.md and the good first issues. All participation follows the Code of Conduct.
If this project is useful to you or your team, a ⭐ helps others discover it.
Support and security
Need help? See SUPPORT.md. Use GitHub Issues for reproducible bugs and feature requests, and never include New Relic keys, bearer tokens, NRQL, account data, entity details, raw responses, or presigned URLs.
Report vulnerabilities privately according to SECURITY.md.
License
Apache License 2.0. See LICENSE.
來源:README.md,提交 0dfdebb
工具
0版本歷史
1- v1.0.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
