Aletheia Safety Filter — Claude Code MCP server: setup guide
Inspects agent commands on the fly, stopping unauthorized file wipes, credential snooping, and rogue SQL calls before execution takes place.
claude mcp add --env ALETHEIA_ALLOW_WRITE=<ALETHEIA_ALLOW_WRITE> --env ALETHEIA_ALLOW_NETWORK=<ALETHEIA_ALLOW_NETWORK> --env ALETHEIA_ALLOW_LOOPBACK=<ALETHEIA_ALLOW_LOOPBACK> --env ALETHEIA_OPERATOR_SECRET=<ALETHEIA_OPERATOR_SECRET> --transport stdio aletheia-runtime-safety-scope-creep-filter -- npx -y aletheia-mcpWhat Aletheia Runtime Safety & Scope Creep Filter does
This proxy acts as a pre-execution barrier for agentic tools. Operating with roughly 25 µs latency, it parses shell lines, database statements, and network destinations before the host agent can trigger them. It stops unintended file overwrites, destructive git resets, credential snooping inside ~/.ssh/id_rsa, and unchecked database updates missing WHERE clauses.
Unlike evaluator setups that query an auxiliary LLM and waste several seconds per step, the server relies on lexical pattern heuristics. It targets unprompted scope expansions and smuggled prompt instructions. Because it reads raw strings rather than maintaining an OS sandbox, tricky obfuscation schemes or domain names pointing to internal endpoints can bypass the text check. Pair it with container boundaries like Docker or Firecracker.
The binary runs through Node.js via npx. Configuration parameters require ALETHEIA_OPERATOR_SECRET alongside permission flags such as ALETHEIA_ALLOW_WRITE and ALETHEIA_ALLOW_NETWORK. Without passing the operator key during registration, the verification pipeline will fail to initialize.
What it helps with
- halt destructive shell scripts and unchecked git resets
- prevent tools from reading private credentials or
.envfiles - intercept raw SQL deletions lacking restrictive WHERE predicates
- cut off unauthorized network probes targeting cloud metadata endpoints
Example prompts for the agent
- Inspect git changes across the repo, leaving environment files untouched.
- Clean obsolete cache files without executing recursive directory removal.
- Query the customer table using explicit record IDs.
How to install Aletheia Runtime Safety & Scope Creep Filter
Platform CLI
claude mcp add --env ALETHEIA_ALLOW_WRITE=<ALETHEIA_ALLOW_WRITE> --env ALETHEIA_ALLOW_NETWORK=<ALETHEIA_ALLOW_NETWORK> --env ALETHEIA_ALLOW_LOOPBACK=<ALETHEIA_ALLOW_LOOPBACK> --env ALETHEIA_OPERATOR_SECRET=<ALETHEIA_OPERATOR_SECRET> --transport stdio aletheia-runtime-safety-scope-creep-filter -- npx -y aletheia-mcpReplace <…> with your own values
Platform CLI
codex mcp add aletheia-runtime-safety-scope-creep-filter --env ALETHEIA_ALLOW_WRITE=<ALETHEIA_ALLOW_WRITE> --env ALETHEIA_ALLOW_NETWORK=<ALETHEIA_ALLOW_NETWORK> --env ALETHEIA_ALLOW_LOOPBACK=<ALETHEIA_ALLOW_LOOPBACK> --env ALETHEIA_OPERATOR_SECRET=<ALETHEIA_OPERATOR_SECRET> -- npx -y aletheia-mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"aletheia-runtime-safety-scope-creep-filter": {
"command": "npx",
"args": [
"-y",
"aletheia-mcp"
],
"env": {
"ALETHEIA_ALLOW_WRITE": "<ALETHEIA_ALLOW_WRITE>",
"ALETHEIA_ALLOW_NETWORK": "<ALETHEIA_ALLOW_NETWORK>",
"ALETHEIA_ALLOW_LOOPBACK": "<ALETHEIA_ALLOW_LOOPBACK>",
"ALETHEIA_OPERATOR_SECRET": "<ALETHEIA_OPERATOR_SECRET>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"aletheia-runtime-safety-scope-creep-filter": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"aletheia-mcp"
],
"env": {
"ALETHEIA_ALLOW_WRITE": "<ALETHEIA_ALLOW_WRITE>",
"ALETHEIA_ALLOW_NETWORK": "<ALETHEIA_ALLOW_NETWORK>",
"ALETHEIA_ALLOW_LOOPBACK": "<ALETHEIA_ALLOW_LOOPBACK>",
"ALETHEIA_OPERATOR_SECRET": "<ALETHEIA_OPERATOR_SECRET>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e ALETHEIA_ALLOW_WRITE=<ALETHEIA_ALLOW_WRITE> -e ALETHEIA_ALLOW_NETWORK=<ALETHEIA_ALLOW_NETWORK> -e ALETHEIA_ALLOW_LOOPBACK=<ALETHEIA_ALLOW_LOOPBACK> -e ALETHEIA_OPERATOR_SECRET=<ALETHEIA_OPERATOR_SECRET> aletheia-runtime-safety-scope-creep-filter npx -y aletheia-mcpReplace <…> 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 Aletheia Runtime Safety & Scope Creep Filter
How to install Aletheia Runtime Safety & Scope Creep Filter in Claude Code?
Run claude mcp add aletheia-mcp -e ALETHEIA_OPERATOR_SECRET=<ALETHEIA_OPERATOR_SECRET> -- npx -y aletheia-mcp in your terminal. You can also specify access flags like write and network permissions.
How does Aletheia intercept commands without slowing down the agent?
The engine uses fast lexical pattern checks instead of passing requests to another LLM. It validates calls in roughly 25 microseconds, keeping execution overhead near zero.
Can this server replace Docker or system virtualization?
No, it works as an early pattern-matching filter rather than an operating-system sandbox. Complex syntax obfuscation or DNS-based SSRF still require network and kernel isolation boundaries.