Dvarapala
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., "@Dvarapalaverify the audit log's hash chain and show any tampered entries"
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.
Dvarapala
Permission gates + tamper-evident audit logs for AI agents and MCP servers. 3 lines to add.
Agents execute tools, run commands, move money. When something goes wrong you need to answer two questions: should that have been allowed? and exactly where did the run go wrong? Dvarapala answers both — before (gating) and after (audit) — with zero dependencies.
import dvarapala
gate = dvarapala.Gate(policy="policy.json", audit="audit.jsonl")
@gate(risk="critical")
def refund(customer_id: str, amount_cents: int):
... # nothing runs unless policy + consent approve; every decision is hash-chainedWhy
Gate (before): declarative policy (
allow/warn/confirm/deny), heuristic risk scoring, consent ladder (once / session / always), kill switch, rate limiter.Audit (during → after): append-only JSONL with a SHA-256 chain per record. Editing or deleting history breaks verification:
dvarapala verify audit.jsonl.Causal fields from day one: every record carries
run_id,step,parent_step,context_refs,alternatives_considered,state_delta— so "why did the agent do that?" attribution can be built on top without re-instrumenting anything.
Related MCP server: Agent Audit Trail MCP Server
30-second tour
gate = dvarapala.Gate(
policy={
"rules": [
{"id": "reads-free", "match": {"tool": "read_*"}, "effect": "allow"},
{"id": "refunds-human","match": {"tool": "refund"}, "effect": "confirm"},
{"id": "no-drop", "match": {"keywords": ["drop table"]}, "effect": "deny"},
]
},
audit=".dvara/audit.jsonl",
)Annotate where a call happens in your agent loop:
with dvarapala.step(run_id="r1", step_no=17,
alternatives_considered=["cancel_order"]):
refund("c1", 5000) # audited with step=17, alternatives recordedDenied calls raise dvarapala.Denied (a PermissionError) — catch it and let
the model retry something else.
Surfaces
Surface | Import |
Decorator for any sync/async function |
|
ASGI middleware for HTTP tool endpoints |
|
MCP server tool handlers |
|
MCP stdio proxy (any server, no code changes) |
|
CLI |
|
Design rules
Stdlib-only core. No dependencies; YAML policies are an optional extra.
Deny-safe defaults. Non-interactive sessions deny instead of prompting; unknown shell commands assess as MEDIUM; destructive tokens as CRITICAL.
The log is evidence. Chain verification is one command, no server needed.
Production hardening (v0.2)
Threat | Defense |
Trailing entries deleted | Chain anchoring — every append updates a |
Log rewritten mid-history | SHA-256 chain breaks; the verifier names the first bad entry. |
Crash mid-write / torn lines | Unreadable lines fail verification instead of being skipped. |
Two processes, one log | Advisory file locking (fcntl/msvcrt) + tip re-scan inside the lock — chains interleave correctly across processes. |
Secrets in the evidence file |
|
Runaway tools | Per-tool budgets: |
Consent amnesia after restart |
|
Policy edits require restarts | File policies hot-reload on mtime change; a broken edit keeps the last good rules running. |
dvarapala verify audit.jsonl # chain integrity
dvarapala verify --strict audit.jsonl # chain + anchor present and matching
dvarapala anchor audit.jsonl # re-anchor after intentional pruningMCP proxy: gate any server, zero code changes
dvarapala proxy --config policy.json --audit audit.jsonl -- node my-mcp-server.jsPoint any MCP client at the proxy instead of the server:
every
tools/callruns the full pipeline (policy → risk → consent → audit); blocked calls get JSON-RPC-32001naming the rule that denied them;policy-denied tools are stripped from
tools/list, so the agent never sees what it cannot call (--no-hide-deniedto disable);everything else passes through untouched.
EU AI Act / compliance mapping
Audit records are shaped for the traceability questions regulators ask (EU AI Act Art. 12 record-keeping & integrity, Art. 14 oversight evidence, ISO/IEC 42001 monitoring, SOC 2 CC7.2–CC7.3):
Requirement | Where dvarapala provides it |
Automatic event logging (Art. 12) | Every gate decision + execution outcome appended as structured JSONL |
Integrity / tamper evidence (Art. 12) | SHA-256 chain + anchored head; one-command verification, CI-friendly exit codes |
Traceability of decisions | Causal fields: |
Human-oversight evidence (Art. 14) | Confirm-gated actions record consent level + reason on every approval |
Data minimization | Redaction at the audit boundary; argument snapshots truncated |
Status
v0.2.0 (beta). Gate + anchored audit core are stable; the failure-attribution
layer on top of the causal fields (why did step 24 fail because of step 6?)
is on the roadmap. MIT licensed. Contributions welcome.
Install
pip install dvarapala # core, stdlib-only
pip install dvarapala[yaml] # + YAML policy support
pip install dvarapala[dev] # + pytest/ruffLicense
MIT — see LICENSE.
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
Runtime permission, approval, and audit layer for AI agent tool execution.
See, price, and control every tool call your AI agents make: policy checks, cost, and audit tools.
Pre-execution governance for AI agents. Deterministic PASS/FAIL/REVIEW verdicts, replayable proof.
Zero-trust gateway for AI agents: score tool calls, verify agent cards, enforce policy, audit.
Related MCP Servers
- AlicenseAqualityAmaintenanceLocal zero-trust permission gateway for AI agents. Enforces policy-based tool authorization, human approvals, scoped permissions, and cryptographically verifiable audit logs.45Apache 2.0
- AlicenseNot gradedqualityFmaintenanceProvides tamper-proof audit logging for AI agents using SHA-256 hash chains, integrity verification, and compliance reporting for the EU AI Act.1MIT
- AlicenseBqualityAmaintenanceA governance proxy for AI tools — every MCP/agent tool call is policy-gated, secret-redacted, and written to a hash-chained, offline-verifiable audit trail.13MIT
- AlicenseNot gradedqualityCmaintenanceGates agent tool execution with human approval, audit trails, and replay-resistant permits, enabling safe use of tools in agent loops.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/demolished-lab/dvarapala'
If you have feedback or need assistance with the MCP directory API, please join our Discord server