# sidclaw-governance-mcp

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.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 15
- Author: sidclawhq
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/sidclawhq/platform
- Updated: 2026-10-19
- HTML: https://affpapa.org/en/nevibecode/mcp/sidclaw-governance-mcp

## What it 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.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `SIDCLAW_API_KEY`, `SIDCLAW_AGENT_ID`, `SIDCLAW_UPSTREAM_CMD`, `SIDCLAW_UPSTREAM_ARGS`, `SIDCLAW_APPROVAL_MODE` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
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/sdk
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
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/sdk
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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

### Gemini CLI

**Platform CLI**
```bash
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/sdk
```
Replace <…> with your own values

## When to use it
- 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
- 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

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 392262
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33989
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81163
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119231
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47577
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43902

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
