Enterprise install
The fleet-deployment path for the Clawkeeper MCP Gateway. Written for IT and platform teams rolling the gateway out to 10+ laptops via a configuration-management tool. If you are an individual developer trying the gateway on your own machine, use the one-line install instead.
Design stance
Pin <version, sha256> and fetch directly from GitHub Releases. Do not use the one-line install script in a fleet context. The install script is a convenience UX for interactive developers; the enterprise path is reproducible, versioned, and independently verifiable.
| Concern | How this path addresses it |
|---|---|
| Supply-chain integrity | Pin a specific <version, sha256> per release. Fetch from GitHub Releases. Optionally verify cosign signature at pin time. |
| Reproducibility | Same archive + checksum on every laptop, every run of the config-management recipe. |
| Offline survivability | Checksum verification happens locally; no runtime dependency on clawkeeper.dev or the install script. |
| Rollback | Change the pinned version in your recipe and reapply. Never retag — every fix is a new patch version. |
| No per-developer variance | Config dropped at /etc/clawkeeper-mcp-gateway/config.json. No $HOME assumptions. |
Recipe (generic shell pseudocode)
#!/usr/bin/env bash
set -euo pipefail
# Pin these at rollout time. Rotate by changing both values together.
VERSION="v0.1.1"
SHA256_LINUX_AMD64="<paste from checksums.txt at pin time>"
ARCHIVE="clawkeeper-mcp-gateway_linux_amd64.tar.gz"
BASE="https://github.com/rad-security/clawkeeper-mcp-gateway/releases/download/${VERSION}"
# 1. Download + verify.
curl -fsSLO "${BASE}/${ARCHIVE}"
echo "${SHA256_LINUX_AMD64} ${ARCHIVE}" | sha256sum -c -
# 2. Install.
tar -xzf "${ARCHIVE}"
install -m 0755 clawkeeper-mcp-gateway /usr/local/bin/clawkeeper-mcp-gateway
# 3. Drop config (rendered from your secret store).
install -d -m 0755 /etc/clawkeeper-mcp-gateway
install -m 0600 -o clawkeeper -g clawkeeper \
/path/to/rendered/config.json \
/etc/clawkeeper-mcp-gateway/config.json
The gateway resolves its config from /etc/clawkeeper-mcp-gateway/config.json automatically — no $HOME knowledge required. See the headless install section of the README for the full resolution chain.
Sample config.json
{
"mode": "audit",
"api_key": "ck_live_...",
"api_url": "https://clawkeeper.dev",
"detection": {
"threat": "warn",
"sensitive_data": "warn"
}
}
The api_key can alternatively be supplied via the CLAWKEEPER_API_KEY environment variable (set in the systemd unit, launchd plist, or per-user shell profile). File always wins when set — rotation happens by re-rendering the file from your secret store, not by shadowing it with an env var.
Verifying cosign signatures (optional, one-time per pin)
Every release's checksums.txt is signed by our GitHub Actions workflow via cosign keyless. Verifying once per version bump proves the artifact came from our real build pipeline:
BASE=https://github.com/rad-security/clawkeeper-mcp-gateway/releases/download/${VERSION}
curl -fsSLO "${BASE}/checksums.txt"
curl -fsSLO "${BASE}/checksums.txt.sig"
curl -fsSLO "${BASE}/checksums.txt.pem"
cosign verify-blob \
--certificate-identity-regexp "https://github.com/rad-security/clawkeeper-mcp-gateway/.github/workflows/release.yml@refs/tags/.*" \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
--signature checksums.txt.sig \
--certificate checksums.txt.pem \
checksums.txt
Successful verification binds the checksum file to a specific GitHub Actions workflow on a specific tag — the SHA-256 you pin in your recipe is covered by the same signature.
Zero-touch IDE wiring
Installing the gateway binary is step one. Step two is pointing each developer's IDE at the gateway so traffic actually flows through it — rewriting ~/.cursor/mcp.json, ~/.claude/settings.json, and ~/Library/Application Support/Claude/claude_desktop_config.json. Doing this by hand per engineer does not scale. The gateway ships a subcommand that does it for you:
clawkeeper-mcp-gateway configure-ide
What it does, per installed IDE:
- Backs up the existing config to
<path>.clawkeeper-backup-<unix-nanos> - Migrates any already-registered MCP servers into the gateway's own
servers[]array (env vars included) - Rewrites the IDE's
mcpServersmap to a single entry pointing atclawkeeper-mcp-gateway server - Preserves every non-MCP top-level key verbatim (
permissions,preferences, etc.)
It is idempotent — a second run on an already-wired config is a no-op, with no second backup. Safe to run from a login hook, postinstall script, or every Kandji reapply. Supports Claude Code, Claude Desktop (macOS + Linux), and Cursor. Windsurf is a separate hooks-based integration.
Kandji invocation pattern (per-user)
Kandji runs as root, so the recipe needs to resolve the logged-in user and invoke configure-ide as that user. Same pattern our Kandji doc uses for the Cowork MCP server deploy:
# macOS: resolve console user and run configure-ide on their behalf
CURRENT_USER=$(/usr/bin/stat -f%Su /dev/console)
if [ "$CURRENT_USER" != "loginwindow" ] && [ "$CURRENT_USER" != "root" ]; then
/usr/bin/sudo -u "$CURRENT_USER" /usr/local/bin/clawkeeper-mcp-gateway configure-ide
fi
# Linux: resolve active seat user and run as them
CURRENT_USER=$(loginctl list-sessions --no-legend | awk '$3=="seat0"{print $4; exit}')
if [ -n "$CURRENT_USER" ] && [ "$CURRENT_USER" != "root" ]; then
sudo -u "$CURRENT_USER" /usr/local/bin/clawkeeper-mcp-gateway configure-ide
fi
Run these as part of the same Kandji recipe that drops /etc/clawkeeper-mcp-gateway/config.json. Repeat on every reapply — the idempotency guarantee means no churn.
macOS per-user launchd agent (alternative)
For teams that prefer a user-session LaunchAgent over a root-invoked postinstall hook:
<!-- ~/Library/LaunchAgents/dev.clawkeeper.configure-ide.plist -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key> <string>dev.clawkeeper.configure-ide</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/clawkeeper-mcp-gateway</string>
<string>configure-ide</string>
</array>
<key>RunAtLoad</key> <true/>
<key>StandardOutPath</key> <string>/tmp/clawkeeper-configure-ide.log</string>
<key>StandardErrorPath</key><string>/tmp/clawkeeper-configure-ide.log</string>
</dict>
</plist>
Load with launchctl load ~/Library/LaunchAgents/dev.clawkeeper.configure-ide.plist — runs once per login.
Claude Code skill + MCP inventory (scan-inventory)
A third subcommand, available in v0.4.0+, captures the skills and MCP servers already installed in each developer's ~/.claude tree and reports them to the dashboard at clawkeeper.dev/claude-code/skills. This is what populates the "installed skills" and "installed MCP servers" tables per host — the same data the plugin reports, but emitted by the gateway binary instead of requiring a Claude Code plugin install.
clawkeeper-mcp-gateway scan-inventory
What it does:
- Walks
~/.claude/skills/*/SKILL.md(user-scoped),<cwd>/.claude/skills/*/SKILL.md(project-scoped), and plugin-installed skills via~/.claude/plugins/installed_plugins.json— with a cache glob fallback if the manifest is missing - Reads
mcpServersfrom~/.claude/settings.json,<cwd>/.claude/settings.json, and<cwd>/.claude/settings.local.json - POSTs a payload matching the plugin's format to
{api_url}/api/v1/claude-code/checkin
Flags: --dry-run prints the JSON body that would be sent without sending. --cwd <path> overrides the project directory when invoked outside a Claude Code hook. --claude-version <ver> sets the claude_version field when not supplied by the hook envelope on stdin.
Fail-open by design: exits 0 on success, 0 on network failure, non-zero only on a fatal config error. A SessionStart hook that calls this subcommand will never block a developer's Claude Code session.
Wiring into Claude Code SessionStart
The gateway binary replaces the older type: "http" SessionStart hook that POSTed directly to /api/v1/claude-code/checkin. The HTTP hook can't read the filesystem, so it delivered an empty inventory. scan-inventory fixes that.
{
"hooks": {
"SessionStart": [{
"matcher": "*",
"hooks": [{
"type": "command",
"command": "/usr/local/bin/clawkeeper-mcp-gateway scan-inventory",
"timeout": 30
}]
}]
}
}
For the full Kandji recipe that writes this hook alongside the PreToolUse / PostToolUse / UserPromptSubmit hooks, see Kandji deployment.
Linux per-user systemd unit (alternative)
# ~/.config/systemd/user/clawkeeper-configure-ide.service
[Unit]
Description=Wire IDE configs through the Clawkeeper gateway
After=default.target
[Service]
Type=oneshot
ExecStart=/usr/local/bin/clawkeeper-mcp-gateway configure-ide
[Install]
WantedBy=default.target
Enable with systemctl --user enable clawkeeper-configure-ide.service.
Sample systemd unit (Linux)
# /etc/systemd/system/clawkeeper-mcp-gateway.service
[Unit]
Description=Clawkeeper MCP Gateway
After=network-online.target
[Service]
Type=simple
User=clawkeeper
Group=clawkeeper
ExecStart=/usr/local/bin/clawkeeper-mcp-gateway server
Environment=CLAWKEEPER_CONFIG=/etc/clawkeeper-mcp-gateway/config.json
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
Sample Ansible task
- name: Install Clawkeeper MCP Gateway
hosts: developer_laptops
vars:
ck_version: "v0.1.1"
ck_sha256_linux_amd64: "<pinned>"
tasks:
- name: Download gateway archive
get_url:
url: "https://github.com/rad-security/clawkeeper-mcp-gateway/releases/download/{{ ck_version }}/clawkeeper-mcp-gateway_linux_amd64.tar.gz"
dest: "/tmp/clawkeeper-mcp-gateway.tar.gz"
checksum: "sha256:{{ ck_sha256_linux_amd64 }}"
mode: "0644"
- name: Extract gateway binary
unarchive:
src: "/tmp/clawkeeper-mcp-gateway.tar.gz"
dest: "/usr/local/bin/"
remote_src: yes
extra_opts: ["--no-same-owner"]
- name: Render gateway config
template:
src: "clawkeeper-config.json.j2"
dest: "/etc/clawkeeper-mcp-gateway/config.json"
owner: clawkeeper
group: clawkeeper
mode: "0600"
notify: restart clawkeeper-mcp-gateway
handlers:
- name: restart clawkeeper-mcp-gateway
service:
name: clawkeeper-mcp-gateway
state: restarted
Sample Kandji pseudocode
VERSION="v0.1.1"
SHA256="<pinned at rollout time>"
download https://github.com/rad-security/clawkeeper-mcp-gateway/releases/download/${VERSION}/clawkeeper-mcp-gateway_linux_amd64.tar.gz
verify sha256 = ${SHA256}
extract /usr/local/bin/clawkeeper-mcp-gateway
render /etc/clawkeeper-mcp-gateway/config.json from secrets/clawkeeper (0600, owned by clawkeeper)
restart clawkeeper-mcp-gateway.service
Upgrading
Upgrade is the same recipe with a new VERSION + SHA256 pair. The gateway is a single binary with no in-place upgrade path of its own — your config-management tool controls rollout cadence.
Never retag a published version. Every bug fix is a new patch release (v0.1.2, v0.1.3, …). If you already rolled out a version that turned out to be broken, pin forward to the next patch — do not assume a previous pinned SHA-256 will still resolve if we ever had to pull a release.
Uninstalling from managed endpoints
The standard Clawkeeper uninstaller now handles enterprise gateway cleanup. It removes /usr/local/bin/clawkeeper-mcp-gateway, user config at ~/.config/clawkeeper-mcp-gateway, system config at /etc/clawkeeper-mcp-gateway when permissions allow, and gateway wiring in Claude Desktop / Claude Code MCP configs.
Dry-run a pilot group first:
curl -fsSL https://clawkeeper.dev/uninstall.sh | bash -s -- --dry-run
Then run the live cleanup:
curl -fsSL https://clawkeeper.dev/uninstall.sh | bash
When running as root from MDM, set TARGET_USER=<shortname> or execute as the logged-in user so user-scoped Claude and gateway files are cleaned correctly. See Uninstall Clawkeeper for Kandji, Jamf, and Intune examples.
Mirror path (future, not live)
If your security review forbids downloading binaries from github.com, we can mirror signed releases to /dl/gateway/<version>/ on clawkeeper.dev. This is not live in v1 and is gated on a specific customer request. Open a conversation with your Clawkeeper contact if you need it.
Related
- One-line install — for individual developers trying the gateway on their own machine.
- MCP Gateway overview — what the gateway does and how to wire it into your IDE.
- Uninstall Clawkeeper — for endpoint and fleet cleanup.
