{
  "markdown": "# New Relic MCP Server\n\n<!-- mcp-name: io.github.Meet-Bhalodiya/newrelic-mcp -->\n\n[![CI](https://github.com/Meet-Bhalodiya/newrelic-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/Meet-Bhalodiya/newrelic-mcp/actions/workflows/ci.yml) [![License: Apache-2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE) [![Node.js](https://img.shields.io/badge/node-%3E%3D22.7.5-brightgreen.svg)](.nvmrc)\n\n**Connect your AI assistant to New Relic — safely.**\n\nA production-oriented, self-hostable [Model Context Protocol](https://modelcontextprotocol.io)\n(MCP) server that gives Claude, Cursor, Codex, and other MCP clients typed,\nread-only-by-default access to NRQL, logs, metrics, traces, errors, entities, alerts,\nincidents, dashboards, synthetics, workloads, service levels, and selected\nadministration APIs — all over New Relic's NerdGraph.\n\nIt deliberately does **not** expose arbitrary GraphQL, forward client credentials to\nNew Relic, or accept New Relic keys as tool arguments. Mutations are absent unless\ntheir feature gates are explicitly enabled, and every write uses a dry-run,\nconfirmation phrase, and post-write readback workflow.\n\n## Highlights\n\n- 🔒 **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.\n- 🧱 **Bounded API surface** — a fixed, documented set of NerdGraph operations; no arbitrary GraphQL and no credentials passed as tool arguments.\n- 🔌 **Works with any MCP client** — Claude Code, Claude Desktop, Cursor, Codex, and more, over stdio or stateless Streamable HTTP.\n- 📈 **Usage telemetry built in** — a Prometheus `/metrics` endpoint with per-tool call counts, durations, and outcomes, plus upstream NerdGraph, queue-depth, retry, rate-limit, and cache metrics.\n- 🏢 **Enterprise-ready** — bearer/OIDC authentication, Host/Origin allowlists, account allowlists, secret and PII redaction, Docker, and Helm.\n- 🧰 **Broad coverage** — independently selectable toolsets for NRQL, entities, alerts, dashboards, synthetics, workloads, service levels, logs, and metrics.\n- 📚 **Documented and tested** — architecture docs, ADRs, and a unit/integration/contract/security/load test suite that gates every change in CI.\n\n## What you can ask\n\nOnce connected, ask your MCP client in plain language — it selects and calls the right read-only tools for you:\n\n- \"What are the slowest transactions for the checkout service in the last hour?\"\n- \"Summarize the open incidents for the payments team and their likely causes.\"\n- \"Which service levels are at risk of missing their objective this week?\"\n- \"Review my alert policies and point out coverage gaps.\"\n- \"Why did the login synthetic monitor fail overnight?\"\n\nSee the [tool catalog](docs/tool-catalog.md) for the complete set of capabilities.\n\n## Why this MCP?\n\nNew Relic offers an official, New Relic-hosted MCP server\n([New Relic AI MCP](https://docs.newrelic.com/docs/agentic-ai/mcp/overview/), currently\nin preview). This project is a complementary, **self-hostable and open-source**\nalternative. Choose it when you want:\n\n- **Self-hosting and control** — run the MCP bridge inside your own network with your\n  own credentials; only outbound NerdGraph calls leave your perimeter. (New Relic's\n  preview is not offered for FedRAMP-regulated accounts.)\n- **Read-only by default, with gated writes** — every mutation is opt-in and runs a\n  dry-run → confirmation-phrase → readback flow.\n- **A fixed, auditable operation surface** — a documented set of NerdGraph operations,\n  with no arbitrary GraphQL and no New Relic keys passed as tool arguments.\n- **Your own controls** — bearer/OIDC auth, Host/Origin and account allowlists, secret\n  redaction, and independently selectable toolsets.\n- **First-class telemetry** — Prometheus metrics for tool usage and upstream calls that\n  you can scrape into your existing observability stack.\n- **Apache-2.0 and forkable** — inspect, pin, and extend exactly what you deploy.\n\nIf you'd rather have a zero-operations, New Relic-managed experience integrated with\nNew Relic AI, the official server may be the better fit. This project trades that\nconvenience for self-hosting, control, and auditability.\n\n> Project status: 1.0.0. Review the [supported operation matrix](docs/source-matrix.md)\n> and validate permissions against a non-production New Relic account before enabling\n> writes. The MCP Registry, npm, container, and MCPB metadata are prepared, but this\n> repository does not publish artifacts without maintainer credentials.\n\n## Requirements\n\n- Node.js 22.7.5 or newer; Node 24 LTS is recommended for production.\n- A New Relic **user key** with only the permissions the enabled toolsets require.\n- A New Relic account using the US or EU endpoint, or a verified JP compatibility\n  endpoint deployment (see [configuration](docs/configuration.md#new-relic)).\n- An MCP client supporting stdio or Streamable HTTP.\n\nNew Relic applies a limit of 25 concurrent NerdGraph requests per user across all\nkeys owned by that user. This server defaults to 20 total requests and five complex\nNRQL queries. See [performance and scaling](docs/performance.md) before adding\nreplicas. Ordinary HTTP calls are sessionless; prompt SDK cancellation across\nmultiple replicas additionally requires deterministic load-balancer affinity.\n\n## Quick start: stdio\n\nInstall the package globally:\n\n```bash\nnpm install --global @meet-bhalodiya/newrelic-mcp\nexport NEW_RELIC_API_KEY='NRAK-...'\nexport NEW_RELIC_REGION='US'\nnewrelic-mcp doctor --json\nnewrelic-mcp\n```\n\nOr let the MCP client invoke the pinned package through `npx`:\n\n```bash\nNEW_RELIC_API_KEY='NRAK-...' \\\n  npx -y @meet-bhalodiya/newrelic-mcp@1.0.0 doctor --json\n```\n\nStdio reserves stdout for MCP frames. Runtime diagnostics and logs go to stderr.\n\n## Quick start: authenticated HTTP\n\nCreate two files readable only by the service account:\n\n```bash\ninstall -m 0700 -d ./secrets\nprintf '%s' \"$NEW_RELIC_API_KEY\" > ./secrets/new_relic_api_key\nopenssl rand -hex 32 > ./secrets/mcp_bearer_token\nchmod 0400 ./secrets/*\n```\n\nStart a loopback-only container:\n\n```bash\ndocker compose up --build\n```\n\nThe MCP endpoint is `http://127.0.0.1:3000/mcp`; health probes are at `/healthz`\nand `/readyz`. Docker Compose deliberately enables static bearer authentication.\nRead the token from `./secrets/mcp_bearer_token` and send it in\n`Authorization: Bearer <token>`.\n\nFor a native process:\n\n```bash\nexport NEW_RELIC_API_KEY_FILE=\"$PWD/secrets/new_relic_api_key\"\nexport MCP_AUTH_MODE=bearer\nexport MCP_BEARER_TOKEN_FILE=\"$PWD/secrets/mcp_bearer_token\"\nnewrelic-mcp http --host 127.0.0.1 --port 3000\n```\n\nNon-loopback HTTP must use bearer or OIDC auth, an explicit Host allowlist, TLS at\nthe reverse proxy, and an Origin allowlist for browser clients. See\n[deployment](docs/deployment.md) and [security](docs/security.md).\n\n## Client setup\n\nThese short examples use the read-only stdio server. The full guide includes remote\nbearer and OAuth setups plus client-specific caveats.\n\n### Claude Code\n\n```bash\nclaude mcp add --transport stdio --scope user \\\n  --env NEW_RELIC_API_KEY=\"$NEW_RELIC_API_KEY\" \\\n  --env NEW_RELIC_REGION=US \\\n  newrelic -- npx -y @meet-bhalodiya/newrelic-mcp@1.0.0\n```\n\nUse `/mcp` inside Claude Code to verify the connection.\n\n### Claude Desktop\n\nFor the safest local installation, build or download the `.mcpb` bundle and use\n**Settings → Extensions → Advanced settings → Install Extension**. Claude Desktop\nstores fields marked sensitive in OS secure storage. A manual local stdio JSON\nexample is in [client configuration](docs/client-configuration.md). Remote servers\nmust be added through **Settings → Connectors**, not `claude_desktop_config.json`.\n\n### Cursor\n\nCopy [`examples/cursor.mcp.json`](examples/cursor.mcp.json) to `.cursor/mcp.json`\nfor one project or `~/.cursor/mcp.json` globally. Launch Cursor from an environment\nwhere `NEW_RELIC_API_KEY` is available, then enable the server under MCP settings.\n\n### Codex\n\n```bash\ncodex mcp add newrelic \\\n  --env NEW_RELIC_REGION=US \\\n  --env NEW_RELIC_API_KEY=\"$NEW_RELIC_API_KEY\" \\\n  -- npx -y @meet-bhalodiya/newrelic-mcp@1.0.0\ncodex mcp list\n```\n\nCodex CLI, the Codex IDE extension, and the ChatGPT desktop app on the same Codex\nhost share `config.toml`. See the [Codex examples](docs/client-configuration.md#codex)\nfor Streamable HTTP bearer and OAuth modes.\n\n## CLI\n\n```text\nnewrelic-mcp [stdio]\nnewrelic-mcp http [--host HOST] [--port PORT]\nnewrelic-mcp doctor [--json]\nnewrelic-mcp tools [--json]\n```\n\n- `stdio` (or no subcommand) starts the local transport.\n- `http` serves sessionless Streamable HTTP at `/mcp` plus health endpoints; its\n  bounded cancellation registry is process-local.\n- `doctor` validates configuration, credentials, region, accessible accounts, and\n  one bounded fixed-query schema selection for every effectively enabled toolset;\n  it never issues mutations or prints secrets.\n- `tools` reports enabled toolsets and safety gates without contacting New Relic.\n\n## Safety model\n\n| Capability                                                               |                      Default | Required setting                                         |\n| ------------------------------------------------------------------------ | ---------------------------: | -------------------------------------------------------- |\n| Read tools                                                               | enabled by selected toolsets | `NEW_RELIC_TOOLSETS`                                     |\n| Ordinary writes                                                          |                          off | `NEW_RELIC_ENABLE_WRITES=true`                           |\n| Delete, cancel, revoke, replacement update, public exposure, suppression |                          off | writes plus `NEW_RELIC_ENABLE_DESTRUCTIVE=true`          |\n| Organization administration                                              |                          off | `NEW_RELIC_ENABLE_ADMIN=true` and appropriate auth scope |\n| Preview data-management APIs                                             |                          off | `NEW_RELIC_ENABLE_PREVIEW_APIS=true`                     |\n| Experimental AI issue actions                                            |                          off | `NEW_RELIC_ENABLE_EXPERIMENTAL_AI_ISSUES=true`           |\n\nEnabling a gate registers the corresponding tool; it does not bypass New Relic\npermissions or HTTP authorization scopes. Writes still default to dry-run. Apply\nthe exact confirmation phrase returned by the dry-run using otherwise identical\narguments. Confirmation phrases bind to the normalized change and the pre-read state;\nanother state change requires a fresh dry-run.\n\nThe project deliberately excludes API-key creation, synthetic secure-credential\nmutation, live-dashboard passwords and resets, historical-export URLs, Slack\ndestination creation, arbitrary entity deletion, telemetry ingest, and raw GraphQL.\n\n## Toolsets and MCP capabilities\n\nThe default read surface is split into independently selectable toolsets:\n\n- `core`\n- `nrql`\n- `entities`\n- `alerts`\n- `dashboards`\n- `synthetics`\n- `workloads`\n- `service-levels`\n- `logs`\n- `metrics`\n- `admin` (never enabled implicitly)\n\nUse `newrelic-mcp tools --json` for the exact runtime catalog and\n[tool-catalog.md](docs/tool-catalog.md) for descriptions. Resources include server\ncapabilities, accounts, and typed entity/configuration templates. Static prompts\ncover incident triage, service health, alert policy review, SLO review, dashboard\ndesign, and synthetic failure analysis. Tools remain the authoritative universal\ninterface because prompt and resource support varies between MCP clients.\n\n## Configuration\n\nConfiguration is validated at startup. The most important settings are:\n\n```dotenv\nNEW_RELIC_API_KEY=                  # xor NEW_RELIC_API_KEY_FILE\nNEW_RELIC_REGION=US                 # US, EU, or JP\nNEW_RELIC_DEFAULT_ACCOUNT_ID=\nNEW_RELIC_ACCOUNT_ALLOWLIST=\nNEW_RELIC_TOOLSETS=core,nrql,entities\nMCP_AUTH_MODE=none                  # none, bearer, oidc\n```\n\nFile-based secrets are preferred for services and take the same value as their\nenvironment equivalents. Do not set both forms. Review [configuration.md](docs/configuration.md)\nfor precedence, every setting, validation rules, and examples.\n\n## Development\n\n```bash\nnpm ci\nnpm run build\nnpm run lint\nnpm run typecheck\nnpm test\nnpm run verify\nnpm pack --dry-run\n```\n\nRun locally with a workspace-specific HTTP port:\n\n```bash\nCONDUCTOR_PORT=3100 npm run dev:http\n```\n\nOpt-in live tests require an explicit account and are read-only unless the separate\ndisposable-account write flag is set. See [development.md](docs/development.md) and\n[CONTRIBUTING.md](CONTRIBUTING.md).\n\n## Documentation\n\n- [Architecture](docs/architecture.md)\n- [Configuration reference](docs/configuration.md)\n- [Tool catalog](docs/tool-catalog.md)\n- [New Relic permissions and editions](docs/permissions.md)\n- [Client configuration](docs/client-configuration.md)\n- [Deployment](docs/deployment.md)\n- [Performance](docs/performance.md)\n- [Security and threat model](docs/security.md)\n- [Troubleshooting](docs/troubleshooting.md)\n- [Official API source matrix](docs/source-matrix.md)\n- [Release process](docs/releasing.md)\n- [Dependency policy](docs/dependency-policy.md)\n- [Architecture decisions](docs/adr/README.md)\n\n## Contributing\n\nContributions are welcome — bug reports, features backed by official New Relic\ndocumentation, docs, and tests. Start with [CONTRIBUTING.md](CONTRIBUTING.md) and the\n[good first issues](https://github.com/Meet-Bhalodiya/newrelic-mcp/labels/good%20first%20issue).\nAll participation follows the [Code of Conduct](CODE_OF_CONDUCT.md).\n\nIf this project is useful to you or your team, a ⭐ helps others discover it.\n\n## Support and security\n\nNeed help? See [SUPPORT.md](SUPPORT.md). Use\n[GitHub Issues](https://github.com/Meet-Bhalodiya/newrelic-mcp/issues) for reproducible\nbugs and feature requests, and never include New Relic keys, bearer tokens, NRQL,\naccount data, entity details, raw responses, or presigned URLs.\n\nReport vulnerabilities privately according to [SECURITY.md](SECURITY.md).\n\n## License\n\nApache License 2.0. See [LICENSE](LICENSE).\n",
  "bytes": 14248,
  "sha": "46e82df739f9aa5841e37fc8c39b6d18c6a221f4770778de7fb52c2d533a5802",
  "repo_slug": "meet-bhalodiya/newrelic-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_meet_bhalodiya_newrelic_mcp_3af09f12/readme"
}