NeuralTrust controls
Deployment options
You can use either integration independently. Configuring the inference hook
does not register an MCP connector or install Claude Code lifecycle hooks.
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.
Inference hook
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_BASE_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.
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.
/mcp that TrustGate is the org connector, not
“Provided by a plugin”. A local claude mcp add entry does not replace the
organization connector.
Verify
Inference hook
- 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.
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
The following table describes the TrustGuard inference hook, not the TrustGate organization connector.
⚠️ 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. Use the Claude Code
plugin to evaluate specific shell commands and MCP
calls on managed developer machines. Neither integration evaluates model
responses.
Ask. The inference-hook endpoint has no approval dialog. An
ask verdict
becomes allowed. Use a Block gate when the request must be denied.
Limits. The inference hook does not support redaction. There is no hook for
assistant output, so model responses, system prompts, token usage, and extended
thinking are not evaluated. 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.
What is evaluated
The inference hook has one decision point before the model answers:POST /v1/evaluate
path. The inference-hook endpoint returns only allow or deny.
Configuration
Inference-hook ownership. An Anthropic organization administrator manages the hook URL andBearer tgk_… header, then copies the whsec_… signing secret
to the collector’s Connection tab in TrustGuard.
Connector ownership. An Anthropic organization owner adds the MCP consumer’s
Connect URL to the organization. Each member then completes OAuth.
MCP auth. Organization connectors use OAuth2 (or Use NeuralTrust).
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.
For API-key authentication and private-data-plane headers through the CLI, see
Claude Code.
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
Inference-hook 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 local Claude Code plugin uses claude-code-plugin, not claude-code, and
provides a per-developer consumer_id. The collectors use different values,
so configure their gates separately.
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):
For a gate targeting only the laptop plugin, use
source.application eq
claude-code-plugin with Ask or Block in its separate policy. See
Claude Code attributes.
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
- Claude Code: lifecycle hooks and direct CLI MCP setup
- Policies: Gates: Ask and Block configuration, including
source.applicationvalues - Collectors: collector types and keys
- MCP overview: consumers, catalog merging, and upstream authentication
- TrustGate authentication: API key and OAuth2 authentication for MCP consumers
- How TrustGuard works: evaluation and enforcement across integrations
- Custom connectors (Anthropic): Anthropic’s reference