OGuardAI
Integrations

MCP Server Integration

Set up OGuardAI as an MCP server for Claude Desktop, Claude Code, and other MCP-compatible clients

OGuardAI provides an MCP (Model Context Protocol) server for use with Claude Desktop, Claude Code, and other MCP-compatible clients.

Install

npm install -g @oguardai/mcp-server
# or
pnpm add -g @oguardai/mcp-server

Claude Desktop Configuration

Add OGuardAI to your Claude Desktop MCP configuration file.

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json Linux: ~/.config/claude/claude_desktop_config.json

{
  "mcpServers": {
    "guardai": {
      "command": "guardai-mcp",
      "args": [],
      "env": {
        "GUARDAI_URL": "http://localhost:3000",
        "GUARDAI_API_KEY": "your-api-key"
      }
    }
  }
}

Or run the server directly with npx:

{
  "mcpServers": {
    "guardai": {
      "command": "npx",
      "args": ["@oguardai/mcp-server"],
      "env": {
        "GUARDAI_URL": "http://localhost:3000"
      }
    }
  }
}

Claude Code Configuration

Add to your .claude/settings.json or project-level MCP config:

{
  "mcpServers": {
    "guardai": {
      "command": "npx",
      "args": ["@oguardai/mcp-server"],
      "env": {
        "GUARDAI_URL": "http://localhost:3000"
      }
    }
  }
}

Available Tools

Once configured, Claude has access to these tools:

guardai_transform

Protect sensitive data in text by replacing PII with semantic tokens.

Parameters:

NameTypeRequiredDescription
textstringYesText that may contain sensitive data
policystringNoPolicy to apply (default: server default)
languagestringNoISO 639-1 language hint

Example interaction:

User: "Please draft a reply to this customer email:
  From: Julia Schneider <julia@firma.de>
  Subject: Order complaint ORD-2026-4892"

Claude: [calls guardai_transform with the email text]
  -> Gets safe text with `{{person:p_001}}`, `{{email:e_001}}`, `{{order:o_001}}`
  -> Drafts reply using tokens
  -> [calls guardai_rehydrate to restore real values]
  -> Returns personalized reply

guardai_rehydrate

Restore real values in text that contains OGuardAI semantic tokens.

Parameters:

NameTypeRequiredDescription
textstringYesText containing {{type:id}} tokens
session_statestringYesEncrypted session state blob from a prior transform call
output_channelstringNoOutput channel (customer_email, internal_summary, etc.)

guardai_detect

Detect entities in text without transforming. Useful for auditing and understanding what PII exists in content.

Parameters:

NameTypeRequiredDescription
textstringYesText to analyze
languagestringNoISO 639-1 language hint

guardai_health

Check the OGuardAI server health status.

guardai_evaluate_policy

Evaluate what a policy would do to detected entities without actually transforming.

Usage Examples

Protecting Customer Data in Conversations

User: "Summarize this customer complaint. Make sure to protect
their personal data:

  My name is Marcus Weber, email m.weber@techcorp.de.
  Order Q-2026-0847 was delivered damaged."

Claude will:
1. Call guardai_transform to tokenize the PII
2. Process the safe text to generate a summary
3. Call guardai_rehydrate to restore values for the appropriate audience

Auditing Text for PII

User: "Check this document for any PII before I send it to the
external analytics team."

Claude will:
1. Call guardai_detect to find all entities
2. Report what was found (types, confidence scores)
3. Suggest which policy to apply

Environment Variables

VariableDefaultDescription
GUARDAI_URLhttp://localhost:3000OGuardAI server URL
GUARDAI_API_KEY(none)API key for authentication