sidclaw-governance-mcp — Claude Code MCP server: tool call control
A proxy that sits in front of your MCP servers, checks every tool call against policy, and sends risky actions to a human for sign-off.
claude mcp add --env SIDCLAW_API_KEY=<SIDCLAW_API_KEY> --env SIDCLAW_AGENT_ID=<SIDCLAW_AGENT_ID> --env SIDCLAW_UPSTREAM_CMD=<SIDCLAW_UPSTREAM_CMD> --env SIDCLAW_UPSTREAM_ARGS=<SIDCLAW_UPSTREAM_ARGS> --env SIDCLAW_APPROVAL_MODE=<SIDCLAW_APPROVAL_MODE> --transport stdio sidclaw-governance-mcp -- npx -y @sidclaw/sdkWhat sidclaw-governance-mcp does
The server wraps other MCP servers. Tool calls get evaluated against your rules, and the outcome is one of three: allow runs the action right away, approval_required hands a reviewer a context card to approve or reject, deny stops the call before it executes. Every decision lands in a hash-chained audit trail, so you can reconstruct who asked for what and how it ended.
It starts with npx -y @sidclaw/sdk. You supply SIDCLAW_API_KEY, SIDCLAW_AGENT_ID, plus the wrapped server's command in SIDCLAW_UPSTREAM_CMD and its arguments in SIDCLAW_UPSTREAM_ARGS. No key, no proxy — get one before you wire anything up. SIDCLAW_APPROVAL_MODE controls how approvals behave.
Clients include Claude, Codex, Cursor, GitHub Copilot and Gemini CLI. Claude users can skip the proxy entirely: hooks in the platform repo intercept Bash, Write, Agent and mcp__* calls once SIDCLAW_BASE_URL and SIDCLAW_API_KEY are set and the client restarts.
What it helps with
- hold destructive agent commands until a person approves them
- keep a tamper-evident log of every tool call
- block actions a policy forbids before they run
- scope agent permissions through an owner and explicit rules
- show the reviewer full context before they decide
Example prompts for the agent
- Add sidclaw-governance-mcp and route my Bash calls through the proxy
- Set a policy so file deletion needs approval
- Show me today's decision log for tool calls
How to install sidclaw-governance-mcp
Platform CLI
claude mcp add --env SIDCLAW_API_KEY=<SIDCLAW_API_KEY> --env SIDCLAW_AGENT_ID=<SIDCLAW_AGENT_ID> --env SIDCLAW_UPSTREAM_CMD=<SIDCLAW_UPSTREAM_CMD> --env SIDCLAW_UPSTREAM_ARGS=<SIDCLAW_UPSTREAM_ARGS> --env SIDCLAW_APPROVAL_MODE=<SIDCLAW_APPROVAL_MODE> --transport stdio sidclaw-governance-mcp -- npx -y @sidclaw/sdkReplace <…> with your own values
Platform CLI
codex mcp add sidclaw-governance-mcp --env SIDCLAW_API_KEY=<SIDCLAW_API_KEY> --env SIDCLAW_AGENT_ID=<SIDCLAW_AGENT_ID> --env SIDCLAW_UPSTREAM_CMD=<SIDCLAW_UPSTREAM_CMD> --env SIDCLAW_UPSTREAM_ARGS=<SIDCLAW_UPSTREAM_ARGS> --env SIDCLAW_APPROVAL_MODE=<SIDCLAW_APPROVAL_MODE> -- npx -y @sidclaw/sdkReplace <…> with your own values
Config file
{
"mcpServers": {
"sidclaw-governance-mcp": {
"command": "npx",
"args": [
"-y",
"@sidclaw/sdk"
],
"env": {
"SIDCLAW_API_KEY": "<SIDCLAW_API_KEY>",
"SIDCLAW_AGENT_ID": "<SIDCLAW_AGENT_ID>",
"SIDCLAW_UPSTREAM_CMD": "<SIDCLAW_UPSTREAM_CMD>",
"SIDCLAW_UPSTREAM_ARGS": "<SIDCLAW_UPSTREAM_ARGS>",
"SIDCLAW_APPROVAL_MODE": "<SIDCLAW_APPROVAL_MODE>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"sidclaw-governance-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@sidclaw/sdk"
],
"env": {
"SIDCLAW_API_KEY": "<SIDCLAW_API_KEY>",
"SIDCLAW_AGENT_ID": "<SIDCLAW_AGENT_ID>",
"SIDCLAW_UPSTREAM_CMD": "<SIDCLAW_UPSTREAM_CMD>",
"SIDCLAW_UPSTREAM_ARGS": "<SIDCLAW_UPSTREAM_ARGS>",
"SIDCLAW_APPROVAL_MODE": "<SIDCLAW_APPROVAL_MODE>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e SIDCLAW_API_KEY=<SIDCLAW_API_KEY> -e SIDCLAW_AGENT_ID=<SIDCLAW_AGENT_ID> -e SIDCLAW_UPSTREAM_CMD=<SIDCLAW_UPSTREAM_CMD> -e SIDCLAW_UPSTREAM_ARGS=<SIDCLAW_UPSTREAM_ARGS> -e SIDCLAW_APPROVAL_MODE=<SIDCLAW_APPROVAL_MODE> sidclaw-governance-mcp npx -y @sidclaw/sdkReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about sidclaw-governance-mcp
How do I install sidclaw-governance-mcp in Claude Code?
Run `claude mcp add sidclaw-governance-mcp -e SIDCLAW_API_KEY=<SIDCLAW_API_KEY> -e SIDCLAW_AGENT_ID=<SIDCLAW_AGENT_ID> -e SIDCLAW_UPSTREAM_CMD=<SIDCLAW_UPSTREAM_CMD> -e SIDCLAW_UPSTREAM_ARGS=<SIDCLAW_UPSTREAM_ARGS> -- npx -y @sidclaw/sdk. A second form uses --env flags with an explicit --transport stdio`.
What does sidclaw-governance-mcp do?
It intercepts an agent's tool calls, evaluates them against your policies, then allows, holds for approval, or denies them. Each decision is recorded.
What does the proxy need to run?
SIDCLAW_API_KEY, SIDCLAW_AGENT_ID, and the wrapped server's command and arguments in SIDCLAW_UPSTREAM_CMD and SIDCLAW_UPSTREAM_ARGS.