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.

Add a server

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

# streamable HTTP
testrelic mcp add --transport http myserver https://example.com/mcp

testrelic mcp list
testrelic mcp remove everything

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.

Server-side feature flag

The server side of this round-trip is gated by ASK_AI_CLIENT_TOOLS_ENABLED. If client tools appear inactive, confirm the flag is enabled for your environment.

Next steps

Slash commands · Configuration

Was this page helpful?
Tags:
Last updated on by Srivishnu Ayyagari