Skip to main content
Ask AI

MCP host

Like Claude Code, the TestRelic CLI is a full MCP host. It spawns your local MCP servers, lists their tools, and advertises them to the cloud agent. When the agent calls one, the CLI executes it locally and posts the result back — the agent's stream continues with your local tool's output.

Manage servers

Use testrelic mcp add | list | remove to manage the local MCP servers the agent can call:

# stdio child process
testrelic mcp add everything -- npx -y @modelcontextprotocol/server-everything

# streamable HTTP (HTTPS endpoints supported)
testrelic mcp add --transport http myserver https://example.com/mcp

# write to the global config instead of the project file
testrelic mcp add --global everything -- npx -y @modelcontextprotocol/server-everything

testrelic mcp list
testrelic mcp remove everything
  • --transport http adds a streamable-HTTP server; HTTPS endpoints are supported.
  • --global writes to ~/.testrelic/mcp.json instead of the project-local ./.mcp.json.
  • Presets — common servers can be added by short name without typing the full command.

Config files

Project config lives in ./.mcp.json (the Claude-Code-compatible format); global config in ~/.testrelic/mcp.json. On a name collision, the project config wins.

.mcp.json
{
"mcpServers": {
"everything": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-everything"]
}
}
}

How a tool call flows

On startup the CLI spawns every configured server, lists its tools, and advertises them to the cloud agent as <server>__<tool> (for example everything__echo). When the agent decides to call one:

  1. The cloud agent emits a client_tool_use request.
  2. The CLI executes the tool locally against the matching MCP server.
  3. The CLI posts the result back, and the agent's stream resumes with that output.

Use /mcp in the interactive UI to see live server health and each server's tool list.

Capabilities and limits

The host advertises a set of capabilities to the cloud agent via TESTRELIC_MCP_CAPS. These must be valid server capability values, and which set is available depends on your mode:

  • Cloud mode — the full capability set is available.
  • Local mode — capabilities are read-only.

A single turn can surface up to 200 client tools to the cloud agent, matching the deployed server's limit. See Capabilities for what each one covers.

Next steps

Slash commands · Configuration

Was this page helpful?
Tags:
Last updated on by hashtaghacker