Skip to main content
Inviolet integrates with Claude in three places: the Anthropic SDK (server-side agents), Claude Desktop (employee assistants), and Claude for Work via the Model Context Protocol (MCP) endpoint Inviolet hosts. Same intent-token issuance across all three.

Why it matters

Claude tool calls are the dominant traffic shape for most early adopters. Wrapping the Anthropic SDK takes one line and gives you intent extraction + audit log + (optionally) policy enforcement on every messages.create call.

1. Wrap the Anthropic SDK (server-side)

import { InViolet } from "@inviolet/sdk"
import Anthropic from "@anthropic-ai/sdk"

const inviolet = new InViolet({ apiKey: process.env.INVIOLET_API_KEY! })
const anthropic = new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY! })

// Before every tool call, ask Inviolet whether to allow it.
const decision = await inviolet.intent.evaluate({
  userId: "user_2pX9...",
  toolCall: { name: "lookup_customer", arguments: { id: "12345" } },
  dataSourceId: "salesforce_prod",
})

if (decision.outcome !== "allowed") {
  throw new Error(`call_blocked: ${decision.outcome}`)
}

// Proceed with the original Anthropic call.
const message = await anthropic.messages.create({
  model: "claude-sonnet-4-5",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Look up customer 12345." }],
})

2. Claude Desktop via MCP

Claude Desktop speaks MCP. Inviolet hosts an MCP server at https://gateway.inviolet.ai/mcp exposing read-only tools (purposes.list, approvals.list, intent.evaluate). Add this to Claude Desktop’s claude_desktop_config.json:
{
  "mcpServers": {
    "inviolet": {
      "url": "https://gateway.inviolet.ai/mcp",
      "headers": {
        "Authorization": "Bearer ${INVIOLET_API_KEY}"
      }
    }
  }
}

3. Verify

Open the decision feed at app.inviolet.ai/decision-feed. Make a tool call from the Anthropic SDK or ask Claude Desktop a question that uses the MCP tool. The event appears within seconds with the matched purpose, the intent class, and the issued (or withheld) intent token.