occasio — Claude Code MCP server: what it does, how to install
A local MCP server that filters agent actions, exposes outbound traffic, and keeps a verifiable audit trail. It fits workflows that need explicit approval for sensitive access.
claude mcp add occasio -- npx -y @occasiolabs/occasioWhat occasio does
occasio runs locally between an AI coding agent and its configured LLM endpoint. Tool calls pass through a policy file you control, while the server displays outbound data, blocks disallowed activity, and records a hash-linked log that can be checked offline later.
Its identity gate treats access to ssh, cloud controls, sudo, and systemctl as human-approved actions. The approval token cannot be issued by the agent itself. A PreToolUse hook installed with occasio hook --install covers execution that bypasses the proxy. Occasio keeps the audit data on the machine and uses no cloud service or telemetry.
Node.js ≥ 18 is required. In Claude Code, add the server with claude mcp add occasio -- npx -y @occasiolabs/occasio. The strict policy blocks secret reads and sensitive identity changes until a person approves them.
What it helps with
- inspect what an agent sends to its LLM
- block reads from
.envand private keys - gate
sshandsudobehind human approval - verify an agent run from a local audit chain
- find the policy rule behind a blocked action
Example prompts for the agent
- Show me the outbound data from this agent run and redact any secrets.
- Inspect the latest session and explain which policy rule blocked the command.
- Apply the strict posture and require approval before running
ssh.
How to install occasio
Platform CLI
claude mcp add occasio -- npx -y @occasiolabs/occasioPlatform CLI
codex mcp add occasio -- npx -y @occasiolabs/occasioConfig file
{
"mcpServers": {
"occasio": {
"command": "npx",
"args": [
"-y",
"@occasiolabs/occasio"
]
}
}
}Config file
{
"servers": {
"occasio": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@occasiolabs/occasio"
]
}
}
}Platform CLI
gemini mcp add occasio npx -y @occasiolabs/occasioStep 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 occasio
How do I install occasio in Claude Code?
Run claude mcp add occasio -- npx -y @occasiolabs/occasio.
What does occasio do?
It places a local policy-controlled proxy between the agent and its LLM endpoint, filters tool calls, and records a tamper-evident audit chain.
Does occasio require Node.js?
Yes. It requires Node.js ≥ 18.