Skip to navigation

Setup and configuration

Connect the RubricHQ MCP server to any client, and the options it supports.

Before you start

  • Node.js 20 or later. Check with node --version. Get it from nodejs.org if needed.
  • A RubricHQ API key from Settings → API Keys → Create key, created in the workspace you want your assistant to use.

The server runs on your computer: your client starts it with npx -y @rubrichq/mcp-server, which downloads the latest version the first time.

Because the server runs on your computer, it works in desktop and terminal apps (Claude Desktop, Claude Code, Cursor, VS Code, Codex, Windsurf, Gemini CLI). It isn’t available in claude.ai in the browser or in the Claude mobile apps yet.

Clients

claude mcp add rubrichq --scope user \
-e RUBRICHQ_API_KEY=your_api_key \
-- npx -y @rubrichq/mcp-server
  • --scope user makes RubricHQ available in every project. Use --scope project to share it with your team through .mcp.json (then don’t commit the key; see Keeping your key safe).
  • Check it with claude mcp list, or /mcp inside a session.
  • Remove it with claude mcp remove rubrichq.

Options

Set these as environment variables next to RUBRICHQ_API_KEY.

VariableDefaultWhat it does
RUBRICHQ_API_KEYrequiredYour API key. Decides the workspace.
RUBRICHQ_READ_ONLYfalsetrue hides every tool that changes data or spends credits.
RUBRICHQ_API_URLhttps://api.rubrichq.ioOnly change this if RubricHQ gave you a different API address.
RUBRICHQ_WORKSPACE_IDread from the keyOnly needed if the server says it can’t read the workspace from your key.

Read-only mode

With RUBRICHQ_READ_ONLY=true, your assistant can list and read agents, scenarios, runs, calls, metrics and past Co-Pilot chats, but it can’t create, change, delete, run or re-score anything, and it can’t ask Co-Pilot new questions (those spend credits). Useful for exploring, reporting, or giving an assistant to someone who shouldn’t run tests.

"env": { "RUBRICHQ_API_KEY": "your_api_key", "RUBRICHQ_READ_ONLY": "true" }

Several workspaces

An API key belongs to one workspace, and the server uses that workspace unless asked otherwise.

  • Add the server once per workspace. Give each entry its own name and a key from that workspace:

    {
    "mcpServers": {
    "rubrichq-acme": { "command": "npx", "args": ["-y", "@rubrichq/mcp-server"], "env": { "RUBRICHQ_API_KEY": "acme_key" } },
    "rubrichq-globex": { "command": "npx", "args": ["-y", "@rubrichq/mcp-server"], "env": { "RUBRICHQ_API_KEY": "globex_key" } }
    }
    }

    Then say which one to use: “In Globex, list the agents.”

  • Or pass a workspace ID. Every tool except the Co-Pilot ones accepts workspace_id, so you can say “list agents in workspace 44”. This works only if the person who created the key is a member of workspace 44; any other workspace answers “not found”.

  • Co-Pilot always uses the key’s own workspace. To ask Co-Pilot about another workspace, use a key from that workspace.

Keeping your key safe

  • Your key can do anything in its workspace that the API allows, including spending credits. Treat it like a password.
  • Don’t commit config files that contain a key. Use VS Code’s inputs prompt, or set RUBRICHQ_API_KEY in your shell profile and leave it out of the config.
  • Create a separate key for each person or tool, so you can revoke one without affecting the others.
  • Revoke a key any time under Settings → API Keys. The assistant loses access immediately.

Updating

npx -y @rubrichq/mcp-server uses the latest published version. To update, restart your client. If you still get an old version, clear npx’s cache with npx clear-npx-cache and restart.

To pin a version, use @rubrichq/mcp-server@0.1.0 in args.

Run it from your own code

The server speaks MCP over stdio, so any MCP SDK can start it:

import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
const client = new Client({ name: "my-app", version: "1.0.0" });
await client.connect(new StdioClientTransport({
command: "npx",
args: ["-y", "@rubrichq/mcp-server"],
env: { ...process.env, RUBRICHQ_API_KEY: process.env.RUBRICHQ_API_KEY! },
}));
const result = await client.callTool({ name: "list_agents", arguments: {} });

For CI pipelines, the GitHub Action or the REST API is usually simpler.