Skip to main content
Ask AI

Authentication

The MCP server needs one credential: a TestRelic MCP personal access token (values start with tr_mcp_). Integration settings for Jira, Amplitude, Grafana Loki, GitHub, TestMu AI, and BrowserStack are loaded from your organization in the TestRelic cloud after the MCP authenticates—you do not put those secrets in MCP config.

Mock mode is the default

The zero-config / marketplace install runs in --mock-mode with no network calls and no token, so you can explore the tools first. Follow the steps below only when you want to connect real org data.

1. Create a token

  1. Sign in to the TestRelic web app (same place you use for dashboards), e.g. platform.testrelic.ai.
  2. Open Settings → MCP tokens at platform.testrelic.ai/settings/mcp-tokens (or your admin-provided equivalent).
  3. Create a token and copy the tr_mcp_… value once; store it in a password manager.

2. Store the token

Option A — CLI (writes a file)

Save token to the default file
npx -y @testrelic/mcp@3.0.0 login

Paste the token when prompted. This stores the token for the MCP process to read on startup.

Option B — Environment variable

Set TESTRELIC_MCP_TOKEN to your tr_mcp_… value in your shell profile, CI secrets, or your MCP client’s env block in mcp.json. Do not commit token values to git.

3. Cloud API base URL

If your SDK already uses a custom API endpoint, point the MCP at the same API base (including /api/v1 if that is part of your URL):

  • Environment variable: TESTRELIC_CLOUD_URL
  • Or flag: --cloud-url on the CLI (see package docs)

If unsure, use the same hostname your reporter uses for uploads (see Configuration and Appium configuration).

4. Default repository (optional)

If your tools omit a project id, set a default:

  • TESTRELIC_DEFAULT_REPO_ID, or
  • --default-repo-id on the CLI

5. Enable cloud mode in the client

To connect real data: create the tr_mcp_* token (above), run npx @testrelic/mcp login (or set TESTRELIC_MCP_TOKEN=tr_mcp_…), then remove --mock-mode from your MCP server args. Keep mock mode until a token is configured if you want zero outbound calls.

Next steps

Capabilities · Testing workflow

Loading chart…
Was this page helpful?
Last updated on by Srivishnu Ayyagari