npm @glassbox-framework/mcpstdioApache-2.0updated 19d ago
Runtime constitutional verification for AI answers. Every claim carries a reasoning chain. Every score breaks down. Every verdict is traceable.
ΒΏQuΓ© puedes hacer con glassbox framework?
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
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
InstalaciΓ³n
AΓ±ade glassbox framework a tu cliente. Elige el que uses.
claude mcp add mcp -- npx -y @glassbox-framework/mcpcodex mcp add mcp -- npx -y @glassbox-framework/mcpamp mcp add mcp -- npx -y @glassbox-framework/mcp{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@glassbox-framework/mcp"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@glassbox-framework/mcp"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"mcp","command":"npx","args":["-y","@glassbox-framework/mcp"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@glassbox-framework/mcp"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@glassbox-framework/mcp"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@glassbox-framework/mcp"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"mcp": {
"type": "local",
"command": "npx",
"args": [
"-y",
"@glassbox-framework/mcp"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"mcp": {
"command": {
"path": "npx",
"args": [
"-y",
"@glassbox-framework/mcp"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y @glassbox-framework/mcpRun `goose configure`, choose **Add Extension β Command-line Extension**, and paste this command.
PuntuaciΓ³n
39 / 100
Incompleta
- DocumentaciΓ³n25/25
- Mantenimiento19/25
- Confianza13/20
- Capacidad0/15
- InstalaciΓ³n12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 12 days ago
- Has a release history
- Repository is not archived
- Licensed Apache-2.0
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint β no local install
Historial de versiones
| Versiones | Publicada |
|---|---|
| 1.0.3Γltima | 25 may 2026 |
| 1.0.2 | 25 may 2026 |