# @newrelic/preflight

New Relic MCP server for observing AI coding assistants (Claude Code, Cursor, Copilot, etc.)

- **Type:** MCP server
- **Trust:** 85/100 (A), scored on the package rubric
- **Verification:** verified (build provenance)
- **Version:** 1.57.0
- **Author:** io.github.newrelic-experimental
- **License:** Apache-2.0
- **npm:** @newrelic/preflight
- **Source:** https://github.com/newrelic-experimental/preflight
- **Compatible clients:** claude-code, cursor, copilot, gemini (basis: transport)

## Trust

85/100 (A), scored on the package rubric
- Publisher verified: no
- Build provenance: verified attestation
- npm trusted publishing (OIDC): yes
- Install scripts: nothing suspicious found
- Prompt-injection scan: not run
- Obfuscation scan: not run
- Evidence age: 17 days

## Security scan

- **Status:** clean
- **Scanned:** 2026-09-06T21:18:04.075Z
- **Version scanned:** 1.44.0
- **CVEs:** none found by OSV at scan time
**Findings**
- injection-shaped content (note) in the `nr_observe_get_context_composition` tool: References the system prompt

## Tools

40 declared. Statically extracted from the shipped source — a floor on the surface, not a census.
- `nr_observe_get_context_efficiency` — Get context window efficiency metrics: unique vs. repeated file reads, repeated-read ratio, and top re-read files. A high ratio suggests the model is losing con
- `nr_observe_get_latency_percentiles` — Get p50/p95/p99 latency percentiles for tool calls, broken down by tool type. Use to identify which tools are slowest in the current session.
- `nr_observe_get_task_completion_rate` — Get task lifecycle metrics: completed task count, average task duration, and average tool calls per task.
- `nr_observe_get_model_usage` — Get per-model usage statistics: request counts, token totals (input, output, thinking, cache read, cache creation), cost, and cost per million billed tokens. Id
- `nr_observe_get_context_tracking` — Get context window tracking: per-turn token growth, category breakdown (System/Tools/User/Assistant), fill percentage, and per-tool output contribution. Shows w
- `nr_observe_report_tokens` — Report token usage for cost tracking. Call periodically to enable accurate cost metrics.
- `nr_observe_get_cost_breakdown` — Get a breakdown of session costs by task, model, and efficiency metrics like cost per line of code. Cost figures are Preflight's own list-price estimate unless 
- `nr_observe_get_budget_status` — Get current AI spend vs. configured budget caps (session, daily, weekly). Returns remaining budget, % used, and any threshold alerts fired this session.
- `nr_observe_get_cost_forecast` — Project AI spending forward based on current session rate. Returns forecast cost for end-of-day, end-of-week, and end-of-session (8h), with a confidence note.
- `nr_observe_get_prompt_cache_health` — Get prompt cache health: hit rate, savings, and a concrete recommendation for improving cache efficiency.
- `nr_observe_get_session_history` — Get a list of past sessions with summary metrics (efficiency, cost, tool calls, outcome).
- `nr_observe_get_weekly_summary` — Get a weekly summary report with per-developer breakdown, cost, efficiency, and anti-pattern counts.
- `nr_observe_get_trends` — Get trend data for a metric over time: weekly efficiency, cost, task success rate, or tool call counts.
- `nr_observe_get_collaboration_profile` — Get a developer's collaboration profile: specificity, autonomy, correction rate, task complexity, and classification.
- `nr_observe_get_claudemd_impact` — Get the impact report for the most recent change to the project's instruction file
- `nr_observe_get_cost_per_outcome` — Get cost breakdown by outcome type (bug fix, feature, refactor, etc.) with waste ratio and ROI estimate.
- `nr_observe_get_recommendations` — Get personalized optimization recommendations covering cost, efficiency, prompt engineering, CLAUDE.md impact, and model selection.
- `nr_observe_get_model_recommendation` — Get a data-driven model recommendation ranked by historical efficiency score, cost, and task success rate across past sessions, both overall and broken down by 
- `nr_observe_get_platform_comparison` — Compare AI coding assistant platforms side-by-side on a given metric: efficiency, cost, task_success, tool_calls, or error_rate.
- `nr_observe_get_team_summary` — Get aggregated AI coding cost and efficiency metrics for all developers in the configured team, queried via New Relic NRQL. Requires teamId to be set in config.
- `nr_observe_subscribe_digest` — Register a Slack webhook URL to receive weekly AI coding cost and efficiency summaries.
- `nr_observe_unsubscribe_digest` — Remove the registered Slack webhook for weekly digests.
- `nr_observe_send_digest` — Generate the current weekly AI coding summary and POST it to the configured Slack webhook immediately.
- `nr_observe_get_personal_insights` — Returns a narrative coaching report comparing this week's personal AI coding metrics against your historical baseline.
- `nr_observe_get_retry_alerts` — Get thrashing/retry detection alerts: repeated failures or highly similar inputs within a sliding window. Identifies when the agent is stuck in a loop.
- `nr_observe_get_context_composition` — Get per-turn token breakdown by category (system prompt, conversation history, tool results, injected files). Shows context window fill percentage and dominance
- `nr_observe_get_latency_decomposition` — Get latency decomposition: how much time is spent in LLM API calls vs tool execution vs overhead, with p50/p95 percentiles for each component.
- `nr_observe_get_decision_tree` — Get decision branch analysis: reasoning and action extraction per turn for triggered branches (recovery, retry, delegation), with outcome tagging. Includes post
- `nr_observe_get_instruction_drift` — Get instruction/prompt drift analysis: tracks how the project's instruction file (CLAUDE.md,
- `nr_observe_get_tool_selection_score` — Get tool selection quality score: evaluates efficiency of tool usage by detecting redundant reads, repeated failures, and unused large outputs. Score 0-1 where 
- `nr_observe_get_quality_proxy` — Get quality proxy metrics: diff apply rate, test pass rate, backtrack count, self-correction count, and degradation detection over the session lifetime.
- `nr_observe_get_api_failures`
- `nr_observe_get_compute_waste` — Get compute waste summary: total tokens wasted on retried tool calls and anti-pattern activity (stuck loops, redundant reads, thrashing). Includes per-pattern b
- `nr_observe_report_tool_call` — Report a tool call event for observability. Use this to report non-MCP tool calls
- `nr_observe_report_session_start` — Report that a new AI coding session has begun. Call this at the start of a session
- `nr_observe_report_session_end` — Report that the current AI coding session has ended. Call this at the end of a session
- `nr_observe_get_session_stats` — Get current session observability metrics: tool call counts, success rates, file access stats, and duration summaries.
- `nr_observe_health` — Check server health: version, uptime, session ID, and connection timestamp. Also reports whether telemetry event sends are succeeding. Use when the MCP connecti
- `nr_observe_get_config` — Show the current server configuration (sensitive fields masked): mode, developer, account, region, storage path, dashboard URL, and config file location. Use to
- `nr_observe_get_session_timeline` — Get an ordered list of recent tool calls with timestamps, names, durations, and success/failure status.

## Install

**Verdict: install** — No blocking findings and no open coverage gaps — safe to install as configured.
**Config** (claude-code):
```json
"{\n  \"mcpServers\": {\n    \"preflight\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"@newrelic/preflight\"\n      ],\n      \"env\": {\n        \"NEW_RELIC_LICENSE_KEY\": \"<YOUR_NEW_RELIC_LICENSE_KEY>\"\n      }\n    }\n  }\n}"
```
**Credentials it will ask for** (names only — Forge never holds a value):
- `NEW_RELIC_LICENSE_KEY` — New Relic License Key (optional)
Placeholders only. Forge never holds, brokers, or transmits a credential value — replace each <YOUR_NAME> in your own config file. Do not send a value back to Forge; no Forge endpoint accepts one.
- This entry needs 1 credential (0 required). The generated config carries placeholders, so it will fail in the editor rather than at runtime if they are left unset.

## Blast radius

Moderate blast radius — holds an api key; runs on your machine.
- Floor 23, ceiling 23 (tier: moderate)
- This is impact, not likelihood. A high radius is not a defect: a filesystem server is supposed to write files. It is never part of the trust score.

## Machine-readable views of this entry

- Signed JSON: https://forgeregistry.com/api/v1/packages/%40newrelic%2Fpreflight
- Install plan: https://forgeregistry.com/api/v1/packages/%40newrelic%2Fpreflight/install-plan
- Alternatives: https://forgeregistry.com/api/v1/alternatives/%40newrelic%2Fpreflight
- HTML page: https://forgeregistry.com/registry/%40newrelic%2Fpreflight
- MCP: POST https://forgeregistry.com/api/mcp → `forge_get_package` / `forge_install_plan`

## About this document

Generated by Forge (https://forgeregistry.com) — a compact rendering of the same record served, signed, at the JSON URL above. Trust and scan facts are the registry's own measurements; anything Forge did not measure is named as unmeasured rather than omitted.
