
Glassbox Framework
io.github.TheBarmaEffect由 GitHub 帳號 TheBarmaEffect 發布v1.0.3更新於 Oct 27, 2026
Runtime constitutional verification for AI answers — claim reasoning, ECS, red team, audits.
概覽
本機 MCP 伺服器,對問題與 AI 回答執行驗證流程,回傳主張、ECS 評分、紅隊探測與 Trust Card。
- 可以做什麼
- 對問題與回答執行完整流程,取得含裁決的 Trust Card
- 從回答中擷取原子主張,並為每條附上推理鏈
- 依公開公式計算認知信心評分並列出各維度明細
- 對回答執行七項對抗性紅隊探測
- 把自然語言部署意圖編譯成執行期規則並據此評估回答
- 以現成元件組裝 Trust Card,或匯出附確定性 SHA-256 稽核編號的稽核報告
- 適用情境
- 適合讓助理檢查自己或其他模型的回答是否有缺乏依據的主張、過度自信或違反政策,並產生可追溯的裁決與稽核編號。也適合在發布 AI 生成內容前加一道驗證關卡的團隊。
- 執行需求
- 以 stdio 在本機執行,可透過 npm 套件或 npx 安裝,另有 Python 用戶端套件。主張擷取、紅隊、憲法引擎與 ECS 檢查需要 ANTHROPIC_API_KEY,僅組裝 Trust Card 的工具不需金鑰。選用設定包括 GLASSBOX_MODEL、GLASSBOX_MAX_TOKENS 與 GLASSBOX_ECS_MODE。僅支援桌面端。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Glassbox Framework,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Glass Box Framework
Runtime constitutional verification for AI answers. Every claim carries a reasoning chain. Every score breaks down. Every verdict is traceable.
[CI] [PyPI version] [npm version] [Homebrew] [MCP Registry] [PyPI downloads] [License] [GitHub stars]
⭐️ 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.
[Glassbox in 70 seconds — walkthrough of all 6 tools]
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)
The six tools
Full schemas, examples, and configuration: mcp/README.md. Python pip-specific docs: mcp/python/README.md.
Architecture (two-layer)
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
~/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:
Project layout
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 [email protected] 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
來源:README.md,提交 97a7fe7
工具
0版本歷史
1- v1.0.3最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分