Claude Code Integration
⚡ 5 min readInstall transcodes-guard for Claude Code (CLI/IDE agent — not Claude Desktop). Node.js ≥ 20. Get a MAT from Console → RBAC → Members → Get API Token — see AI Agent Overview.
Save your token
# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/transcodings/transcodes-guard/prod/cli/install.sh | bash && transcodes install
# Windows (PowerShell):
# irm https://raw.githubusercontent.com/transcodings/transcodes-guard/prod/cli/install.ps1 | iex; transcodes install
# or: transcodes set <MAT> -l claudeHooks and MCP read {{HOME_DIR}}/.transcodes/config.json. Without a MAT, risky commands are still denied but step-up cannot start.
Add marketplace and install
Two commands in a Claude Code session:
/plugin marketplace add transcodings/transcodes-guard
/plugin install transcodes-guard@bigstriderdist/ is committed — no build step. Disable: /plugin disable transcodes-guard
Hooks (PreToolUse matcher Bash|mcp__.*) and the MCP server activate via ${CLAUDE_PLUGIN_ROOT}.
Team auto-registration (optional)
.claude/settings.json in your project:
{
"extraKnownMarketplaces": [
{ "source": "github", "repo": "transcodings/transcodes-guard" }
],
"enabledPlugins": ["transcodes-guard@bigstrider"]
}Verify
Run a risky shell command or protected MCP tool — PreToolUse should deny and surface step-up on Transcodes Auth.
What you get
| Component | Role |
|---|---|
PreToolUse hook | POST /guard/evaluate on Bash + external MCP → RBAC step-up deny |
MCP transcodes-guard | Admin CRUD, poll_stepup_session_wait, diagnostics |
SessionStart | Injects step-up recovery protocol for the agent |
UserPromptSubmit | Surfaces pending sid when user says “done” |
Stop | Reaps orphan step-up state |
Slash command: /transcodes — prompt-driven control surface: admin MCP tools, simulate_command / simulate_tool_call, step-up recovery, SDK integration via get_integration_guide.
After a deny
Blocked command did not run. Claude Code injects the protocol at session start:
- User completes WebAuthn (auto-opened tab or URL from deny message).
- Agent calls
poll_stepup_session_waitwithsid(~60s timeout). - On
verified, retry the same Bash/MCP call.
Prefer poll_stepup_session_wait over one-shot poll_stepup_session (diagnostics only).
See also: Cursor · Codex · Step-up Auth