SidClaw

MCP Tools Server

An MCP server that exposes SidClaw governance primitives as callable tools — evaluate, record, approve, and list policies directly from any MCP host.

MCP Tools Server (@sidclaw/mcp-tools)

@sidclaw/mcp-tools is an MCP server that publishes SidClaw governance as callable tools — the complement to the transparent sidclaw-mcp-proxy shipped with @sidclaw/sdk.

Where the proxy wraps an upstream MCP server and gates its tools transparently, @sidclaw/mcp-tools lets the agent call governance primitives directly: sidclaw_evaluate, sidclaw_record, sidclaw_approve, and sidclaw_policies. Use it with Claude Code, Claude Desktop, or any MCP host.

MIT licensed.

When to use this vs the MCP proxy

ScenarioPick
Wrap an existing MCP server (Postgres, filesystem, GitHub)@sidclaw/sdksidclaw-mcp-proxy
Give the agent explicit governance tools to call@sidclaw/mcp-tools
Agent self-governs AND downstream MCPs are gatedLoad both servers side-by-side

Both approaches are complementary.

Install

npx @sidclaw/mcp-tools --version

Configure

Add the server to your MCP host config (Claude Code .mcp.json, Claude Desktop claude_desktop_config.json, etc.):

{
  "mcpServers": {
    "sidclaw": {
      "command": "npx",
      "args": ["-y", "@sidclaw/mcp-tools"],
      "env": {
        "SIDCLAW_BASE_URL": "https://api.sidclaw.com",
        "SIDCLAW_API_KEY": "ai_your_key_here",
        "SIDCLAW_AGENT_ID": "claude-code"
      }
    }
  }
}

Restart your MCP host. The agent can now call governance tools directly.

Exposed tools

ToolWhat it does
sidclaw_evaluatePre-action policy check. Returns allow, approval_required, or deny.
sidclaw_recordLog an action outcome (success / error + token usage).
sidclaw_approveBlock until a human decides on a flagged action.
sidclaw_policiesList active policies.
sidclaw_session_startRegister a session.
sidclaw_session_endClose a session.

Plus three MCP resources:

  • sidclaw://policies — active policy rules
  • sidclaw://status — instance health
  • sidclaw://agent/{agent_id}/history — last 50 traces for an agent

Environment

VariableRequiredDefault
SIDCLAW_BASE_URLYes
SIDCLAW_API_KEYYes
SIDCLAW_AGENT_IDNoclaude-code
SIDCLAW_MCP_NAMENosidclaw-mcp-tools

Troubleshooting

Server does not appear in the MCP host. Verify the config file path is correct for your host, the JSON is valid (no trailing commas), and restart the host. Check logs for startup errors.

sidclaw_evaluate returns "API key invalid". Confirm the key starts with ai_ and has the evaluate scope. Rotate the key in Settings > API Keys if needed.

Full reference

See the package README for the complete tool schemas and development instructions.