> ## 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.

# MCP client

> Govern any Model Context Protocol client so every tool invocation is gated before the MCP server executes.

Govern any Model Context Protocol client (Claude Desktop, Cursor, custom MCP
hosts). Every tool invocation is intercepted before the MCP server executes.

## Install

```bash theme={"dark"}
npm install @inviolet/agent-sdk-mcp-client @inviolet/agent-sdk-core
```

## Use

```ts theme={"dark"}
import { Client } from '@modelcontextprotocol/sdk/client'
import { Inviolet } from '@inviolet/agent-sdk-core'
import { wrapMcpClient } from '@inviolet/agent-sdk-mcp-client'

const inviolet = new Inviolet({ /* ... */ })

const client = wrapMcpClient(new Client({ /* ... */ }), {
  inviolet,
  intentId: 'intents:engineering_lookup',
  actor: 'alice@example.com',
  audience: 'github-prod',
})

const result = await client.callTool('search_repos', { q: 'org:inviolet' })
```

## Pairing with the MCP responder

For desktop hosts (Claude Desktop, Cursor), pair the client wrap with the
`apps/mcp-responder` server-side responder running locally. The responder
enforces the same gateway decisions inside the MCP host even when the client
wrap isn't present.
