Provides runtime constitutional verification for AI answers through claim reasoning, epistemic confidence scoring, and adversarial red-teaming.
Also known as TheBarmaEffect/glassbox, glassbox, @glassbox-framework/mcp
- Stars
- 10
- Tools
- 6
- Downloads, 30 days
- 215
- Latest version
- 1.0.3
- Last commit
- Nov 15, 2026
- License
- Apache-2.0
What is glassbox-framework MCP?
glassbox-framework provides runtime constitutional verification for AI answers through claim reasoning, epistemic confidence scoring, and adversarial red-teaming. It exposes 6 tools, such as glassbox_verify_answer, glassbox_extract_claims, glassbox_score_ecs.
Summary generated from the project's README
About glassbox-framework MCP server
The Glass Box Framework provides runtime constitutional verification for AI-generated answers. It is designed for developers who need to ensure the reliability and safety of model outputs by transforming a simple question and answer pair into a structured Trust Card. This card includes atomic claims with reasoning chains, an Epistemic Confidence Score, and a verdict based on user-defined natural language intents.
Users can implement this via a Python client or a Node-based MCP server. The system requires an ANTHROPIC_API_KEY to function. It offers six specific tools: glassbox_verify_answer, glassbox_extract_claims, glassbox_score_ecs, glassbox_red_team, glassbox_generate_trust_card, and glassbox_export_audit_report. Unlike opaque scoring systems, this framework emphasizes transparency through a deterministic SHA-256 audit log that ensures identical inputs produce the same identifier across different machines and languages.
What you can do with it
- 1Verify medical or factual claimsAn AI client can use the framework to check if an answer adheres to specific safety constraints, such as requiring peer-reviewed sources for medical advice.
- 2Perform adversarial red-teamingDevelopers can subject model responses to seven different adversarial probes to detect issues like bias injection or fabrication.
- 3Generate transparent confidence scoresYou can extract a weighted aggregate score that breaks down confidence across five different dimensions.
- 4Create deterministic audit logsThe system allows for the creation of a unique, reproducible identifier for every verification run to ensure traceability.
Written from the project's README. Every use case is checked against a quote from it.
How to install glassbox-framework MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall glassbox-framework MCP in Claude Code
$ claude mcp add --env 'ANTHROPIC_API_KEY=<YOUR_ANTHROPIC_API_KEY>' glassbox -- npx -y @glassbox-framework/mcpInstall glassbox-framework MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"glassbox": {
"command": "npx",
"args": [
"-y",
"@glassbox-framework/mcp"
],
"env": {
"ANTHROPIC_API_KEY": "<YOUR_ANTHROPIC_API_KEY>"
}
}
}
}Install glassbox-framework MCP in VS Code
.vscode/mcp.json
{
"servers": {
"glassbox": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@glassbox-framework/mcp"
],
"env": {
"ANTHROPIC_API_KEY": "<YOUR_ANTHROPIC_API_KEY>"
}
}
}
}Install glassbox-framework MCP in VS Code CLI
$ code --add-mcp '{"name":"glassbox","type":"stdio","command":"npx","args":["-y","@glassbox-framework/mcp"],"env":{"ANTHROPIC_API_KEY":"<YOUR_ANTHROPIC_API_KEY>"}}'Install glassbox-framework MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"glassbox": {
"command": "npx",
"args": [
"-y",
"@glassbox-framework/mcp"
],
"env": {
"ANTHROPIC_API_KEY": "<YOUR_ANTHROPIC_API_KEY>"
}
}
}
}Install glassbox-framework MCP in Codex
$ codex mcp add glassbox --env 'ANTHROPIC_API_KEY=<YOUR_ANTHROPIC_API_KEY>' -- npx -y @glassbox-framework/mcpInstall glassbox-framework MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.glassbox] command = "npx" args = ["-y", "@glassbox-framework/mcp"] [mcp_servers.glassbox.env] ANTHROPIC_API_KEY = "<YOUR_ANTHROPIC_API_KEY>"
Install glassbox-framework MCP in Gemini CLI
$ gemini mcp add -s user -e 'ANTHROPIC_API_KEY=<YOUR_ANTHROPIC_API_KEY>' glassbox npx -- -y @glassbox-framework/mcpInstall glassbox-framework MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"glassbox": {
"command": "npx",
"args": [
"-y",
"@glassbox-framework/mcp"
],
"env": {
"ANTHROPIC_API_KEY": "<YOUR_ANTHROPIC_API_KEY>"
}
}
}
}Started by HostedMCP on 16 Nov 2026
We ran this command for @glassbox-framework/mcp 1.0.3 in an isolated container with no network and no keys. It answered and listed 6 tools.
glassbox-framework MCP tools 6
Read from the server with tools/listglassbox_verify_answerRun a question/answer pair through the entire Glass Box Framework: claim extraction → constitution compile + evaluate → Glassbox Court (red-team) → ECS → verdict. Returns a Trust Card with verdict, ECS breakdown, per-claim reasoning, all 7 red-team probes, and the deterministic audit reference.
glassbox_extract_claimsDecompose an answer into atomic claims. Every claim carries a non-empty reasoning chain explaining why it is asserted, what evidence supports it, and how it could be falsified. Fallback claims (produced when the LLM call fails) are explicitly marked with a [fallback] prefix. The reasoning field is non-negotiable — it is the core product of the framework.
glassbox_score_ecsCompute the Epistemic Confidence Score over prebuilt claims, an optional red-team report, and an optional constitution. Returns all five dimension scores, the weights used, the exact formula evaluated, and the total — never just the total. Defaults to weighted arithmetic mean; pass mode="geometric" for the stricter variant.
glassbox_red_teamGlassbox Court runs all seven adversarial probes against an answer: fabrication, source manipulation, bias injection, context attack, overconfidence, underspecification, and constitutional violation. Returns one finding per probe, with verbatim evidence, even when the probe passes. If `intents` are supplied and `constitution` is not, the intents are compiled and evaluated inline so the constitutional_violation probe runs against the right rule set.
glassbox_generate_trust_cardAssemble a Trust Card from prebuilt parts (claims, red_team, ecs, optional constitution). No new LLM calls are made by this tool — it derives the verdict from the supplied parts and produces a deterministic audit reference. Use this when you have already called glassbox_extract_claims / glassbox_red_team / glassbox_score_ecs separately and want to compose the final artifact.
glassbox_export_audit_reportRun the full Glass Box pipeline and return a full AuditRecord, including the per-call API trace and a deterministic SHA-256-based log_id. Two runs with identical inputs AND identical engine outputs produce the same log_id, enabling replay detection and cache lookups.
| glassbox_verify_answer | Run a question/answer pair through the entire Glass Box Framework: claim extraction → constitution compile + evaluate → Glassbox Court (red-team) → ECS → verdict. Returns a Trust Card with verdict, ECS breakdown, per-claim reasoning, all 7 red-team probes, and the deterministic audit reference. | |
| glassbox_extract_claims | Decompose an answer into atomic claims. Every claim carries a non-empty reasoning chain explaining why it is asserted, what evidence supports it, and how it could be falsified. Fallback claims (produced when the LLM call fails) are explicitly marked with a [fallback] prefix. The reasoning field is non-negotiable — it is the core product of the framework. | |
| glassbox_score_ecs | Compute the Epistemic Confidence Score over prebuilt claims, an optional red-team report, and an optional constitution. Returns all five dimension scores, the weights used, the exact formula evaluated, and the total — never just the total. Defaults to weighted arithmetic mean; pass mode="geometric" for the stricter variant. | |
| glassbox_red_team | Glassbox Court runs all seven adversarial probes against an answer: fabrication, source manipulation, bias injection, context attack, overconfidence, underspecification, and constitutional violation. Returns one finding per probe, with verbatim evidence, even when the probe passes. If `intents` are supplied and `constitution` is not, the intents are compiled and evaluated inline so the constitutional_violation probe runs against the right rule set. | |
| glassbox_generate_trust_card | Assemble a Trust Card from prebuilt parts (claims, red_team, ecs, optional constitution). No new LLM calls are made by this tool — it derives the verdict from the supplied parts and produces a deterministic audit reference. Use this when you have already called glassbox_extract_claims / glassbox_red_team / glassbox_score_ecs separately and want to compose the final artifact. | |
| glassbox_export_audit_report | Run the full Glass Box pipeline and return a full AuditRecord, including the per-call API trace and a deterministic SHA-256-based log_id. Two runs with identical inputs AND identical engine outputs produce the same log_id, enabling replay detection and cache lookups. |
Configuration
ANTHROPIC_API_KEYRequiredSecretYour Anthropic API key (sk-ant-...). Required for the claim extractor, red team, constitution engines, and ECS coherence checks. One v1 tool (generate_trust_card) works without an API key — it's pure assembly + deterministic audit hashing.
GLASSBOX_ECS_MODEECS aggregation mode: arithmetic (weighted mean, default) or geometric (stricter — any zero dimension collapses the total).
GLASSBOX_MAX_TOKENSPer-engine-call max-tokens cap. Defaults to 2048; raise for verifying long-form content.
GLASSBOX_MODELOverride the Claude model used by the verification engines. Defaults to claude-sonnet-4-6.
| Name | Description | |
|---|---|---|
| ANTHROPIC_API_KEY | Your Anthropic API key (sk-ant-...). Required for the claim extractor, red team, constitution engines, and ECS coherence checks. One v1 tool (generate_trust_card) works without an API key — it's pure assembly + deterministic audit hashing. | RequiredSecret |
| GLASSBOX_ECS_MODE | ECS aggregation mode: arithmetic (weighted mean, default) or geometric (stricter — any zero dimension collapses the total). | |
| GLASSBOX_MAX_TOKENS | Per-engine-call max-tokens cap. Defaults to 2048; raise for verifying long-form content. | |
| GLASSBOX_MODEL | Override the Claude model used by the verification engines. Defaults to claude-sonnet-4-6. |
Automated checks
Ran Nov 16, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachablethebarmaeffect/glassbox is public and reachablegithub.com/thebarmaeffect/glassbox ↗Pass
- Package names this repository as its source@glassbox-framework/mcp names thebarmaeffect/glassbox as sourcenpmjs.com/package/@glassbox-framework/mcp ↗Pass
- Build provenance (Sigstore attestation)No build attestation published for this releaseNot checked
- Open source license (OSI)Apache-2.0spdx.org/licenses/Apache-2.0.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-15github.com/thebarmaeffect/glassbox ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from @glassbox-framework/mcpPass
- No critical advisory in the package or its dependencies147 resolved dependencies checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the model6 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNo tool named like delete, drop or execPass
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubGlass 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
Zero-cost public GlassBox Lite
The repository also ships a separate deterministic Lite verifier and cross-platform gateway that require no paid model API:
- Web app / installable PWA
- Public remote MCP for ChatGPT, Claude, and compatible clients
- GitHub App
- Discord
- Telegram
- Notion: embed
https://glassbox-platform-gateway.onrender.com/app - Browser, VS Code, and JetBrains packages: latest GitHub release
Lite performs bounded structural checks and does not browse or establish factual truth. The original six-tool model-assisted MCP documented below remains a separate surface.
See PLATFORMS.md for the exact live, downloadable, pilot, and external-review status of every integration.
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
glassbox-framework MCP questions
How do I add glassbox-framework MCP to Claude Code?
Run claude mcp add --env 'ANTHROPIC_API_KEY=<YOUR_ANTHROPIC_API_KEY>' glassbox -- npx -y @glassbox-framework/mcp in your terminal. Add --scope user to make it available in every project.
How do I add glassbox-framework MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does glassbox-framework MCP provide?
It exposes 6 tools, including glassbox_verify_answer, glassbox_extract_claims, glassbox_score_ecs, glassbox_red_team, glassbox_generate_trust_card.
What information is included in a Trust Card?
A Trust Card contains atomic claims with reasoning chains, an Epistemic Confidence Score (ECS), results from seven adversarial red-team probes, constitution evaluations, a verdict, and a deterministic audit reference.
Does the framework require a paid model API?
The GlassBox Lite version provides a deterministic verifier and gateway that requires no paid model API, performing bounded structural checks.
How does the audit log ensure determinism?
Audit log IDs are generated using a SHA-256 hash over the canonicalized JSON of inputs, claims, ECS dimensions, red-team verdicts, and constitution evaluations.