nanoGentzen
Allows CrewAI agents to be governed by nanoGentzen, including plan checks, formal action authorization, human approval requests, and audit trail generation.
Enables LangGraph agents to use nanoGentzen governance tools for registering actions, verifying them against security policies, requesting human approval, and recording execution.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@nanoGentzenstart a governed agent session with standard permissions"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
nanoGentzen v2: Formal Logic Runtime for AI Agent Governance
Autonomous AI agents should think, plan, and propose actions freely — but consequential execution must be mathematically proven and human-approved.
nanoGentzen is a framework-independent, neurosymbolic Model Context Protocol (MCP) execution monitor. It gates AI Agent lifecycles using deterministic Gentzen Sequent Calculus ($LJ$) proof trees and enforces Human-in-the-Loop approval whenever security preconditions are unmet.
Pre-Release Notice (v0.0.1-pre)nanoGentzen is currently in active pre-release development. While the formal Gentzen $LJ$ deduction kernel is mathematically sound, APIs, MCP schemas, and state machine hooks are subject to change before the v1.0.0 stable release.
Testing Recommendation: Run and evaluate all agents within a local or staging environment using the provided harnesses before attaching this monitor to production infrastructure or sensitive side-effect tools.
Core Architectural Principle
Why nanoGentzen?
No Self-Approval Hallucinations: When an agent lacks permissions (e.g.,
ChangeBoardApproved), it cannot forge proofs or self-certify. It must formally escalate to the human operator viaagent_request_approval.Mathematical Soundness: Every action authorization is proven against intuitionistic propositional Gentzen rules ($LJ$) with zero unclosed leaves.
Framework-Independent: Works out of the box with Agno (AgnoAgi), LangGraph, AutoGen, CrewAI, LlamaIndex, smolagents, Hermes Agent, Cursor, Cline, or custom autonomous agent architectures.
Anti-Replay Security: Authorization certificates are strictly single-use, bound to the declared plan step, and expire after TTL (default: 60s).
Related MCP server: Mcp-Omega-Brain
The 8 Governance MCP Tools
Tool | Phase | Purpose |
| INIT | Initializes session with active permissions ($\Gamma$) and security policies ($\Delta$). |
| THINK | Monitors the agent's internal reasoning claims before action planning. |
| PLAN | Registers the proposed sequence of action steps before execution. |
| ACT | Formally verifies whether $\Gamma, \text{Policies} \vdash \text{Action}$ holds in Gentzen calculus. |
| APPROVAL | Escalates to the human user when prerequisites are missing. |
| APPROVAL | Ingests certified human approval into the session's active premise pool. |
| EXECUTE | Consumes the single-use certificate and marks execution complete. |
| AUDIT | Produces a cryptographic, append-only hash chain audit trail. |
Quickstart
1. Installation
git clone https://github.com/your-org/nanogentzen.git
cd nanogentzen/v2gh
pip install -r requirements.txt2. Verify Bundled Model Artifacts (Optional)
nanoGentzen bundles self-contained neural model weights under model/ (nanogentzen.onnx + nanogentzen.onnx.data):
# Verify cryptographic hashes and ONNX tensor signatures
python scripts/verify_v2_artifact.py
# Run complete test suite (29 tests)
pytest -v3. Run the MCP Governance Server
# Standard stdio transport (for IDEs, CLI agents, and local harnesses)
python server.py --transport stdio
# SSE transport (for networked or remote web agents)
python server.py --transport sse --port 80004. Connect Any Agent Framework
nanoGentzen works with any MCP-compatible framework or IDE out of the box:
# Agno / AgnoAgi (using native MCPTools)
from agno.agent import Agent
from agno.tools.mcp import MCPTools
from mcp import StdioServerParameters
agent = Agent(tools=[MCPTools(server_params=StdioServerParameters(command="python", args=["server.py"]))])
# LangGraph (using langchain-mcp-adapters)
from langchain_mcp_adapters.client import MultiServerMCPClient
client = MultiServerMCPClient({"nanogentzen": {"command": "python", "args": ["server.py"]}})
# AutoGen (using McpWorkbench)
from autogen_ext.tools.mcp import McpWorkbench, StdioServerParams
workbench = McpWorkbench(StdioServerParams(command="python", args=["server.py"]))
# smolagents (using MCPClient)
from smolagents import MCPClient
with MCPClient({"mcpServers": {"nanogentzen": {"command": "python", "args": ["server.py"]}}}) as tools:
...For complete setup guides, configurations, and evaluation scenarios across Agno (AgnoAgi), LangGraph, AutoGen, CrewAI, LlamaIndex, smolagents, Hermes Agent, Cursor, and Cline / Roo Code, see examples/ and the Framework Integration Matrix.
Example Walkthrough: Production Deployment
Prompt
Under the nanoGentzen LogicGuard monitor, please execute:
Task: Deploy release tag v2.1.0 to production cluster 'us-east-prod'.
Action to authorize: DeployToProd
Environment Security Policy:
SecurityScanPassed & ChangeBoardApproved => DeployToProd
Active Known Facts:
SecurityScanPassed
Note: Ticket #CAB-55102 is approved if authorization evidence is needed.Trace Execution
agent_start: Registers policySecurityScanPassed & ChangeBoardApproved => DeployToProdwith known factSecurityScanPassed.agent_observe: Records thinking: "Pre-flight checks passing. Planning deployment."agent_check: Declares plan:[{"step_id": "1", "action": "DeployToProd"}].agent_guard: Gentzen prover attempts: $$\text{SecurityScanPassed}, \text{SecurityScanPassed} \land \text{ChangeBoardApproved} \implies \text{DeployToProd} \vdash \text{DeployToProd}$$ Result:BLOCK(Leaf unclosed:ChangeBoardApprovedmissing).agent_request_approval: Agent requests human signoff forChangeBoardApproved.user_approve: Human user verifies ticket#CAB-55102and grantsChangeBoardApproved.agent_guard: Re-evaluated with updated premises. Result:ALLOW(Proof certificate issued).agent_record_execution: Certificate consumed.agent_audit: Cryptographic audit record generated.
Formal Logic Core: Gentzen Sequent Calculus ($LJ$)
nanoGentzen enforces Intuitionistic Sequent Calculus ($LJ$) rules backwards:
Identity Axiom: $$\Gamma, A \vdash A$$
Right Implication ($\vdash \implies$): $$\frac{A, \Gamma \vdash B}{\Gamma \vdash A \implies B}$$
Left Implication ($\implies \vdash$): $$\frac{\Gamma \vdash A \quad B, \Gamma \vdash \Delta}{A \implies B, \Gamma \vdash \Delta}$$
Left Conjunction ($\land \vdash$): $$\frac{A, B, \Gamma \vdash \Delta}{A \land B, \Gamma \vdash \Delta}$$
Documentation
Deep-dive architecture guides and formal logic references are available in the docs/ directory:
System Architecture: Internal layers, Gentzen prover integration, and state machine transitions.
MCP API Reference: Complete specifications for all 8 governance tools and JSON schemas.
Security Model: Trust boundaries, cryptographic single-use certificates, and anti-replay mitigations.
Self-Correction & Human Approval: Autonomous replanning vs. human approval escalation protocol.
Model & Engine Integration: Dual-backend Gentzen proof engine and intuitionistic $LJ$ calculus rules.
Hermes Agent Integration: Real-world CLI agent setup with tool allowlisting.
Roadmap & Community Priorities
We welcome contributions! Development is organized across three progressive milestones:
1. Enterprise Ergonomics & Observability
Dynamic Approval Gateways: Connect
agent_request_approvalto Slack, Jira, and PagerDuty interactive webhooks with signed callback verification.OpenTelemetry Metrics & Traces: Stream decision latencies, proof tree exploration depths, and policy rejections to Datadog, Prometheus, and Grafana.
Audit Trail Exporters: Stream session SHA-256 hash chains to cloud object storage (S3 / GCS) and structured JSON-L logs.
2. Cryptographic Hardening & Sound Logic Extensions
Asymmetric Certificate Signatures (Ed25519): Issue cryptographically signed, self-contained decision tokens verified by downstream services without session queries.
Decidable First-Order Logic (FOL): Extend the propositional engine to parameterized relations $Authorized(user, role, resource)$ using a terminating, decidable Datalog fragment.
Git-Native Merkle Audit Trees: Commit proof traces directly to signed Git tree objects for cross-organizational auditability.
3. High-Performance Runtime
Pure Rust Verification Engine: Port the deduction kernel to Rust via PyO3 for microsecond-scale verification and WebAssembly / C-FFI distribution.
Hardware Security Key Integration: Support hardware token signing (PKCS#11 / YubiKey / Cloud KMS) for issued decision certificates.
Contributing
Please read CONTRIBUTING.md for guidelines on development setup, proof engine invariants, and pull request procedures.
License
MIT License. See LICENSE for details.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Pre-execution governance for AI agents. Deterministic PASS/FAIL/REVIEW verdicts, replayable proof.
Runtime AI governance: decision gates, human approval, hash-chained audit, compliance mapping.
Six-gate governance for AI agents: PROCEED/PAUSE/HALT decisions with hash-chained audit trails.
Human-in-the-loop approval for agent actions, with verifiable action-bound receipts.
Related MCP Servers
- AlicenseAqualityCmaintenanceCryptographic proof of consent for AI agents. Sign before you act. Policy engine enforces spending caps, action whitelists, and escalation rules. Independently verifiable by anyone.102Apache 2.0
- AlicenseAqualityCmaintenanceAI agent provenance, trust, and auditability layer. VERITAS multi-gate scoring, Cortex approval gates, S.E.A.L. hash-chain audit ledger, and semantic RAG with cryptographic provenance tracking for every decision an agent makes.275MIT
- AlicenseAqualityBmaintenanceUniversal governance layer for AI agents — MCP-native, fail-closed, LNN interpretability. Governed receipts, IPFS audit proofs, and rollback for any agent in any framework.382Apache 2.0
- AlicenseNot gradedqualityDmaintenanceProvides cryptographic governance receipts for AI agents, enabling pre-execution evaluation and signed verdicts (EXECUTE/BLOCK/REVIEW/SHADOW) with offline-verifiable audit trails.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/DigitLib/nanoGentzen-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server