Skip to main content
Ask AI

Quickstart

Pick how you reach the server in production: hosted MCP at mcp.testrelic.ai (streamable HTTP, no local binary), npx with the published @testrelic/mcp package (stdio, any MCP client), or the Cursor marketplace plugin if you use Cursor. Optional sandbox paths (mock mode or a local git clone) are for evaluation and development only.

Purpose

Install or connect the TestRelic MCP server so your MCP host can use it (hosted URL or stdio), set a production MCP personal access token, then verify with tr_health.

Concept: stdio wiring

Install path vs typical setup depth

Horizontal bars compare how many discrete steps teams often budget before tr_health succeeds — illustrative counts for planning, not a guarantee. Bars assume production (hosted URL or npx with a token), not local sandbox builds.

Loading chart…

Cursor — marketplace

  1. In Cursor, open Settings → Plugins and search for testrelic-mcp.
  2. Install the plugin. Cursor registers the MCP server from the bundled config; see the plugin’s mcp.json in testrelic-mcp-server for the exact wiring shipped to the marketplace.
  3. Open the agent and try a small prompt, for example: list TestRelic projects or call tr_health.

For live org data in production, create an MCP token and ensure your client supplies it as described in Authentication (environment variable, login, or your host’s supported credential mechanism).

Manual mcp.json

Add a server entry to your client’s MCP configuration. Prefer hosted or npx + token for production.

Streamable HTTP MCP served at the production hostname (same pattern as mcp.json in the testrelic-mcp-server repo and the local preview scripts, with the production host):

mcp.json fragment
{
"mcpServers": {
"testrelic": {
"url": "https://mcp.testrelic.ai/mcp"
}
}
}

Use your MCP client’s documented way to attach credentials if it requires a header or env for remote servers. Otherwise use the stdio tab so the process can read TESTRELIC_MCP_TOKEN or ~/.testrelic/token from Authentication.

Restart the MCP host app after saving. Run tr_health in the agent to confirm the server responds.

Mock mode vs production cloud

ModeUse when
--mock-modeSandboxes only: learning the tool surface, demos, or CI smoke of the MCP binary. No outbound calls to TestRelic production APIs.
Production (token set, no mock flag)Real repos, runs, journeys, and integrations resolved from your org in the TestRelic cloud.

See Authentication for creating and storing tr_mcp_… tokens.

Troubleshooting

SymptomWhat to try
MCP host does not see the serverRestart the host after editing mcp.json; confirm you used the hosted URL, npx args, or contributor local paths consistently.
tr_health failsRun from the agent after the server binary is reachable; check stderr from the MCP process in host logs.

FAQ

Should I start with mock mode?
Only for sandbox or contributor workflows. For production data, use the hosted URL or npx without `--mock-mode` and configure a token per Authentication.
Can I use both marketplace and manual mcp.json?
Use one path per host to avoid duplicate server definitions. Pick marketplace for Cursor if available; otherwise use hosted URL or npx stdio as in the tabs above.
What npm package name should I use?
The published package is `@testrelic/mcp` (not `@testrelic/mcp-server`). Install with `npx -y @testrelic/mcp@3.0.0` or another current version from the npm registry.

Optional: local mock API (contributors)

For development in testrelic-mcp-server, you can run a local mock HTTP API (npm run mock) and point the MCP at it with --mock-mode. Production users rely on the hosted endpoint or stdio against the real cloud instead.

Next steps

Authentication · Capabilities · Tools reference