> ## Documentation Index
> Fetch the complete documentation index at: https://docs.inviolet.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Claude for Work

> Put Inviolet in front of every Claude tool call — Anthropic SDK, Claude Desktop, and MCP.

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 grant 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)

```ts theme={"dark"}
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." }],
})
```

<Note>
  This uses the **evaluate** path (`intent.evaluate`) — a lightweight pre-call
  check. For **structural**, credential-brokered enforcement where the agent
  never holds the real credential, mint a mandate and `guard` the call with
  [`@inviolet/agent-sdk-core`](/sdks/node) — see the [Quickstart](/quickstart).
</Note>

## 2. Claude Desktop via MCP

Claude Desktop speaks MCP. Inviolet hosts an MCP server at
`https://gateway.inviolet.ai/mcp` exposing read-only tools
(`intentions.list`, `approvals.list`, `intent.evaluate`).

Add this to Claude Desktop's `claude_desktop_config.json`:

```json theme={"dark"}
{
  "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](https://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 intention, the intent class, and the issued (or withheld)
grant.

## Read next

* **[ChatGPT Enterprise](/integrations/llm-hosts/chatgpt)** — the same
  shape for OpenAI surfaces
* **[Define your first intention](/guides/define-your-first-intention)** —
  graduate from observation to enforcement
