# Aletheia Aegis Output Guard & Eval Harness

> Aletheia Aegis Output Guard & Eval Harness is an open-source MCP server for agent sandbox. Deterministic guard that screens AI model outputs for credential leaks and safety failures. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, Self-hosted, Linux, macOS, Windows
- **Repository:** https://github.com/vikasny30/aletheia-aegis
- **MCP Registry name:** io.github.vikasny30/aletheia-aegis
- **Categories:** [agent sandbox](https://ai-powered.com/categories/agent-sandbox)
- **Listing updated:** 2026-11-21

## About

Aegis sits between a model and its user and inspects each generated reply before it is shown. A fast pattern-based engine runs on CPU with no network or model call, and blocks outputs that expose credentials such as API keys, private keys, JWTs or payment cards, along with self-harm method detail. Other problems, such as unhedged statistics, fabricated citations, unauthorized professional claims or prescriptive dosages, are flagged for audit or a disclaimer instead of being blocked.

An optional second stage sends only masked text to an external judge from Anthropic, OpenAI, Google or an OpenAI-compatible endpoint, and can verify DOI, arXiv and PMID citations against Crossref. Life-safety findings are never overridden by the judge. Telemetry records verdict counts, signature IDs and timings rather than response text.

The package is aimed at platform and security teams who run tool-using agents or high-volume inference gateways and want a low-latency filter in front of responses. It ships as a TypeScript SDK and as a stdio MCP server with six tools for checking outputs, verifying citations and reading telemetry.

## Features

- **Deterministic output screening:** Pattern and structural checks run on every response with no model call and consistent results.
- **Credential and card leak blocking:** Detects SSNs, Luhn-valid card numbers, cloud and API keys, JWTs and private keys before delivery.
- **Optional semantic judge:** Can route pre-redacted text to a configurable external model for cases patterns cannot settle.
- **Citation verification:** Resolves DOIs, arXiv IDs and PMIDs against Crossref when enabled.
- **Zero-retention telemetry:** Logs verdict counts, signature IDs and timings without storing prompt or response text.
- **MCP and SDK access:** Available as an npm CLI, a stdio MCP server and a TypeScript library for gateways and middleware.

## Good for

- Blocking leaked API keys or card numbers in agent replies before they reach users
- Adding a low-latency safety check to an inference gateway or API middleware
- Flagging unsupported statistics or fabricated citations in generated research text
- Auditing regulated-industry chatbots for unauthorized professional claims
- Replaying held-out labeled cases to measure guard performance offline

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add aletheia-aegis -- npx -y aletheia-aegis
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "aletheia-aegis": {
      "command": "npx",
      "args": [
        "-y",
        "aletheia-aegis"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "aletheia-aegis": {
      "command": "npx",
      "args": [
        "-y",
        "aletheia-aegis"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "aletheia-aegis": {
      "command": "npx",
      "args": [
        "-y",
        "aletheia-aegis"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "aletheia-aegis": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "aletheia-aegis"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add aletheia-aegis -- npx -y aletheia-aegis
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.aletheia-aegis]
command = "npx"
args = ["-y", "aletheia-aegis"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "aletheia-aegis": {
      "command": "npx",
      "args": [
        "-y",
        "aletheia-aegis"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user aletheia-aegis npx -- -y aletheia-aegis

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "aletheia-aegis": {
      "command": "npx",
      "args": [
        "-y",
        "aletheia-aegis"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "aletheia-aegis": {
      "command": "npx",
      "args": [
        "-y",
        "aletheia-aegis"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "aletheia-aegis": {
      "command": "npx",
      "args": [
        "-y",
        "aletheia-aegis"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "aletheia-aegis": {
      "command": "npx",
      "args": [
        "-y",
        "aletheia-aegis"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "aletheia-aegis": {
      "command": "npx",
      "args": [
        "-y",
        "aletheia-aegis"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "aletheia-aegis": {
      "command": "npx",
      "args": [
        "-y",
        "aletheia-aegis"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "aletheia-aegis": {
      "command": "npx",
      "args": [
        "-y",
        "aletheia-aegis"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "aletheia-aegis": {
      "command": "npx",
      "args": [
        "-y",
        "aletheia-aegis"
      ]
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 1 of 6 tools changes data; 2 names don't say. From the server's own tool labels and tool names; not verified by us.

- `aegis_check_output` (name suggests: reads): Core inspection returning verdict, findings, risk score and latency.
- `aegis_verify_citations`: Resolves DOIs, arXiv IDs and PMIDs against public registries.
- `aegis_run_eval` (name suggests: changes): Runs the local eval harness against labeled cases or classifies an incident file.
- `aegis_classify_incident`: Categorizes incident reports against the Aletheia taxonomy.
- `aegis_list_signatures` (name suggests: reads): Lists metadata, maturity and mandates for all nine signatures.
- `aegis_get_telemetry` (name suggests: reads): Returns stage latencies, judge usage, token counts and override stats.

## FAQ

### Does Aletheia Aegis Output Guard & Eval Harness send responses to an external service?

By default no. The deterministic engine runs offline. Only if a judge provider is configured is masked text sent to that provider, and credential blocks are never sent.

### What license is Aletheia Aegis Output Guard & Eval Harness released under?

Apache License 2.0.

### Which runtimes are supported?

TypeScript on Node.js 18, 20 and 22.

### How is Aletheia Aegis Output Guard & Eval Harness installed as an MCP server?

Through npx using the aletheia-aegis package, configured in a client's mcpServers block.

### Is Aletheia Aegis Output Guard & Eval Harness free?

Yes. Aletheia Aegis Output Guard & Eval Harness is open source, so you can use and self-host it for free.

### How do I add Aletheia Aegis Output Guard & Eval Harness to Claude Code?

Run this command in your terminal: claude mcp add aletheia-aegis -- npx -y aletheia-aegis

### What are the best alternatives to Aletheia Aegis Output Guard & Eval Harness?

The closest alternatives to Aletheia Aegis Output Guard & Eval Harness are Aegis MCP and Guardrail MCP.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Aegis MCP](https://ai-powered.com/mcp/aegis-mcp): Aegis MCP is an open-source MCP server for agent sandbox.
- [Guardrail MCP](https://ai-powered.com/mcp/guardrail-mcp): Guardrail MCP is an open-source MCP server for agent sandbox.

---
Source: https://ai-powered.com/mcp/aletheia-aegis-output-guard-and-eval-harness
