MCP Server · v3.0.0Beta

Testing intelligence for every AI coding assistant.

Give Cursor, Claude, and Copilot real testing context — journeys, coverage, run history, and auto-heal patches — through the Model Context Protocol. One token. Zero per-service secrets.

Production · mcp.testrelic.ai + npm @testrelic/mcpMCP Auth Tokenstdio + HTTP · AGPL-3.0
Agent
Cursor / Claude
MCP
@testrelic/mcp
Cloud
TestRelic
Real journeys · Runs · Coverage · Healing

Works with any MCP client

Cursor
Claude Desktop
VS Code Copilot Chat
OpenAI MCP bridge
Anthropic MCP
Any MCP client
Custom agent
Sampling-aware
Cursor
Claude Desktop
VS Code Copilot Chat
OpenAI MCP bridge
Anthropic MCP
Any MCP client
Custom agent
Sampling-aware
Cursor
Claude Desktop
VS Code Copilot Chat
OpenAI MCP bridge
Anthropic MCP
Any MCP client
Custom agent
Sampling-aware
Cursor
Claude Desktop
VS Code Copilot Chat
OpenAI MCP bridge
Anthropic MCP
Any MCP client
Custom agent
Sampling-aware

Four intelligence cases

Context your AI agent actually needs.

A compact, composable tool surface engineered for token efficiency — so your agent stays focused on the work, not on hunting for data.

core

Core & connectivity

Repositories, resolved config, health, and recent runs—always-on primitives every other tool builds on.

Workspace · health + repos
tr_healthnominal
acme-webmobile-appdesign-system
#8841passedPlaywright
#8840failedPlaywright
tr_recent_runs · paginated
triage

Run triage & RCA

Diagnose failures, compare runs, audit flaky tests, pull platform RCA, and open Jira—without leaving the agent.

Run diagnostic
tr_diagnose_runtr_flaky_audit
TimeoutError: locator resolved to hidden element
video markers·ClickHouse flake score
tr_create_jiraTRL-902
signals

Production signals

Blend Amplitude user impact with Grafana Loki patterns so fixes are sized against real sessions, not guesswork.

Impact + logs
tr_user_impact
2.4k
affected users
tr_production_signal
ERRPOST /checkout 5xx spike
WRNretry storm · api-cart
tr_affected_sessions · cohort for comms / rollback
devtools

Dev intelligence

Quality trends, alert posture, code search, and cache stats—keep the agent grounded in how the suite behaves over time.

Quality trends
tr_project_trends14d window
Quality gate
pass rate below threshold
tr_active_alerts

Install in under a minute

One server. Every MCP client.

Production: use the hosted MCP endpoint, run @testrelic/mcp@3.0.0 over npx with your TESTRELIC_MCP_TOKEN, or install the Cursor plugin. Optional sandbox tab covers --mock-mode for non-production only.

Install via
~/.cursor/mcp.jsonJSON
Production streamable HTTP endpoint — no local Node checkout. Same URL family as TestRelic’s prod MCP ingress (mcp.testrelic.ai).
{
"mcpServers": {
"testrelic": {
"url": "https://mcp.testrelic.ai/mcp"
}
}
}

CLI: mcp-server-testrelic login · env: TESTRELIC_MCP_TOKEN

Eight capability groups · 35+ tools

Pick only the tools you need.

Every capability maps 1:1 to a tool group. Enable what the task requires — the agent only ever sees that slice of the schema.

Capabilitycore

Always on · repositories, runs, config, health.

tr_describe_repo()
read

Returns a repo's integrations and capabilities. Sourced from the startup bootstrap — zero additional upstream calls.

tr_get_config()
read

Returns the resolved configuration — capabilities, transport, timeouts, cache/output dirs.

tr_health()
read

Reports upstream connectivity, cache state, and whether any circuit breakers are open.

tr_integration_status()
read

Live health check for one integration type in the current org (e.g. 'jira', 'amplitude', 'grafana-loki').

tr_list_repos()
read

Lists repos the authenticated user can see in cloud-platform-app. No upstream fetch per call.

tr_recent_runs()
read

Paginated list of recent runs. Supports filters by repository, framework, status.

Legacy v1 testrelic_* aliases are registered for every tool to preserve backward compatibility.

Live `--caps` flag

Toggle capabilities above and the CLI command below updates in real time. `core` is always on.

shell
$ npx -y @testrelic/mcp@3.0.0 --caps core,coverage,creation,healing,impact

Enabled

corecoveragecreationhealingimpacttriagesignalsdevtools

Capability gating cuts the tool schema by ~4× for AI agents — only the tools you enable appear in the schema.

Ready-made prompts

Chain tools into complete workflows.

Three first-party prompts ship with the server — exposed to every MCP client the moment the server boots.

coveragecreation
create_test_from_gap

End-to-end journey → test flow

From a coverage gap to a runnable test in one prompt.

Picks a top uncovered journey, drafts a plan, synthesises test code, and runs tsc + --list before returning.

journey gapplangeneratedry-run
triagehealing
triage_and_heal

diagnose → RCA → heal → Jira

One chain to take a red run to a merged fix.

Diagnoses the run, pulls platform RCA, proposes a unified-diff patch, and files (or dedupes) a Jira ticket.

failing runRCApatch diffJira ticket
impact
pr_impact_gate

Risk-rank tests for a diff

Turn PR review into a disciplined gate.

Parses the diff, computes the blast-radius on real Amplitude users, and emits a ranked test selection.

PR diffaffected coderisk scoreMUST / SHOULD / OPTIONAL
> 60 % fewer tokens vs plain LLM prompting

A four-layer cache, engineered for tokens.

Every tool call cascades through L1 → L4 with a cache-first path, returns compact markdown plus structured JSON, and pins token baselines in CI so the savings don't drift.

Tool request
tr_coverage_report{project_id}
Response
cache_key · 95% cov
L1LRU (in-process)
lru-cache · 60s TTL
70%
hit rate
L2SQLite (disk)
better-sqlite3 · 1h – 24h TTL
18%
hit rate
L3Vector (HNSW)
hnswlib + BGE-small · semantic match
8%
hit rate
L4Blob store
SHA256 keyed · large payloads
4%
hit rate
3-state reads (full / unchanged / diff) via SimHashper-tool token budget · auto-truncateclient-side sampling · no server-side LLM key

Capability gating

The LLM only sees tool schemas for the caps you enable — cuts the prompt surface by roughly 4×.

3-state reads

Every read tool supports full / unchanged / diff via SimHash — repeat reads of large payloads cost almost nothing.

Per-tool token budget

Automatic truncation with a cache_key pointer back to the full blob so the agent can opt-in when needed.

Client-side sampling

Code synthesis runs on the client's model via MCP sampling — no server-side LLM key is ever required.

Credential flow
Your machine / CI

One TestRelic token—no third-party secrets stored locally.

TestRelic Cloud
Server-side bootstrap
Jirascoped
Amplitudescoped
Grafana Lokiscoped
GitHubscoped

Per-service credentials stay in the cloud database; they never reach the MCP process.

Per-service secrets are locked inside TestRelic's cloud database. The MCP never sees them.

Security model

One token. Zero third-party secrets.

Authentication collapses to a single personal access token from TestRelic. Every integration is brokered by the TestRelic cloud—so your laptop, CI runners, and editor installs never hold a Jira or Amplitude key.

One credential
You authenticate with a single personal access token from TestRelic. Pass it through the CLI, your shell environment, or a local profile file—never a stack of third-party keys on the machine.
Bootstrap, don't store
Jira, Amplitude, Grafana Loki, and GitHub are resolved server-side in the TestRelic cloud. Per-service credentials never live on your laptop or CI runner.
Capability-scoped surface
The server ships as eight capability groups and dozens of tools. You enable only the slices your workflow needs—so agents see a smaller schema, less context noise, and a tighter operational footprint.

Open source

Read every line. Run it offline.

The plugin surface is intentionally tiny — a manifest, an mcp.json, vendored dist/, a logo, and docs. No binaries, no remote-fetched scripts, no third-party credentials. Reviewers can audit the tool surface in sandbox (--mock-mode) before connecting production data with an MCP token.

License
AGPL-3.0
Use, modify, and redistribute.
Package
@testrelic/mcp
Binary: mcp-server-testrelic
Monorepo
packages/mcp + extension
Server + VSCode / Cursor host.
Source
testrelic-ai/testrelic-mcp-server
Pre-built dist/ vendored · no remote fetch.

Ship with context

Give your agent the testing context it needs.

Install via npx or your MCP client and explore every tool against the bundled fixtures. Create an MCP token when you're ready to connect real data — or talk to us first.

npx -y @testrelic/mcp@3.0.0 · https://docs.testrelic.ai/mcp/quickstart