# glassbox-framework

Evaluates AI answers at runtime by breaking down claims, scoring confidence, and running adversarial probes. Outputs a structured Trust Card with an audit hash.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 11
- Author: TheBarmaEffect
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/TheBarmaEffect/glassbox
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/glassbox-framework

## What it does

The server receives a question-answer pair and runs it through a verification pipeline. Instead of giving an opaque grade, it outputs a Trust Card with atomic assertions, a clear verdict (`trust`, `caution`, or `reject`), and an Epistemic Confidence Score calculated across five dimensions. Each run yields a deterministic SHA-256 audit reference based on canonical verification data.

Under the hood sits a Node.js package (`@glassbox-framework/mcp`) providing six tools validated with Zod. You can run full validations via `glassbox_verify_answer`, extract standalone claim reasoning with `glassbox_extract_claims`, or run the Glassbox Court via `glassbox_red_team`. The tool `glassbox_generate_trust_card` also lets you combine precomputed pieces without invoking another model call.

Running the full model-assisted pipeline requires an `ANTHROPIC_API_KEY` environment variable. The adversarial checks will fail immediately if this token is missing in your MCP configuration.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `ANTHROPIC_API_KEY`, `GLASSBOX_MODEL`, `GLASSBOX_MAX_TOKENS`, `GLASSBOX_ECS_MODE` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env ANTHROPIC_API_KEY=<ANTHROPIC_API_KEY> --env GLASSBOX_MODEL=<GLASSBOX_MODEL> --env GLASSBOX_MAX_TOKENS=<GLASSBOX_MAX_TOKENS> --env GLASSBOX_ECS_MODE=<GLASSBOX_ECS_MODE> --transport stdio glassbox-framework -- npx -y @glassbox-framework/mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add glassbox-framework --env ANTHROPIC_API_KEY=<ANTHROPIC_API_KEY> --env GLASSBOX_MODEL=<GLASSBOX_MODEL> --env GLASSBOX_MAX_TOKENS=<GLASSBOX_MAX_TOKENS> --env GLASSBOX_ECS_MODE=<GLASSBOX_ECS_MODE> -- npx -y @glassbox-framework/mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "glassbox-framework": {
            "command": "npx",
            "args": [
                "-y",
                "@glassbox-framework/mcp"
            ],
            "env": {
                "ANTHROPIC_API_KEY": "<ANTHROPIC_API_KEY>",
                "GLASSBOX_MODEL": "<GLASSBOX_MODEL>",
                "GLASSBOX_MAX_TOKENS": "<GLASSBOX_MAX_TOKENS>",
                "GLASSBOX_ECS_MODE": "<GLASSBOX_ECS_MODE>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "glassbox-framework": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@glassbox-framework/mcp"
            ],
            "env": {
                "ANTHROPIC_API_KEY": "<ANTHROPIC_API_KEY>",
                "GLASSBOX_MODEL": "<GLASSBOX_MODEL>",
                "GLASSBOX_MAX_TOKENS": "<GLASSBOX_MAX_TOKENS>",
                "GLASSBOX_ECS_MODE": "<GLASSBOX_ECS_MODE>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e ANTHROPIC_API_KEY=<ANTHROPIC_API_KEY> -e GLASSBOX_MODEL=<GLASSBOX_MODEL> -e GLASSBOX_MAX_TOKENS=<GLASSBOX_MAX_TOKENS> -e GLASSBOX_ECS_MODE=<GLASSBOX_ECS_MODE> glassbox-framework npx -y @glassbox-framework/mcp
```
Replace <…> with your own values

## When to use it
- verify AI responses against custom constitutional rules
- break down output text into atomic claims with falsification criteria
- calculate a multi-dimensional Epistemic Confidence Score
- generate reproducible SHA-256 audit identifiers for logging

## Example prompts
- Check this model answer against our policy rules using `glassbox_verify_answer`.
- Run `glassbox_red_team` on this output to scan for context attacks and fabrication.
- Compute the Epistemic Confidence Score for these statements via `glassbox_score_ecs`.

## Similar
- [llm-testing](https://affpapa.org/en/nevibecode/skills/llm-testing.md) — skill · 547 installs
- [ai-prompt-engineering-safety-review](https://affpapa.org/en/nevibecode/skills/ai-prompt-engineering-safety-review.md) — skill · 10327 installs
- [ai-risk-management](https://affpapa.org/en/nevibecode/skills/ai-risk-management.md) — skill · 313 installs
- [humane-proxy](https://affpapa.org/en/nevibecode/mcp/humane-proxy.md) — MCP server · ★ 27
- [ai-prompt-engineering-safety-best-practices](https://affpapa.org/en/nevibecode/rules/ai-prompt-engineering-safety-best-practices.md) — rule · ★ 40451
- [payment-provider-framework](https://affpapa.org/en/nevibecode/skills/payment-provider-framework.md) — skill · 979 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
