NeuralTrust controls
Deployment options
Before you start
Create the policy in Observe mode. Observe records decisions in Activity
without enforcing them. Review the results, then switch the policy to
Enforce. See Policies.
Claude Enterprise
Anthropic’s organization-level Inference Hooks call TrustGuard before the model answers. The hook applies across Claude surfaces, requires no laptop installation, and cannot be disabled by end users. Each Anthropic organization endpoint maps to one TrustGuard collector. TrustGuard records the originating surface insource.application; see Attributes.
The verdict is binary: allow or deny. There is no Ask dialog, masking, or
visibility into individual tool executions on this path. It sees the model
request, not the command Claude Code is about to run. Data Loss
Prevention therefore blocks or
reports here; it cannot mask in flight.
- In the Anthropic admin console, open Data and Privacy → Inference hooks.
- Set Hook URL to
{TRUSTGUARD_URL}/v1/evaluate/claudeand Authorization toBearer <collector API key>. Use thetgk_…key, not atgcol_…key. - Save the endpoint in Anthropic. Saving is what generates the
whsec_…signing secret. - Paste
whsec_…into the collector’s Connection tab in TrustGuard. - Back in Anthropic, reopen Edit and run Test connection. The test fails until the secret has been added to TrustGuard.
- Assign a default policy to the collector before enforcing in production.
Claude Code
The Claude Code plugin registers lifecycle hooks on the developer’s machine. Before an action runs, each hook callsPOST /v1/evaluate with a collector
tgk_… key. Unlike the inference hook, the plugin receives shell commands and
supports Ask on tool calls.
Hooks fire only when all three pieces are present:
-
Enable the plugin. Deploy this through server-managed settings (claude.ai
Admin → Claude Code → Managed settings) or as the file
/Library/Application Support/ClaudeCode/managed-settings.json:Do not addpluginConfigs,mcpServers, or an MCP URL. Organization-wide MCP access uses a separate organization connector. -
Deploy the collector config with MDM, and optionally pin the binary:
-
Confirm the plugin is enabled. An installed plugin, including one with
Scope: managed, does not run until its status isenabled: -
Start a new Claude Code session so
hooks.jsonloads.
Organization connectors
Add TrustGate to Claude as an organization connector. The connector is available in claude.ai, Desktop, Cowork, and Claude Code. Claude receives the merged toolkit assigned to the MCP consumer. Copy the URL from the consumer’s Connect tab:- As Owner, open Organization settings → Connectors → Add → Custom → Web.
- Set Name to
TrustGateand URL to the Connect endpoint above. - Save. Each member then opens Customize → Connectors → TrustGate → Connect and completes OAuth.
Claude Code CLI
Claude Code loads the organization connector after the user completes the connection. Confirm in/mcp that TrustGate is the org connector, not
“Provided by a plugin”.
For local testing only, use the following command. It does not replace the
organization connector:
--header "X-AG-Gateway-Slug: <gateway-slug>" as well.
Verify
Claude Enterprise.- Run Test connection in Anthropic. It arrives in Activity with the collector’s connection-test event.
- Send a prompt from claude.ai and confirm the event with
source.application = claude-ai.
source.application = claude-code-plugin means the binary and key work. If
Claude Code still never evaluates, the plugin is disabled or hooks did not
reload.
Organization connector.
- claude.ai or Desktop: Connectors → TrustGate shows connected, and its tools are available in chat.
- Claude Code:
/mcplists TrustGate; call a tool from a bound registry. - Confirm the call in TrustGate telemetry. See Metrics.
Reference
Coverage
Claude Enterprise
⚠️ Tool content is visible in the transcript and can be blocked, but only by
blocking the whole inference at the single pre-inference decision point. There
is no per-tool verdict.
Claude Code plugin
Use Claude Enterprise to evaluate model requests across the organization. Use
the plugin to evaluate specific shell commands and MCP calls on managed developer
machines. Neither path evaluates model responses.
Ask. Only the plugin honors Ask, and only on tool calls, where it raises
Claude Code’s native permission dialog. The subtitle is the generic
TrustGuard sentence
A TrustGuard policy needs your approval to continue.; the
title is Claude Code’s tool name and the plugin cannot change it. An ask on
UserPromptSubmit does not stop the prompt. Claude Code has no confirmation
dialog for that event, so it submits the prompt with a warning. Use a block
gate to stop a prompt. On the Enterprise path, ask becomes allowed.
Limits. Neither path supports redaction. There is no hook for assistant
output, so model responses, system prompts, token usage, and extended thinking
are not evaluated. The plugin does not evaluate tool declarations. Route MCP
through TrustGate if you need controls over the available tool set. On the
Enterprise path, a non-2xx response from TrustGuard is a delivery failure, not
a deny. Anthropic’s failure handling then applies, while TrustGuard-side
failures allow the request.
Full comparison: Coverage.
What is evaluated
Claude Enterprise: one decision point before the model answers.POST /v1/evaluate
path. The inference-hook endpoint returns only allow or deny.
Claude Code plugin: one call per lifecycle hook.
tool.name is payload.params.name: for mcp__<server>__<tool> that is the
last segment. Gate on that short name, not the full hook tool_name. The
policy’s detectors decide the verdict.
Configuration
Managed settings (plugin enablement only).managed-settings.json carries
extraKnownMarketplaces and enabledPlugins. It does not hold a collector key
or an MCP URL.
claude-code.json (TrustGuard collector only). Keys: data_url, api_key,
fail_mode. When the managed file contains api_key, that key plus data_url
and fail_mode are locked. A user file cannot replace them.
fail_mode: open plus an empty hook body {} means allow; that is also the
response when evaluate returns allow.
Binary discovery. The MDM path is checked first, then ~/.trustguard/bin.
The user path is not required when the MDM binary exists. On a private
fork of the plugin repository, an unauthenticated GitHub Releases request may
return 404. Set TRUSTGUARD_GITHUB_TOKEN and pin the release version. If the
download fails, the bootstrap fails open.
Remote sessions. Over SSH or WSL, the hooks run on the remote host. An
MDM-deployed binary on the Mac does not cover that session. The config and
binary must exist where the agent runs.
MCP auth. Organization connectors use OAuth2 (or Use NeuralTrust).
Through the CLI, TrustGate also accepts an ag_… consumer key as
X-AG-API-Key, and a private data plane needs X-AG-Gateway-Slug unless the MCP
host already scopes the gateway. Which IdP backs
the login is configured on the consumer. See
Auth. Authenticating to TrustGate is separate from
authenticating to the upstream servers; a registry using OAuth (forwarded)
returns a connect link on the first call for a user without a stored credential.
Deployment ownership.
Configure the consumer’s available tools under Routing in the NeuralTrust
console, or through a role for Identity-based consumers.
To limit MCP tool calls, attach the Per-Tool Rate
Limiter policy.
Attributes
Claude Enterprise deliveries carrycollector.type = anthropic_inference_hook, model.provider = anthropic, and consumer.id from
the actor’s email or id. The surface arrives in source.application:
TrustGuard copies the frame’s
source.application into the gate attribute map on
every delivery. Unknown values are accepted as-is (open string).
The Claude Code plugin stamps source.application = claude-code-plugin and a
per-developer consumer_id. These values provide per-developer attribution in
Activity.
A gate on claude-code does not match the plugin. The collectors use
different values, so configure their gates separately.
Policy gates per surface. Use a collector and default policy for each
integration path. Within Claude Enterprise, use a
gate on source.application to apply
different rules to each surface (Policies → Gates → Source application):
Gates run before detectors. In Observe policy mode, Block is recorded but
not enforced. Test the condition on the policy Test tab
with Extra parameter Source application set to the surface you care about.
Troubleshooting
Related
- Policies: Gates: Ask and Block configuration, including
source.applicationvalues - Evaluate API: requests sent by the plugin hooks
- Collectors: collector types and keys
- MCP overview: consumers, catalog merging, and upstream authentication
- TrustGate authentication: API key and OAuth2 authentication for MCP consumers
- Coverage: comparison of the Claude collectors with other integrations
- Plugin repository: source, releases, and the hook contract
- Custom connectors (Anthropic): Anthropic’s reference