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
| Scenario | Pick |
|---|---|
| Wrap an existing MCP server (Postgres, filesystem, GitHub) | @sidclaw/sdk → sidclaw-mcp-proxy |
| Give the agent explicit governance tools to call | @sidclaw/mcp-tools |
| Agent self-governs AND downstream MCPs are gated | Load both servers side-by-side |
Both approaches are complementary.
Install
npx @sidclaw/mcp-tools --versionConfigure
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
| Tool | What it does |
|---|---|
sidclaw_evaluate | Pre-action policy check. Returns allow, approval_required, or deny. |
sidclaw_record | Log an action outcome (success / error + token usage). |
sidclaw_approve | Block until a human decides on a flagged action. |
sidclaw_policies | List active policies. |
sidclaw_session_start | Register a session. |
sidclaw_session_end | Close a session. |
Plus three MCP resources:
sidclaw://policies— active policy rulessidclaw://status— instance healthsidclaw://agent/{agent_id}/history— last 50 traces for an agent
Environment
| Variable | Required | Default |
|---|---|---|
SIDCLAW_BASE_URL | Yes | — |
SIDCLAW_API_KEY | Yes | — |
SIDCLAW_AGENT_ID | No | claude-code |
SIDCLAW_MCP_NAME | No | sidclaw-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_evaluatereturns "API key invalid". Confirm the key starts withai_and has theevaluatescope. Rotate the key in Settings > API Keys if needed.
Full reference
See the package README for the complete tool schemas and development instructions.