glassbox-framework — Claude Code MCP server: setup and overview
Evaluates AI answers at runtime by breaking down claims, scoring confidence, and running adversarial probes. Outputs a structured Trust Card with an audit hash.
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/mcpWhat glassbox-framework 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.
What it helps with
- 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 for the agent
- Check this model answer against our policy rules using
glassbox_verify_answer. - Run
glassbox_red_teamon this output to scan for context attacks and fabrication. - Compute the Epistemic Confidence Score for these statements via
glassbox_score_ecs.
How to install glassbox-framework
Platform CLI
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/mcpReplace <…> with your own values
Platform CLI
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/mcpReplace <…> with your own values
Config file
{
"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
Config file
{
"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
Platform CLI
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/mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about glassbox-framework
How to install glassbox-framework in Claude Code?
Run claude mcp add glassbox-framework -e ANTHROPIC_API_KEY=<ANTHROPIC_API_KEY> -- npx -y @glassbox-framework/mcp. If needed, you can pass additional flags like GLASSBOX_MODEL and GLASSBOX_ECS_MODE.
What does glassbox-framework do?
It inspects model answers at runtime, validating claims, checking deployer instructions, and testing against adversarial probes. The output is a structured Trust Card with a traceable score.
What adversarial probes are included in Glassbox Court?
The suite evaluates answers against seven vectors: fabrication, source manipulation, bias injection, context attack, overconfidence, underspecification, and constitutional breaches.