Skip to content

Install Deft for Claude Code (for IT admins)

This guide installs the Deft plugin on every Claude Code machine in your company, and turns on Claude Code's usage telemetry for Deft. You push one block of JSON through Claude Code's managed settings. After that, each employee links the plugin to their Deft account once, with one command.

What you get:

  • Telemetry: Claude Code sends its usage telemetry to Deft from every machine that has the settings. Employees don't need to do anything for this part.
  • The plugin: Claude Code installs the Deft plugin by itself and keeps it up to date. The plugin sends its signals only after the employee runs /deft:connect (see 5. What employees do). Until then it is installed but sends nothing.
  • No content: Deft receives content-free signals only. It never receives prompts, responses, file contents or tool details, and the settings below switch those off explicitly.

Before you start

  • Claude Code 2.1.238 or later on every machine. Check with claude --version.
  • Outbound HTTPS from employee machines to the Deft API host. The plugin, its catalog and the telemetry all use this one host. Don't route it through a proxy that redirects to a different host. Claude Code drops the token on cross-host redirects, so the download would fail.
  • A Deft org admin account. You create the two tokens with it.
  • Two tokens from Deft. Deft shows each token once, so copy it when it appears.
    • Plugin token goes in place of <DEFT_PLUGIN_TOKEN>. It can only download the Deft plugin. It can't send or read any data.
    • Ingest token goes in place of <DEFT_INGEST_TOKEN>. Claude Code uses it to send telemetry to Deft.
  • A Deft account for each employee in your Deft organization, so they can link the plugin.

Every employee's machine can read managed settings, so treat both tokens as shared within your company. If one leaks, create a new one, push the updated settings, then revoke the old one.

1. Create your tokens and get your settings

Plugin token and settings: in Deft, open Settings > Install for your team. Create a plugin token there and copy it when it appears. The same page shows your managed settings JSON with your Deft API host filled in, and lists your plugin tokens so you can revoke one later.

Ingest token: create it in Settings → Install for your team, under Create a telemetry token, and copy it when it appears. The page lists a telemetry token only while it stays open; to revoke one you created earlier, ask your Deft contact.

The API can do the same: POST /connect/org/plugin-tokens creates a plugin token, POST /connect/org/ingest-tokens creates an ingest token, GET /connect/org/plugin-tokens lists plugin tokens, and GET /connect/org/setup returns your settings under claude_code.managed_settings, with the steps in this guide under claude_code.install.

Your settings look like this, with <deft-api-host> replaced by your Deft API host:

{
  "env": {
    "CLAUDE_CODE_ENABLE_TELEMETRY": "1",
    "OTEL_LOGS_EXPORTER": "otlp",
    "OTEL_EXPORTER_OTLP_PROTOCOL": "http/json",
    "OTEL_EXPORTER_OTLP_LOGS_ENDPOINT": "https://<deft-api-host>/connect/otlp/v1/logs",
    "OTEL_EXPORTER_OTLP_HEADERS": "Authorization=Bearer <DEFT_INGEST_TOKEN>",
    "OTEL_LOGS_EXPORT_INTERVAL": "60000",
    "OTEL_LOG_ASSISTANT_RESPONSES": "0",
    "OTEL_LOG_TOOL_DETAILS": "0",
    "OTEL_LOG_USER_PROMPTS": "0"
  },
  "extraKnownMarketplaces": {
    "deft": {
      "source": {
        "source": "url",
        "url": "https://<deft-api-host>/plugins/deft/marketplace.json",
        "headers": {
          "Authorization": "Bearer <DEFT_PLUGIN_TOKEN>"
        }
      },
      "autoUpdate": true
    }
  },
  "enabledPlugins": {
    "deft@deft": true
  }
}

Replace <DEFT_PLUGIN_TOKEN> and <DEFT_INGEST_TOKEN> with your tokens. Leave everything else exactly as it is. In particular, deft and deft@deft are the plugin's fixed identifiers.

If you already export Claude Code telemetry: Claude Code treats the OTel exporter variables as one unit per managed source and sends its logs to one endpoint. If you already send Claude Code telemetry somewhere else, these settings replace that destination. Talk to Deft before you roll out if you need both.

2. If you restrict plugin marketplaces

Skip this step if your managed settings don't set strictKnownMarketplaces or blockedMarketplaces.

Allowlist (strictKnownMarketplaces). Claude Code refuses to register a managed marketplace that the allowlist doesn't match. Without an entry for Deft, machines get no Deft marketplace and no plugin. Add one of these entries to your existing list:

{ "source": "url", "url": "https://<deft-api-host>/plugins/deft/marketplace.json" }
{ "source": "hostPattern", "hostPattern": "^<deft-api-host>$" }

In the hostPattern entry, escape each dot in the host. In JSON that's \\., for example "^api\\.example\\.com$". The setup response has both entries with your host filled in, under claude_code.install.allowlist. Headers aren't compared, so neither entry needs the token.

Put the entry in the same managed source as the rest of these settings. Claude Code takes the allowlist whole from one source and doesn't add entries from another.

Blocklist (blockedMarketplaces). Make sure no entry matches the Deft API host, for example a broad hostPattern. A blocked source stops the marketplace the same way.

3. Deliver the settings

Pick one method. By default Claude Code reads only one managed source. It checks server-managed settings first, then MDM, then the managed settings file. If your company already uses server-managed settings, add these keys there, because an MDM profile or file would be ignored.

Option A: server-managed settings in claude.ai

Use this if your company is on Claude for Teams or Enterprise and your machines aren't all under MDM.

  1. Open claude.ai > Organization settings > Claude Code > Managed settings. You need the Owner role.
  2. Paste the JSON and save.
  3. The next time each person starts Claude Code, they approve the new settings once in a security prompt. If they reject it, Claude Code exits.

Know these limits before you choose this option:

  • Some machines never fetch server-managed settings. That covers sessions that use Amazon Bedrock, Google Vertex AI or Microsoft Foundry, a non-default ANTHROPIC_BASE_URL, or an apiKeyHelper. It also covers sessions that use a Claude Console API key, because that key belongs to a different organization than your claude.ai one. Those machines silently get nothing, so use Option B or C for them.
  • Some surfaces can't show the security prompt. The VS Code chat panel and the Desktop app's Code tab apply the settings for that run only. They keep doing that until the person approves the prompt in a terminal session.

Option B: MDM

  • macOS: deploy a configuration profile for the preference domain com.anthropic.claudecode with Jamf, Kandji, Intune or a similar tool. Use the same top-level keys as the JSON, with nested objects as dictionaries.
  • Windows: store the whole JSON document as one string. Use a REG_SZ value named Settings under HKLM\SOFTWARE\Policies\ClaudeCode, set through Group Policy or Intune.

Anthropic publishes starter templates for Jamf, Intune and Group Policy at github.com/anthropics/claude-code/tree/main/examples/mdm.

Option C: managed settings file

Write the JSON to this file on each machine. It must be owned by an administrator.

OSPath
macOS/Library/Application Support/ClaudeCode/managed-settings.json
Linux and WSL/etc/claude-code/managed-settings.json
WindowsC:\Program Files\ClaudeCode\managed-settings.json

4. Check it worked

Claude Code installs managed plugins in the background after the first session starts, so a /plugin check in that same session can show Deft as not installed yet.

  1. Ask someone to start Claude Code and wait about 30 seconds.
  2. Have them start a second session, or run /reload-plugins.
  3. Have them run /plugin. You should see the deft marketplace, with the Deft plugin (deft) installed and enabled.

Running /status should show Enterprise managed settings under setting sources. Telemetry settings apply from the next Claude Code launch after the settings arrive.

If the plugin is missing:

  • Check that Claude Code is 2.1.238 or later.
  • If /plugin says Marketplace "deft" is not in the allowed marketplace list or Marketplace "deft" is blocked by enterprise policy, add the allowlist entry or fix the blocklist. See 2. If you restrict plugin marketplaces.
  • Check that the plugin token was pasted in full after Bearer and hasn't been revoked.
  • Check that the machine can reach https://<deft-api-host>/plugins/deft/marketplace.json. Without the token, this URL returns 401. That's expected, and it proves the host is reachable.
  • If you used server-managed settings, check that the machine isn't one that skips them. See the limits under Option A.

5. What employees do

Each employee runs /deft:connect once in Claude Code. It opens Deft in the browser with a code filled in. They sign in with their Deft account in your organization, check that the code matches, and approve.

  • Until they do this, the plugin is installed but sends nothing.
  • Claude Code's own telemetry doesn't need this step. It flows from every machine that has the settings.
  • /deft:status shows whether a machine is linked, and /deft:disconnect unlinks it.

Updates and removal

  • Updates: "autoUpdate": true keeps the plugin current in the background. You don't need to do anything when Deft ships a new version.

  • Settings copied before the plugin was renamed: older settings name the marketplace hone and enable hone@hone, at https://<deft-api-host>/plugins/hone/marketplace.json. Deft still answers that address, but machines on those settings don't get plugin updates. Switch to the settings above when you next push managed settings: replace the hone entry in extraKnownMarketplaces with the deft one, replace hone@hone in enabledPlugins with deft@deft, and update the URL in strictKnownMarketplaces if you list it there. Plugin tokens that start with hone_p_ keep working, so you don't need a new one. Each employee then runs /deft:connect once.

  • Rotating a token: create a new token, push the updated settings, then revoke the old token. Revoke a plugin token in Settings > Install for your team (or with DELETE /connect/org/plugin-tokens/<id>). Revoke an ingest token on the same page while it is still listed there, or with DELETE /connect/org/ingest-tokens/<id>. Deft stops accepting a revoked token within 30 seconds. Server-managed settings reach running sessions within about an hour, so wait until machines have the new settings before you revoke.

  • Removal: to turn the plugin off at once on every machine, first set "deft@deft": false in enabledPlugins. You can leave that entry in place so the plugin can't come back. Then remove only these keys, and leave the rest of your managed settings as they are:

    • extraKnownMarketplaces.deft
    • enabledPlugins["deft@deft"], unless you kept it as false
    • in env: CLAUDE_CODE_ENABLE_TELEMETRY, OTEL_LOGS_EXPORTER, OTEL_EXPORTER_OTLP_PROTOCOL, OTEL_EXPORTER_OTLP_LOGS_ENDPOINT, OTEL_EXPORTER_OTLP_HEADERS, OTEL_LOGS_EXPORT_INTERVAL, OTEL_LOG_ASSISTANT_RESPONSES, OTEL_LOG_TOOL_DETAILS and OTEL_LOG_USER_PROMPTS
    • the Deft entry in strictKnownMarketplaces, if you added one

    If any of those env keys had values before you added Deft, restore those values instead of deleting the keys. Then revoke both tokens.