Claude Desktop Proxy
Govern Claude Desktop MCP servers with zero code changes and wrap your claude_desktop_config.json in one command.
thoth is a cross-platform CLI binary that runs as a stdio sidecar between Claude Desktop and any
MCP server. Every tools/call passes through the Thoth enforcer before reaching the upstream server —
evaluating configured policy, requiring approval when policy returns STEP_UP,
and recording decisions for review. This does not establish regulatory conformance.
Fleet admins: use the deployment runbooks
This page is optimized for single-machine setup and validation. For managed fleet rollout, use Claude Desktop Fleet Configuration with your MDM-specific onboarding: Jamf Onboarding Overview or Intune Onboarding Overview.
No code changes required
The proxy intercepts at the transport layer. Your MCP server, Claude Desktop, and LLM prompt are all unmodified. Policy refusals and approval requests remain visible to users.
How it works
- Claude Desktop
- thoth run (stdio proxy)local sidecar · low overhead
- Thoth EnforcerALLOW / BLOCK / STEP_UP
- Upstream MCP Servergdrive, slack, jira, …
The proxy speaks MCP on both sides — it forwards initialize and tools/list transparently, and
intercepts every tools/call for policy evaluation before proxying the result back to Claude Desktop.
Endpoint routing contract
| Purpose | URL pattern |
|---|---|
| Control-plane API host | https://<tenant>.<apex-domain> |
| Endpoint proxy policy checks | Derived as https://enforce.<tenant>.<apex-domain> |
| Endpoint registration + check-ins | Derived automatically as https://grid.<tenant>.<apex-domain> |
For endpoint proxy traffic, enforcer_url and govapi_url are derived from
THOTH_TENANT_ID + THOTH_APEX_DOMAIN; users do not need to set separate URL overrides.
Installation
Install thoth
Choose one installation method, then run verification.
Current stable release
Choose and verify the current published binary using the
release-channel guide. The binary release
includes both thoth and thothctl; SDKs have separate versions.
Method A (recommended): Homebrew tap (macOS admin workstations)
thothctl is bundled in the same formula (thoth), so no separate brew install thothctl is required.
Method B (recommended for MDM): notarized PKG (macOS)
Validate installer trust:
Method C: manual binary install (GitHub Releases)
Use the platform-matching asset from the same release:
thoth-macos-universal,thoth-linux-x86_64,thoth-linux-arm64, orthoth-windows-x86_64.exe. On Windows, downloadthoth-windows-x86_64.exeand place it on yourPATH.
The proxy is distributed as a native binary (not a pip package).
Enterprise release verification assets are published for each thoth/v* release:
checksums.sha256, Sigstore bundles (*.sigstore.json), SBOMs (sbom.cdx.json, sbom.spdx.json), provenance.json, and santa-metadata.json.
Verify installation
Keep the binary current
Alias:
An update installs only a newer release whose signature verifies, so there is no
way to reinstall the current version or go back to an older one. --force is still
accepted for existing scripts and does nothing.
Release channel mapping
MCP proxy and CLI releases use thoth/v* tags. SDK releases use sdk/go/v*,
sdk/python/v*, and sdk/npm/v*.
First run also bootstraps a local profile at ~/.thoth (Linux/macOS/Windows):
~/.thoth/intent_map.json~/.thoth/sessions/<tenant>--<govapi-host>--admin-token.jwt(afterthothctl auth login)~/.thoth/proxy_api_key.json
The proxy tightens ~/.thoth/proxy_api_key.json file permissions to 0600 where supported.
Set endpoint identity and tenant defaults
Set these identity values per endpoint/user session:
Endpoint identity is auto-resolved by proxy in this order:
- Managed device ID override (
THOTH_INTUNE_DEVICE_ID/INTUNE_DEVICE_ID/THOTH_JAMF_COMPUTER_ID/JAMF_COMPUTER_ID) - OS machine identity
- Hostname fallback (
HOSTNAME/hostname)
Optional:
When THOTH_TENANT_ID is set, the proxy derives fleet registration URL automatically:
https://grid.<tenant>.<apex-domain>/v1/endpoints/register
Sign in with SSO (recommended)
Use thothctl to create a tenant-scoped local session token, then run the proxy with that bearer session:
Equivalent wrapper command:
A signed-in session can enforce only when two things hold. The person is a workspace admin, and the proxy's agent id (--agent-id or THOTH_AGENT_ID) names an agent already registered in that workspace. Thoth refuses a member's session, and an agent id it does not know, with a 403 that says which; a hostname-derived default id is not registered. Register the agent first, or use an API key issued for it.
API keys are still supported for automation and for people who are not admins:
Wrap your Claude Desktop config
thoth wrap-config transforms your existing claude_desktop_config.json — adding the proxy in front
of each MCP server without removing any of your current configuration.
Note
wrap-config is idempotent — running it twice on an already-governed
config is safe. Already-wrapped servers are only updated when selected values
change (for example --env, intent, or enforcement mode).
Restart Claude Desktop
Quit and reopen Claude Desktop. The proxy starts automatically — no user action required.
Verify governance
Expected output:
Servers showing ✓ are governed. Any server without a checkmark is running without Thoth policy.
Manual configuration
If you prefer editing claude_desktop_config.json directly, wrap a server by setting command to
thoth and prepending run args:
Everything after -- is passed unchanged to the upstream MCP server.
Upstream credentials stay with the server
The proxy does not hold or replace the credentials an upstream MCP server uses. A value in the
server's env (such as GDRIVE_CREDENTIALS above), or a file it points to, is read by the
server process on the same machine, and the proxy passes that environment on to it. Thoth
governs the calls; it does not remove those credentials from the machine. For HTTP-style tool
calls, an admin can turn on header injection so Thoth adds an
authorization header from a secret backend; that covers calls that carry a target host and a
headers argument, not credentials a local server already holds.
Header injection: defaults and limits (next release)
Header injection is off until an admin turns the secret broker on. When it is on:
- A failed lookup refuses the call. If the secret is missing or the lookup fails, the proxy
does not forward the call without the credential; it returns an error to the client. This is
the default whenever any broker setting is on (enabled, strict endpoint mode, allowed hosts or
bindings). Opting out is a decision made on the machine: only
THOTH_SECRET_BROKER_FAIL_ON_MISSING_SECRET=falsein the proxy's environment restores forwarding without the header, and the proxy logs a warning at start. Afail_on_missing_secretoffalsein the workspace settings file is ignored (the workspace cannot tell "never set" from "set to false"), and the proxy logs that it was ignored;truethere applies. Earlier releases forwarded the call. - The value stays out of Thoth's own records. Once the proxy has resolved a secret it replaces
the value, and its base64 and URL-encoded forms, with
[redacted]in its log lines, in the events it sends, in error responses, and in the tool output it sends for audit. Values of credential-bearing headers (Authorization,Cookie,X-Api-Keyand similar) are replaced inside anyheadersobject in those events. A value an upstream transforms (a hash, a truncation) is not recognised, and the tool's own response still goes back to your MCP client unchanged. - The value is still on the machine. The proxy holds the resolved value in memory for the call and sends it to the upstream in the tool arguments. This reduces what is stored in configuration and in Thoth's records; it does not remove the credential from the developer machine.
- Limit the environment the server inherits. By default an upstream server receives the
proxy's whole environment, except the proxy's own Thoth credentials: every
THOTH_*variable whose name containsKEY,TOKEN,SECRET,BEARERorCREDENTIAL, and everyTHOTH_*_FILEvariable (for exampleTHOTH_API_KEY,THOTH_AUTH_TOKEN_FILEandTHOTH_RUNTIME_BEARER_TOKEN), which no setting passes on. SetTHOTH_CLEAN_ENV=1and the server receives onlyPATH,HOME, locale, temp-directory, certificate and OS-runtime variables, plus the names listed inTHOTH_CHILD_ENV_ALLOW(comma separated; a trailing*matches a prefix). The proxy logs the names it withheld, never values.thoth wrap-configturns this on for servers it wraps from now on and lists the variables already in that server'senvblock; servers wrapped earlier are not changed until you pass--env THOTH_CLEAN_ENV=1and--env THOTH_CHILD_ENV_ALLOW=NAME1,NAME2. Pass--env THOTH_CLEAN_ENV=0to keep the old behaviour for a new wrap. If a server needs a variable that is no longer passed, add its name toTHOTH_CHILD_ENV_ALLOW. - Check it with
thoth doctor. It reports, for this machine, whether brokering is on (and how many bindings and allowed hosts, never their references or headers), whether a missing or failed secret refuses the call, whether a server would inherit the whole environment, and which settings file is read. It warns when fail-closed is switched off here, when brokering is on and servers inherit the whole environment, and when the settings file cannot be read. - Settings from the workspace. The proxy reads broker settings from its environment. It can
also read the workspace
secret_brokersettings from a JSON file named byTHOTH_SECRET_BROKER_SETTINGS_FILE(thesecret_brokerobject, or a whole settings document saved withthothctl); aTHOTH_SECRET_BROKER_*variable that is set overrides the file. The proxy does not fetch these settings from Thoth by itself yet, so settings changed in Terraform reach a machine only when the file or environment is updated there.
Setting the broker from code
The workspace's broker settings hold references to secrets (secret_ref, for example
aws-sm://...), never the secrets. Every path below refuses a value that looks like a credential
and keeps the stored webhook, SIEM and PAM secrets as they are.
| Path | What it does |
|---|---|
Terraform thoth_governance_settings | secret_broker_enabled, secret_broker_provider, secret_broker_strict_endpoint_mode, secret_broker_fail_on_missing_secret, secret_broker_allowed_hosts and secret_broker_auth_bindings_json. A binding has host_pattern, header, secret_ref and prefix, and may have id, agent_ids, tools and upstream (an MCP gateway uses a binding only when its upstream equals the request's). Pulumi takes the same fields. |
MCP preview_workspace_settings | A secret_broker object with the same fields. A list that is given replaces the stored one. The preview shows the change; a signed-in admin confirms it in the browser. There is no separate read tool: the preview's before and after show the stored settings. |
thothctl settings secret-broker get, bindings, set | Show the settings, list the bindings (reference, host, header, upstream, agents, tools), and change them. set flags: --enabled, --provider, --strict-endpoint-mode, --fail-on-missing-secret, --allowed-host, --binding host=...,header=...,secret_ref=...[,prefix=...][,id=...][,upstream=NAME][,agents=a+b][,tools=x+y], and --clear-allowed-hosts and --clear-bindings. |
A binding with no agent_ids or tools applies to every agent and tool on its host. A binding
with either is released only to a request that names a matching agent and tool. Agents are named by
the request, not proven by it, unless the runtime key is bound to one agent (the resolve audit
records which). Give a prefix its trailing space, for example Bearer .
The proxy does not read these settings from Thoth by itself yet. A governed endpoint's runtime key
can read them from GET /{workspace}/thoth/endpoints/{endpoint}/secret-broker/settings, which
returns the secret_broker object only (references, hosts and scopes), not the rest of the
settings; until the proxy uses it, save the object to the file named by
THOTH_SECRET_BROKER_SETTINGS_FILE or set THOTH_SECRET_BROKER_* on the machine.
Session intent (HIPAA minimum-necessary)
For healthcare or regulated workflows, declare a session intent to enforce minimum-necessary access. The enforcer checks every tool call against the allowed tools for that intent before any score-based decisions run.
intent_map.json maps each server name to its intent:
Minimum-necessary documentation
Session intent records a machine-readable reason for each tool call. You can use these records as part of your minimum-necessary documentation for PHI access; Thoth does not by itself make a deployment HIPAA compliant.
Keeping argument values on your machine
By default the proxy sends the arguments of each tool call to the enforcer so policy can read them. If you would rather they did not leave the machine, the proxy can hash, redact or drop them first, and send what its own scan found instead. This is opt-in and available in the proxy's next release; see Scanning in the MCP proxy for what it sends, what still reaches Thoth, and the workspace settings it needs.
The scan is a heuristic and is not a compliance control. If Thoth answers MODIFY for a call whose
arguments were withheld, the proxy does not forward the call.
Enforcement modes
Observe
Collect telemetry without enforcing actions. Python bypasses the enforcer in this mode.
Step-up auth
Request approval according to server policy. Keep the tool paused until the hold resolves.
Progressive
Evaluate actions with progressive policy. Outcomes depend on server policy and context.
Block
Use blocking enforcement. Server policy decides which actions are permitted or refused.
Use block as the default for fail-closed enforcement. Use progressive only for phased rollout
or baseline learning windows, then move governed servers back to block.
Environment variables
| Variable | Required | Description |
|---|---|---|
THOTH_TENANT_ID | Yes | Tenant identifier used for governance scope and derived endpoint URLs |
THOTH_USER_ID | Yes | Per-user identifier for audit trail. Must be a valid email address |
THOTH_FLEET_ID | Optional | Fleet association used for endpoint registration/check-ins |
THOTH_INTUNE_DEVICE_ID / INTUNE_DEVICE_ID | Optional | Managed-device override for endpoint identity (preferred over hostname) |
THOTH_JAMF_COMPUTER_ID / JAMF_COMPUTER_ID | Optional | Jamf managed-device override for endpoint identity |
THOTH_RUNTIME_BEARER_TOKEN | Preferred | Runtime bearer token (SSO) |
THOTH_AUTH_TOKEN | Optional | SSO bearer token alias |
THOTH_AUTH_TOKEN_FILE | Optional | File containing bearer token or auth session JSON |
THOTH_API_KEY_FILE | Optional fallback | Path to API key JSON file (~/.thoth/proxy_api_key.json auto-default) |
THOTH_API_KEY | Optional fallback | Direct API key env value |
THOTH_APEX_DOMAIN | Optional | Apex domain used in derived URLs (set to your tenant domain) |
THOTH_ENV | Optional | Endpoint environment (prod default) |
THOTH_CLEAN_ENV | Optional | 1: the upstream server inherits only a base set plus THOTH_CHILD_ENV_ALLOW (next release) |
THOTH_CHILD_ENV_ALLOW | Optional | Comma-separated variable names (trailing * allowed) passed to the upstream when THOTH_CLEAN_ENV is on (next release) |
THOTH_SECRET_BROKER_FAIL_ON_MISSING_SECRET | Optional | Defaults to true when any secret-broker setting is on; false forwards the call without the header (next release) |
THOTH_SECRET_BROKER_SETTINGS_FILE | Optional | Path to a JSON file holding the workspace secret_broker settings (next release) |
THOTH_ENDPOINT_CHECKIN_INTERVAL_SEC | Optional | Endpoint heartbeat interval in seconds (default: 60) |
THOTH_DATA_HANDLING_TOOL_ARGUMENTS | Optional | hash, redact or drop: withhold tool-call argument values (next release) |
THOTH_DATA_HANDLING_PROMPTS | Optional | hash or drop: withhold the conversation text the proxy sees (next release) |
THOTH_DATA_HANDLING_LOCAL_SCAN | Optional | on (default) or off: scan withheld arguments locally (next release) |
THOTH_DATA_HANDLING_SALT | Optional | Salt for hash; random per process when unset (next release) |
THOTH_ENFORCER_URL / --enforcer-url are deprecated for proxy runtime and ignored in current releases.
Customer email-domain controls are enforced centrally in Thoth backend tenant policy (admin-managed metadata), not by endpoint-local environment variables.
Scope mismatch behavior
If a key is valid but endpoint/fleet context does not match exactly, enforcer now allows the request and emits warning logs for investigation. Keep endpoint identity mapping clean in MDM to avoid noisy authorization warnings.
For managed fleets
Keep MDM operational details in one place: Jamf Onboarding Overview and Intune Onboarding Overview. Use Claude Desktop Fleet Configuration for governed config lifecycle, provider sync, and direct manual endpoint enrollment flows.