MCP Server Setup Guide

Get Guardrail running in Claude Desktop in 3 minutes. Every check automatically logs to your dashboard.

Installation

1

Get your API key

Go to Developer Portal and enter your email to get a free API key (starts with gr_live_).

2

Open your Claude Desktop config file

On Mac, open Terminal and run:

open ~/Library/Application\ Support/Claude/claude_desktop_config.json

On Windows, open:

%APPDATA%\Claude\claude_desktop_config.json
3

Add the Guardrail MCP server

Paste this into your config file. Replace gr_live_xxx with your actual API key:

{
  "mcpServers": {
    "guardrail": {
      "command": "npx",
      "args": ["guardrail-ai-mcp", "--key", "gr_live_xxx"]
    }
  }
}
โš ๏ธ Important: If your config file already has a "preferences" section, merge them into one JSON object:
{
  "preferences": {
    "coworkScheduledTasksEnabled": true,
    "sidebarMode": "chat"
  },
  "mcpServers": {
    "guardrail": {
      "command": "npx",
      "args": ["guardrail-ai-mcp", "--key", "gr_live_xxx"]
    }
  }
}
4

Restart Claude Desktop

Fully quit Claude Desktop (Cmd+Q on Mac) and reopen it. The Guardrail tools will load automatically.

Verify It's Working

5

Check the connector is loaded

Click the + button โ†’ Connectors โ†’ you should see "guardrail" with a blue toggle ON.

6

Test it

In a Claude Desktop chat, type:

Use the guardrail score_and_explain tool to score this:
"Taking 500mg of aspirin daily is safe for everyone."

You should see a confidence score, decision (deliver/flag/escalate), and detected signals.

Auto-Use (Optional)

7

Make Guardrail run automatically

To avoid saying "use the guardrail tool" every time:

  1. Click + โ†’ Connectors โ†’ Tool access
  2. Select "Tools already loaded"
  3. Create a Project (e.g. "Guardrail Testing")
  4. Click + next to Instructions and add:
Always use the guardrail score_and_explain tool to score
any AI-generated text I share. Show the confidence score,
decision, and detected signals. Do not answer the text's
question โ€” only score it.

Now every message in that project will automatically use Guardrail.

Available Tools

Three tools are available in every chat:

check_confidence Quick score โ€” returns confidence 0-1 and deliver/flag/escalate
score_and_explain Detailed score with human-readable explanation of all signals
get_my_stats Your API usage stats โ€” total checks, decisions, recent logs
๐Ÿ’ก Context-aware scoring: All tools support an optional userQuery parameter. When provided, Guardrail also analyzes whether the response is relevant to the question, detects scope creep, and audits dangerous queries for missing refusals.
๐Ÿ“Š Dashboard: Every MCP tool call logs to your dashboard automatically. View scores, signals, and usage trends at guardrail-mvp-production.up.railway.app/dashboard.html
Need help?

API Reference ยท Try the Playground ยท npm Package ยท GitHub