Popular starting points. Use Tab or arrow keys to browse results.

Skip to content
Aten SecurityThoth docs

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

  1. Claude Desktop
  2. thoth run (stdio proxy)local sidecar · low overhead
  3. Thoth EnforcerALLOW / BLOCK / STEP_UP
  4. 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

PurposeURL pattern
Control-plane API hosthttps://<tenant>.<apex-domain>
Endpoint proxy policy checksDerived as https://enforce.<tenant>.<apex-domain>
Endpoint registration + check-insDerived 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

1

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.

brew tap atensecurity/tap
brew install thoth

thothctl is bundled in the same formula (thoth), so no separate brew install thothctl is required.

# Download thoth-macos-universal.pkg from the matching atensecurity/thoth release
sudo installer -pkg thoth-macos-universal.pkg -target /

Validate installer trust:

pkgutil --check-signature thoth-macos-universal.pkg
spctl --assess --type install --verbose=4 thoth-macos-universal.pkg

Method C: manual binary install (GitHub Releases)

VERSION="0.3.4" # update when a newer stable thoth/v* release is published
curl -fsSL -o thoth-macos-universal \
  "https://github.com/atensecurity/thoth/releases/download/v${VERSION}/thoth-macos-universal"
curl -fsSL -o checksums.sha256 \
  "https://github.com/atensecurity/thoth/releases/download/v${VERSION}/checksums.sha256"
grep "thoth-macos-universal" checksums.sha256 | shasum -a 256 -c -
chmod +x thoth-macos-universal
sudo mv thoth-macos-universal /usr/local/bin/thoth

Use the platform-matching asset from the same release: thoth-macos-universal, thoth-linux-x86_64, thoth-linux-arm64, or thoth-windows-x86_64.exe. On Windows, download thoth-windows-x86_64.exe and place it on your PATH.

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

thoth --version
thoth doctor
thoth health --json

Keep the binary current

thoth update

Alias:

thoth self-update

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 (after thothctl auth login)
  • ~/.thoth/proxy_api_key.json

The proxy tightens ~/.thoth/proxy_api_key.json file permissions to 0600 where supported.

2

Set endpoint identity and tenant defaults

Set these identity values per endpoint/user session:

export THOTH_TENANT_ID="your-org"
export THOTH_USER_ID="you@company.com"

Endpoint identity is auto-resolved by proxy in this order:

  1. Managed device ID override (THOTH_INTUNE_DEVICE_ID / INTUNE_DEVICE_ID / THOTH_JAMF_COMPUTER_ID / JAMF_COMPUTER_ID)
  2. OS machine identity
  3. Hostname fallback (HOSTNAME / hostname)

Optional:

export THOTH_APEX_DOMAIN="<apex-domain>"
export THOTH_ENV="prod"                   # default

When THOTH_TENANT_ID is set, the proxy derives fleet registration URL automatically:

  • https://grid.<tenant>.<apex-domain>/v1/endpoints/register
3

Sign in with SSO (recommended)

Use thothctl to create a tenant-scoped local session token, then run the proxy with that bearer session:

thothctl auth login --tenant-id "$THOTH_TENANT_ID" --admin-email "$THOTH_USER_ID"

Equivalent wrapper command:

thoth auth login --tenant-id "$THOTH_TENANT_ID" --admin-email "$THOTH_USER_ID"

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:

thoth set-api-key --api-key "aten_thoth_agent_prod_fallback_key_here"
4

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.

thoth wrap-config \
  --tenant-id "$THOTH_TENANT_ID" \
  --enforcement-mode block \
  --env THOTH_USER_ID="$THOTH_USER_ID" \
  --env THOTH_APEX_DOMAIN="${THOTH_APEX_DOMAIN:-<apex-domain>}" \
  --output ~/Library/Application\ Support/Claude/claude_desktop_config.json \
  ~/Library/Application\ Support/Claude/claude_desktop_config.json

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

5

Restart Claude Desktop

Quit and reopen Claude Desktop. The proxy starts automatically — no user action required.

6

Verify governance

thoth status

Expected output:

Server     Governed    Agent ID    Session Intent    Enforcement
──────────────────────────────────────────────────────────────
gdrive     ✓           gdrive      —                 block
slack      ✓           slack       —                 block

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:

{
  "mcpServers": {
    "gdrive": {
      "command": "thoth",
      "args": [
        "run",
        "--agent-id",
        "gdrive",
        "--tenant-id",
        "your-org",
        "--enforcement-mode",
        "block",
        "--api-key",
        "aten_thoth_agent_prod_your_key",
        "--",
        "npx",
        "-y",
        "@modelcontextprotocol/server-gdrive"
      ],
      "env": {
        "GDRIVE_CREDENTIALS": "/path/to/creds.json"
      }
    }
  }
}

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=false in the proxy's environment restores forwarding without the header, and the proxy logs a warning at start. A fail_on_missing_secret of false in the workspace settings file is ignored (the workspace cannot tell "never set" from "set to false"), and the proxy logs that it was ignored; true there 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-Key and similar) are replaced inside any headers object 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 contains KEY, TOKEN, SECRET, BEARER or CREDENTIAL, and every THOTH_*_FILE variable (for example THOTH_API_KEY, THOTH_AUTH_TOKEN_FILE and THOTH_RUNTIME_BEARER_TOKEN), which no setting passes on. Set THOTH_CLEAN_ENV=1 and the server receives only PATH, HOME, locale, temp-directory, certificate and OS-runtime variables, plus the names listed in THOTH_CHILD_ENV_ALLOW (comma separated; a trailing * matches a prefix). The proxy logs the names it withheld, never values. thoth wrap-config turns this on for servers it wraps from now on and lists the variables already in that server's env block; servers wrapped earlier are not changed until you pass --env THOTH_CLEAN_ENV=1 and --env THOTH_CHILD_ENV_ALLOW=NAME1,NAME2. Pass --env THOTH_CLEAN_ENV=0 to keep the old behaviour for a new wrap. If a server needs a variable that is no longer passed, add its name to THOTH_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_broker settings from a JSON file named by THOTH_SECRET_BROKER_SETTINGS_FILE (the secret_broker object, or a whole settings document saved with thothctl); a THOTH_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.

PathWhat it does
Terraform thoth_governance_settingssecret_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_settingsA 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, setShow 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.

thoth wrap-config \
  --tenant-id your-tenant-id \
  --intent-map intent_map.json \
  --output governed_config.json \
  base_config.json

intent_map.json maps each server name to its intent:

{
  "gdrive": "calendar_management",
  "slack": "calendar_management",
  "phi-boundary": "phi_eligibility_check"
}

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.

thoth run --tenant-id acmecorp --user-id engineer@acmecorp.com \
  --data-handling-tool-arguments hash -- \
  npx -y @modelcontextprotocol/server-filesystem /tmp

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

Observe

Collect telemetry without enforcing actions. Python bypasses the enforcer in this mode.

step_up

Step-up auth

Request approval according to server policy. Keep the tool paused until the hold resolves.

progressive

Progressive

Evaluate actions with progressive policy. Outcomes depend on server policy and context.

block

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

VariableRequiredDescription
THOTH_TENANT_IDYesTenant identifier used for governance scope and derived endpoint URLs
THOTH_USER_IDYesPer-user identifier for audit trail. Must be a valid email address
THOTH_FLEET_IDOptionalFleet association used for endpoint registration/check-ins
THOTH_INTUNE_DEVICE_ID / INTUNE_DEVICE_IDOptionalManaged-device override for endpoint identity (preferred over hostname)
THOTH_JAMF_COMPUTER_ID / JAMF_COMPUTER_IDOptionalJamf managed-device override for endpoint identity
THOTH_RUNTIME_BEARER_TOKENPreferredRuntime bearer token (SSO)
THOTH_AUTH_TOKENOptionalSSO bearer token alias
THOTH_AUTH_TOKEN_FILEOptionalFile containing bearer token or auth session JSON
THOTH_API_KEY_FILEOptional fallbackPath to API key JSON file (~/.thoth/proxy_api_key.json auto-default)
THOTH_API_KEYOptional fallbackDirect API key env value
THOTH_APEX_DOMAINOptionalApex domain used in derived URLs (set to your tenant domain)
THOTH_ENVOptionalEndpoint environment (prod default)
THOTH_CLEAN_ENVOptional1: the upstream server inherits only a base set plus THOTH_CHILD_ENV_ALLOW (next release)
THOTH_CHILD_ENV_ALLOWOptionalComma-separated variable names (trailing * allowed) passed to the upstream when THOTH_CLEAN_ENV is on (next release)
THOTH_SECRET_BROKER_FAIL_ON_MISSING_SECRETOptionalDefaults to true when any secret-broker setting is on; false forwards the call without the header (next release)
THOTH_SECRET_BROKER_SETTINGS_FILEOptionalPath to a JSON file holding the workspace secret_broker settings (next release)
THOTH_ENDPOINT_CHECKIN_INTERVAL_SECOptionalEndpoint heartbeat interval in seconds (default: 60)
THOTH_DATA_HANDLING_TOOL_ARGUMENTSOptionalhash, redact or drop: withhold tool-call argument values (next release)
THOTH_DATA_HANDLING_PROMPTSOptionalhash or drop: withhold the conversation text the proxy sees (next release)
THOTH_DATA_HANDLING_LOCAL_SCANOptionalon (default) or off: scan withheld arguments locally (next release)
THOTH_DATA_HANDLING_SALTOptionalSalt 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.


Next steps