
Glassbox Framework
- 11 repo stars
- Updated May 25, 2026
- TheBarmaEffect/glassbox
Glassbox Framework is an MCP server that constitutionally verifies AI answers with claim reasoning, ECS checks, red-team runs, and audit-ready trust cards.
About
Glassbox Framework is an MCP server that adds runtime constitutional verification on top of ordinary LLM workflows. developers shipping chat features, copilots, or internal agents can register the npm package @glassbox-framework/mcp and call verification engines from their IDE agent instead of bolting on one-off prompt guardrails. Most tools use your Anthropic API key to run claim extraction, constitution checks, ECS coherence analysis, and red-team style challenge passes against draft answers. One v1 tool, generate_trust_card, assembles trust artifacts using pure assembly plus deterministic audit hashing, so you can still produce auditable cards when you want a lightweight path without model calls. Environment knobs let you override the default Claude model (claude-sonnet-4-6), cap tokens per engine call (default 2048), and tune ECS behavior. It fits teams who need explainable verification and audit trails before customer-facing AI ships, not a full hosted observability platform.
- Runtime constitutional verification pipeline for AI answers with claim-level reasoning
- ECS coherence checks plus dedicated constitution and red-team verification engines
- generate_trust_card assembles outputs with deterministic audit hashing and needs no API key
- Anthropic-backed engines for claim extraction and verification (GLASSBOX_MODEL, GLASSBOX_MAX_TOKENS, GLASSBOX_ECS_MODE)
- stdio MCP package @glassbox-framework/mcp v1.0.3 for Claude Code and compatible clients
Glassbox Framework by the numbers
- Data as of Jul 7, 2026 (Skillselion catalog sync)
claude mcp add --env ANTHROPIC_API_KEY=YOUR_ANTHROPIC_API_KEY --env GLASSBOX_MODEL=YOUR_GLASSBOX_MODEL --env GLASSBOX_MAX_TOKENS=YOUR_GLASSBOX_MAX_TOKENS --env GLASSBOX_ECS_MODE=YOUR_GLASSBOX_ECS_MODE glassbox-framework -- npx -y @glassbox-framework/mcpAdd your badge
Show developers this MCP server is listed on Skillselion. Paste this into your README.
| repo stars | ★ 11 |
|---|---|
| Package | @glassbox-framework/mcp |
| Transport | STDIO |
| Auth | Required |
| Last updated | May 25, 2026 |
| Repository | TheBarmaEffect/glassbox ↗ |
What it does
Wire runtime constitutional checks, claim extraction, and red-team audits into your agent so AI answers are verified before users see them.
Who is it for?
Best when you're shipping Claude-powered features and want MCP-callable verification, red-team review, and hashed audit artifacts without building a custom safety stack.
Skip if: Skip if you only need generic chat with no compliance story, or anyone unwilling to provision Anthropic credentials for the verification engines.
What you get
After you install the MCP server and set ANTHROPIC_API_KEY, your agent can run verification engines and emit trust cards with deterministic audit hashing on answers you are about to ship.
- Constitutionally verified assessments of draft AI answers with claim-level reasoning
- Red-team and ECS coherence results you can review before shipping copy or tool output
- Trust cards assembled with deterministic audit hashing via generate_trust_card
By the numbers
- Published server version 1.0.3 on npm as @glassbox-framework/mcp
- Default verification model claude-sonnet-4-6 via GLASSBOX_MODEL
- Default per-engine token cap 2048 via GLASSBOX_MAX_TOKENS
README.md
Glass Box Framework
Runtime constitutional verification for AI answers. Every claim carries a reasoning chain. Every score breaks down. Every verdict is traceable.
⭐️ Star this repo if you want runtime AI verification to become the default. Every star moves Glassbox up the search ranking on GitHub, the MCP Registry, and Smithery — which means more developers find this before they ship an AI feature without a Trust Card.
pip install glassbox-framework # Python
npm install -g @glassbox-framework/mcp # Node / MCP
brew install thebarmaeffect/glassbox/glassbox-mcp # macOS
What it is
The Glass Box Framework hands an (question, answer) pair to a runtime verification pipeline and returns a structured Trust Card containing:
- Claims — every atomic assertion in the answer, paired with a reasoning chain explaining why it's asserted, what would support it, and what would falsify it.
- Epistemic Confidence Score (ECS) — a transparent, weighted aggregate over five dimensions with a published formula and an always-visible per-dimension breakdown.
- Glassbox Court — seven adversarial probes (fabrication, source manipulation, bias injection, context attack, overconfidence, underspecification, constitutional violation).
- Constitution — your natural-language deployer intents compiled into structured runtime rules and evaluated against the answer.
- Verdict —
trust/caution/reject, with the exact reasoning that derived it. - Audit reference — a deterministic SHA-256 log_id; identical inputs reproduce the same identifier across runs and languages.
It is intentionally not a wrapper around a single LLM call — the reasoning chain on every claim, the formula on the ECS, and the determinism of the audit hash together form the "Glass Box" principle: no opaque scores.
Quick start (Python)
from glassbox_framework import Glassbox
with Glassbox() as gb:
card = gb.verify_answer(
question="Can intermittent fasting cure type 2 diabetes?",
answer="Yes ...",
intents=[
"Never make specific medical claims without citing peer-reviewed sources.",
"Always recommend consultation with a licensed healthcare professional.",
],
)
print(card["verdict"]) # "reject"
print(card["ecs"]["total"]) # 0.6032
print(card["audit"]["log_id"]) # glassbox-85cc09903bd4... (deterministic)
The six tools
| Tool | Purpose |
|---|---|
glassbox_verify_answer |
Full pipeline → Trust Card |
glassbox_extract_claims |
Atomic claims with reasoning chains |
glassbox_score_ecs |
ECS with full breakdown + formula |
glassbox_red_team |
Glassbox Court — 7 adversarial probes |
glassbox_generate_trust_card |
Assemble a Trust Card from prebuilt parts (no LLM call) |
glassbox_export_audit_report |
Full pipeline + deterministic SHA-256 audit log |
Full schemas, examples, and configuration: mcp/README.md. Python pip-specific docs: mcp/python/README.md.
Architecture (two-layer)
┌──────────────────────────────────────────────────────────┐
│ glassbox-framework (PyPI) Python client │
│ thin JSON-RPC stdio wrapper │
│ spawns ↓ │
├──────────────────────────────────────────────────────────┤
│ @glassbox-framework/mcp (npm) Node MCP server │
│ 6 tools, Zod-validated I/O │
│ ↳ verify_answer ↳ extract_claims ↳ score_ecs │
│ ↳ red_team ↳ generate_trust_card │
│ ↳ export_audit_report │
└──────────────────────────────────────────────────────────┘
The Python client makes zero LLM calls itself; it forwards arguments to the MCP server over stdio and renders the returned JSON. Set ANTHROPIC_API_KEY once and both layers use it.
Use with Claude Desktop
{
"mcpServers": {
"glass-box": {
"command": "npx",
"args": ["-y", "@glassbox-framework/mcp"],
"env": { "ANTHROPIC_API_KEY": "sk-ant-..." }
}
}
}
~/Library/Application Support/Claude/claude_desktop_config.json on macOS.
Determinism
Audit log_ids are SHA-256 over canonicalised JSON of (inputs_hash, claims, ECS dimensions, red-team probe verdicts, constitution evaluations). Timestamps are recorded but never enter the hash, so identical inputs and identical engine outputs always produce the same log_id — across runs, machines, and even languages (the Python client → Node server → JSON canonicalisation produces byte-identical hashes).
Verifiable example, no API key needed:
pip install glassbox-framework
python -c "
import json
from glassbox_framework import Glassbox
with open('mcp/demo/raw-inputs.json') as f: i = json.load(f)
with Glassbox() as gb:
c = gb.generate_trust_card(
question=i['question'], answer=i['answer'],
claims=i['claims'], red_team=i['red_team'], ecs=i['ecs'],
constitution=i['constitution'])
print(c['audit']['log_id']) # glassbox-85cc09903bd4b3f8022a4087
"
Project layout
mcp/ — the MCP server + Python client (this release)
├── src/ — TypeScript MCP server (6 tools)
├── python/ — Python pip package (glassbox-framework)
├── homebrew/ — Homebrew formula
├── assets/ — Launch video + reveal + title cards
├── demo/ — Live terminal demo with prebuilt Trust Card
├── Dockerfile — Container image
├── server.json — MCP Registry manifest
├── smithery.yaml — Smithery.ai manifest
├── LAUNCH.md — Launch kit
└── DISTRIBUTION.md — Every channel's status + commands
LICENSE — Apache 2.0
ROADMAP.md — Phase 5 (governor) plans for the broader framework
CONTRIBUTING.md
CHANGELOG.md
Contributing
Glassbox is open source under Apache 2.0 and actively wants forks and PRs. A few specific places we'd love help:
- More red-team probes —
mcp/src/engines/redteam.tshas// v2:placeholders foralignment_faking,reasoning_trace_deception,eval_awareness_gaming,agentic_misalignment, andsustained_jailbreak. Each is a tractable PR — same shape as the existing 7 probes, just a different angle. See.github/ISSUE_TEMPLATE/good_first_issue.md. - More language clients — currently Python (
glassbox-framework) and Node (@glassbox-framework/mcp). Go, Rust, Ruby, Swift, Kotlin would all be welcome as thin JSON-RPC clients that spawn the existing MCP server. - More integrations — Cursor / Cline / Continue / Roo Cline / Zed / Neovim — wherever MCP is read, Glassbox should be one paste away.
- Real-world Trust Card examples — submit (Q, A) pairs from your own AI workflows so the test suite covers more terrain.
Process:
- Pick a
good first issueor open one with your idea - Fork, branch, work — the PR template walks you through verification
- CI must pass (
.github/workflows/ci.yml) — TS strict mode, Python wheel build, cross-language determinism on the canonical audit hash - Open the PR; we aim for review within 48 hours
Code of conduct: Contributor Covenant 2.1. Be kind, stay on substance, no harassment, contact thebarmaeffect@gmail.com for anything off-public-channel.
Star ⭐ this repo
The fastest way to help right now is to star the repo. Every star:
- Surfaces Glassbox higher in GitHub's MCP topic listings
- Pushes the project up on the MCP Registry and Smithery rankings
- Tells the next developer evaluating AI-safety tooling that this is the one with eyes on it
Author
Karthik Barma · MS Artificial Intelligence · Northeastern University.
Powered by Aura.
Issues + PRs: https://github.com/TheBarmaEffect/glassbox/issues
Recommended MCP Servers
How it compares
Runtime AI verification MCP with constitutional and red-team engines—not a prompt-only skill or a generic logging monitor.
FAQ
Who is Glassbox Framework for?
It is for and developers using Claude Code or other stdio MCP clients who need claim-level verification and audits on AI-generated answers before release.
When should I use Glassbox Framework?
Use it during Ship when you are hardening agent outputs—run constitution checks, ECS coherence, and red-team passes on drafts you plan to show customers or stakeholders.
How do I add Glassbox Framework to my agent?
Add the npm MCP server @glassbox-framework/mcp to your client config, set ANTHROPIC_API_KEY for the verification engines, optionally GLASSBOX_MODEL and GLASSBOX_MAX_TOKENS, then invoke tools from your agent session.