Skip to main content

Set up Agent Monitor for Claude inference hooks

Check what Claude Enterprise users send to the model and block risky prompts before they reach inference, across claude.ai, Claude Cowork, and Claude Code.

Anthropic inference hooks send each governed prompt to your organization's endpoint for a verdict before the model runs. Point that endpoint at MintMCP, and Agent Monitor evaluates the prompt against the rules you already use, returns allow or deny, and records the result. A denied prompt never reaches the model, and the user sees the reason you configure.

How inference hooks work

  • Server-side, before inference. Anthropic calls MintMCP for every governed inference and waits for a verdict, so MintMCP inspects the newest message about to reach the model, including its text, attachments, and tool results, and returns allow or deny before the model sees anything.
  • Across every Claude surface. The check runs on Anthropic's side, which means it covers claude.ai, Claude Cowork, and Claude Code without installing anything on each machine.
  • Your existing policies. Inference prompts run through the same Agent Monitor rules and prompt middleware you already use, so a rule change applies to inference right away without reconfiguring Claude.
  • Allow or deny. On allow, Claude proceeds to inference normally. On deny, Claude stops the request and shows the reason MintMCP returns, followed by the standing message you set in Claude.

Prerequisites

  • Claude Enterprise with admin access to your organization settings. Inference hooks are a Claude Enterprise capability.
  • A MintMCP Agent Monitor organization key, generated from the Agent Monitor Setup page.
  • The feature enabled for your organization. Contact enterprise@mintmcp.com to turn on inference hooks for your org before you start.

Set up the connection

  1. In MintMCP, open the Agent Monitor Setup page and select the Inference Hooks tab, then copy your organization's endpoint URL.
  2. In Claude's organization settings, add the endpoint URL as an inference hook. Claude runs an unsigned connection test when you save, which MintMCP acknowledges to confirm reachability, but it does not evaluate content or activate anything yet.
  3. Save the endpoint. Claude reveals a signing secret once, so copy it and store it in MintMCP on the same Inference Hooks tab.
  4. In Claude, configure the rollout settings for the hook.
  5. Run Claude's connection test again. MintMCP activates the inference path once it verifies a signed request, and the setup page shows the last verified delivery.

Configure rollout safely from Claude

Claude owns how prompts reach MintMCP, so use its rollout controls to stage the feature:

  • Shadow mode first. Run in shadow mode to see verdicts recorded without blocking anyone, then switch to enforce once the results look right.
  • Rollout and exclusions. Start with a small fraction of conversations and expand, and exclude any users or workspaces that shouldn't be governed yet.
  • Failure handling. Set Block the request so any prompt MintMCP can't inspect, such as one that fails the connection or exceeds the request size limit, is blocked rather than passed through unchecked.
  • Timeout and circuit breaker. Begin with a 10-second timeout. Claude's circuit breaker can pause delivery after repeated failures and needs an admin to recover it.

See Anthropic's inference hooks documentation for the full set of rollout, failure-handling, and circuit-breaker options.

See inference activity in Agent Monitor

Each governed prompt becomes its own entry in Agent Monitor, labeled Claude Inference:

  • Activity. Inference prompts appear in Live Activity next to your Claude Code, Cursor, Codex, and GitHub Copilot events, and you can filter to the Claude Inference source. An inference prompt and any later Claude Code tool calls stay separate entries even when they share a session, so each source keeps its own actor and timeline.
  • Usage. Inference deliveries count as their own events in the Usage dashboard, so their volume shows up in token and cost tracking alongside your other agents.
  • Rules and exports. Denials are recorded, count toward metrics, and flow through the same SIEM and OTLP exports and Slack notifications as the rest of your Agent Monitor activity.

How inference hooks differ from local hooks

Agent Monitor also monitors agents through local hooks installed on each machine (see Claude Code setup). Inference hooks and local hooks overlap on prompt checks but cover different ground:

Inference hooksLocal hooks
Where it runsAnthropic's servers, before inferenceOn each user's machine
Coverageclaude.ai, Claude Cowork, and Claude CodeThe client where the hook is installed
Prompt checksEvery governed prompt, server-sideUserPromptSubmit on that machine
Blocking reachEvery client, enforced through ClaudeOnly the client running the hook
Tool callsNot coveredPreToolUse and PostToolUse

Both can check prompts, so MintMCP avoids double-counting: once inference hooks are active, local Claude Code UserPromptSubmit prompt checks stop, while local PreToolUse and PostToolUse tool monitoring keep running. Inference hooks also see tool results in the newest message before it reaches the model, so a tool result on its way back into inference can be blocked at that point, which a local post-tool hook can't do server-side for every client.

Rotate or remove the connection

  • Rotate the signing secret. Pause enforcement in Claude and let in-flight requests drain, rotate the secret in Claude, replace it in MintMCP, run a signed test, then re-enable enforcement. MintMCP verifies one active signing secret at a time, so coordinate the swap to avoid failed deliveries during the change.
  • Disconnect. Remove the inference connection in MintMCP to restore local Claude Code prompt checks, and separately disable inference hooks in Claude to stop delivery.