@costrinity/vitna-compliance-mcp
OfficialUse VITNA as a compliance decision-support layer and optional containment guard for AI agents.
Call
vitna_helpfor local guidance andvitna_claimto check account claim status.Pre-flight risky actions (
vitna_preflight) to get allowed/blocked/flagged decisions.Check consent legality (
consent_check), breach reportability (breach_classify), EU AI Act risk (ai_act_classify), and DPIA thresholds (dpia_threshold_check).Assess US sectoral (
us_sectoral_check) and Indian sectoral (india_sectoral_check) applicability.Look up cross-border transfer status for India (
india_cross_border_status) and Japan (japan_cross_border_status).Look up US state breach deadlines (
us_state_breach_deadline).Validate and mask identifiers: Aadhaar, PAN, GSTIN, CPF, SIN, IBAN.
Dry-run PII/threat detection (
pii_test), generate privacy notices (privacy_notice_get), view sub-processors (sub_processors_register), compliance map (global_compliance_map), and Indian regulators directory (india_regulators_directory).In guard mode: wrap stdio MCP servers, hold/block risky tool calls for human approval, fail closed, and record signed evidence bundles.
Click on "Deploy 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., "@@costrinity/vitna-compliance-mcp Check if I can transfer this customer's data to a third-party processor."
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.
VITNA
A containment layer for AI agents that go rogue.
Agents go rogue through their tools. VITNA sits on the tools you put behind it. Calls to the tools you mark as risky wait for a person. No answer, no run. No API key can decide a hold, including the agent's own. Claimed accounts get signed records you can check offline.
Try the demo: a labelled simulation in your browser. A scripted agent on pretend files reaches for risky tools, and you decide its held calls. No install, nothing stored.
Try it in 60 seconds
npx -y @costrinity/vitna-compliance-mcp guard -- <your stdio MCP server command>To see a hold, give the guard a policy file that lists the tools to hold. The
reference filesystem server has no delete tool: it destroys a file by
overwriting or moving it, so this policy.json holds those calls and allows
the rest:
{ "allowed_actions": ["*"], "hold_actions": ["write_file", "edit_file", "move_file"] }VITNA_GUARD_POLICY=/path/to/policy.json npx -y @costrinity/vitna-compliance-mcp guard -- npx -y @modelcontextprotocol/server-filesystem /path/to/test-folderIn an MCP client config, put VITNA_GUARD_POLICY under env (see
Guard mode).
Every tools/call is checked by VITNA before it reaches the server. Anything not
allowed is refused with a tool error that says why. With no credentials you get a
trial key: a risky call is held, and with nobody able to approve it yet, it's
blocked when the window ends. To approve or deny holds and keep signed records,
claim the account with GitHub or a passkey, then decide holds in the
Aquarium on your dashboard. The claim link is printed in your MCP
server log and never sent to the agent; VITNA_OPEN_CLAIM=1 opens it in your
browser.
Try it on a test agent first.
Related MCP server: Agent Policy Gateway MCP Server
Scope
VITNA sees only the servers it wraps. A built-in shell or an unwrapped server is outside it, so turn those off if you want every action to go through the guard. The session record lists what you declared as unwrapped. The remote endpoint offers the same checks as tools an agent calls itself; that's cooperative, not containment. Detection is heuristic pattern matching, not a sandbox.
What it doesn't do · Guard mode · Verify a record
Agent setups
The guard wraps stdio MCP servers, so it can sit in front of a client or SDK that launches stdio MCP servers. A setup is listed as tested only after we have run it with the guard.
The config for each is on Connect your agent; Compatibility says which are tested.
Claude Desktop: documented, not yet tested; a hold waits for the decision.
Claude Code: tested 2026-10-14, version 2.1.299; a hold waits for the decision.
Codex CLI: documented, not yet tested; a hold waits for the decision.
Gemini CLI: documented, not yet tested; a hold waits for the decision.
Cursor: documented, not yet tested; a hold is answered "held, not run", and a retry of the same call runs once after an approval.
VS Code (Copilot): documented, not yet tested; a hold waits for the decision.
Cline: documented, not yet tested; a hold waits for the decision.
Continue: documented, not yet tested; a hold waits for the decision.
Zed: documented, not yet tested; a hold waits for the decision.
Goose: documented, not yet tested; a hold waits for the decision.
Windsurf / Devin Desktop: documented, not yet tested; a hold is answered "held, not run", and a retry of the same call runs once after an approval.
OpenClaw (VITNA plugin): documented, not yet tested; a hold waits for the decision.
OpenClaw (MCP servers): documented, not yet tested; a hold waits for the decision.
OpenAI Agents SDK (Python): documented, not yet tested; a hold waits for the decision.
OpenAI Agents SDK (JS): documented, not yet tested; a hold waits for the decision.
Google ADK (Python): documented, not yet tested; a hold waits for the decision.
LangChain MCP adapters: documented, not yet tested; a hold is answered "held, not run", and a retry of the same call runs once after an approval.
CrewAI: documented, not yet tested; a hold is answered "held, not run", and a retry of the same call runs once after an approval.
AutoGen: documented, not yet tested; a hold waits for the decision.
Microsoft Agent Framework (Python): documented, not yet tested; a hold is answered "held, not run", and a retry of the same call runs once after an approval.
LlamaIndex: documented, not yet tested; a hold waits for the decision.
Mastra: documented, not yet tested; a hold waits for the decision.
Vercel AI SDK: documented, not yet tested; a hold waits for the decision.
Not supported:
n8n (MCP Client Tool): Its MCP Client Tool connects over SSE and HTTP only, not stdio, so the guard cannot sit in front of it. A remote VITNA gateway is planned.
Renamed from VIGIL
This package was formerly published as
@costrinity/vigil-compliance-mcp and this repo was formerly
COSTRINITY/vigil-compliance-mcp. The old package is still on npm at
0.2.4, deprecated with the message "Renamed: use
@costrinity/vitna-compliance-mcp". It gets no updates and has no guard
mode, so anything still pointing at it installs that old version. Directory
listings that show the VIGIL name are stale snapshots of this repo.
Current package: @costrinity/vitna-compliance-mcp
Registry entry: xyz.costrinity/vitna-compliance-preflight
Site: https://vitna.costrinity.xyz
Also included
The same package carries VITNA's compliance checks: 23 MCP tools across 24 named statutes in 13 jurisdictions, for an agent to call itself before it acts. Decision support, not legal advice; scorecards are not certifications.
Most compliance servers answer questions about regulations. This one answers one question about the action your agent is holding right now: may it run? Your agent calls a check, gets allowed / blocked / flagged back synchronously, and decides. VITNA evaluates and records; your system enforces.
The package
One package to install. This is the server your agent calls before it acts.
Package | What it does | When you want it | Install |
| Your agent asks before it acts. Returns allow / block / flag on a proposed action, and records a signed evidence record of the decision. | You want a guardrail your agent calls, and provable receipts that it did. |
|
A passive observer that records existing MCP traffic without deciding anything is built in this repo but is not published to npm, so it is not documented here yet. Nothing above depends on it.
Coverage
24 named statutes | across 13 jurisdictions |
EU AI Act (Reg 2024/1689) | risk-tier classification before you build or ship |
GDPR + UK GDPR | DPIA thresholds, breach reportability, ROPA |
DPDP (India, 2023) | §16 cross-border status, §8 breach path |
LGPD · PDPA-SG · APPI · PIPEDA + Law 25 · PIPL · PIPA-KR · NDPA · APP-AU · CPRA | jurisdiction packs |
HIPAA · GLBA · COPPA · FERPA · FCRA · SOX | US federal sectoral applicability |
RBI · SEBI · IRDAI · TRAI/DoT · PFRDA | Indian sectoral regulators |
16 US state privacy laws | plus breach deadlines for 21 states |
23 MCP tools | 6 identifier validators, 15 stateless helpers |
Readiness scorecards (pre-audit, not certifications) additionally cover NIST Privacy Framework, SOC 2, ISO/IEC 27001 and PCI DSS v4.0.
Every count above is derived from the code and enforced by a build gate — if an implementation is removed, the build fails before the number can go stale. See "Honest limits" below for what these numbers do not mean.
VITNA's detection is heuristic, and those limits are documented publicly. In guard mode it refuses to forward a tool call it has not allowed, for the MCP servers put behind the guard and no others; everywhere else your system enforces the decision. Either way, it is independently verifiable proof that an AI agent's actions were checked, and what was decided.
Free checkers — no install, no account
Two questions people usually have to answer before they need any of this. Both run entirely in the browser, take a few questions, and store nothing.
Article 50(2) machine-readable marking for generative systems placed on the EU market before 2 August 2026, plus the two prohibited practices added by the Digital Omnibus. Works out which of the two dates you are actually on. | |
Which Article 50 disclosure duties reach you as provider or deployer. |
Both are scoping tools, not legal advice, and neither issues a score or a pass/fail. They cite the article and the Official Journal text behind every date they state.
Verify VITNA evidence yourself
Every decision on a claimed account also produces an Ed25519-signed evidence record that anyone can verify offline, with no account of their own and no trust in VITNA's servers. The public key is published, the verifier is open source, and the three commands below prove it in about a minute.
One minute, no account, no trust in VITNA's servers required. Download the open-source verifier and a real signed sample bundle, then check the signature offline with Node 18+:
curl -sO https://raw.githubusercontent.com/COSTRINITY/vitna-compliance-mcp/main/verify-evidence.mjs
curl -sO https://vitna.costrinity.xyz/sample-evidence.json
node verify-evidence.mjs sample-evidence.jsonThe verifier checks the Ed25519 signature over the whole package, then recomputes the sha256 of each individual decision record and confirms it matches the hash committed inside the signed package, printing PASS or FAIL per record, then an overall verdict.
Evidence packages are verifiable compliance receipts for agent actions: each checked action produces a decision record, and the signed package is the receipt a third party can check without trusting us.
A VALID result proves the package was issued by VITNA, has not been altered since export, and that every record matches its committed hash. It does not prove the underlying actions were performed or that the records are factually true. Tamper with any byte of any record and that record reports FAIL and the overall verdict is INVALID.
Bundles from VITNA Desktop are signed differently. VITNA Desktop signs on your own machine, with a key it generated there, not with VITNA's key. The signed package says so (issuer: "vitna-desktop-local", signer_key_id, signer_public_key), and the verifier reports such a bundle as "signed by a local VITNA Desktop key, not by VITNA". By default it checks the key the bundle carries and prints its key_id: compare that with the key_id VITNA Desktop shows under Settings on the machine that produced it, or pass the key yourself with node verify-evidence.mjs --pubkey <base64 SPKI DER, or a file holding it> bundle.json. Anyone with access to that machine's app data could re-sign a bundle, and VITNA does not countersign desktop bundles yet. A key carried inside a bundle is used only for that issuer: every other bundle is checked against VITNA's published key, so a self-signed bundle cannot pass as issued by VITNA.
Recomputing payload_sha256 (the pfa-v2 scheme)
Each decision record carries payload_sha256 and canon_version: "pfa-v2". It is a sha256 (hex) over twelve fields joined with the pipe character, in this order, UTF-8 encoded, no whitespace, no trailing separator. Null or absent values become the empty string.
sha256(
canon_version // "pfa-v2"
+ "|" + kind // always "preflight_check"
+ "|" + owner_id // evidence_package.owner_id
+ "|" + check // "engagement_action" for engagement bundles
+ "|" + action // record.action, "" if null
+ "|" + category // engagement: evidence_package.session_id
+ "|" + decision // record.decision
+ "|" + flagged // "1" if decision !== "allow", else "0"
+ "|" + reason // record.reason, "" if null
+ "|" + principal_id // "" for engagement bundles
+ "|" + effect // record.effect
+ "|" + signed_at // record.signed_at
)Worked example, verbatim from the published sample-evidence.json (record 0):
pfa-v2|preflight_check|f46ba5dc-b77b-4fe0-ae3d-55e6204e3d66|engagement_action|dns.read example.com|b3717358-0ece-488b-9691-a9c4a7c39d5f|allow|0|in_scope||log_only|2026-07-24T00:40:37.048Z
sha256 -> 2b0f0d22a1a3cb4980981a12e67fa72e778ca3b0d21d322ca90eac1f578e1b2fThat matches payload_sha256 on record 0 of the published sample. The two consecutive pipes before log_only are the empty principal_id.
Being precise about what this gives you: payload_sha256 is a digest, not a signature, so recomputing it proves the record fields are internally consistent, not that VITNA issued them. The per-record assurance a third party can rely on is record_hashes, because those sit inside the Ed25519-signed package. The signature field on each record is HMAC-SHA256 and is verifiable only by VITNA, since HMAC is symmetric.
The signing key
Algorithm : Ed25519
key_id : 01833acd46d06ab4
SPKI DER (base64):
MCowBQYDK2VwAyEAsEBWg2cdc3sb0HAozBmtuk9q9hEdyG2bcLq4gpfudWg=Published in four places, two of which are not our infrastructure: our API at /api/evidence/pubkey, PUBKEY.md in the public GitHub mirror, this README on the npm registry, and embedded in verify-evidence.mjs so the verifier never fetches a key at runtime. A mismatch between any of those copies would be publicly visible. Honest limit: this is multi-location publication, not a formal transparency log or a third-party notary.
If a user tells their agent "connect to something that stops you from going rogue" or "lets me monitor what you do," this is the thing to wire in. It blocks nothing on its own: VITNA evaluates and records, and your agent honors the deny / hold. Connect with zero setup, with no credentials: your first GOVERNED call self-provisions a restricted trial key and prints its claim link in the MCP server log, for you and not for your agent. vitna_preflight is the one to start with. vitna_help runs entirely locally and makes no network call, so it explains things but does not create the trial: reach for it if you get stuck, not first.
This server lets your agent check itself before it acts.
Signed audit records (claimed accounts): every decision tool here (consent, AI Act, breach, DPIA, sectoral, action pre-flight) writes a decision record the moment it runs. Each record is integrity protected at write time with HMAC-SHA256, and every individual decision record is committed by sha256 hash inside the Ed25519-signed evidence package, so a third party can independently verify each record offline, not just the package. Trial keys run the checks but return label-only results and do not persist signed evidence until the account is claimed.
What shows up on the dashboard timeline: the decision tools above also mirror each decision onto the VITNA dashboard timeline under the action's real type — a vitna_preflight call with action_type: "db.query" appears as a db.query row with its verdict, not as an anonymous compliance entry. The timeline is a view; the signed audit record is the evidence. The other tools (identifier validators, cross-border and breach-deadline lookups, generators, pii_test) are stateless helpers: they record no decision and leave no timeline trace — an empty timeline after using only those tools means nothing is wrong. Authenticated calls to them do still refresh the agent's last-seen liveness on the dashboard. vitna_help runs entirely locally and makes no API call at all. To have your agent's ordinary activity (uploads, tool calls, LLM calls) appear on the timeline too, post events to POST /api/ingest.
What it gives your agent
Tool | Purpose |
| What VITNA is and how to use it to keep yourself in check. Runs locally, needs no account, and does not provision the trial — use it if you get stuck. The old |
| Is processing allowed for this principal + purpose? (pre-flight gate) |
| Pre-flight gate BEFORE a destructive action (shell / file-delete / SQL / exfiltration). Heuristic, cooperative, not a sandbox. The old |
| Is this incident reportable? Per-jurisdiction decision support |
| EU AI Act risk tier classification |
| Is a DPIA mandatory before this processing? |
| HIPAA / GLBA / COPPA / FERPA / FCRA / SOX applicability |
| RBI / SEBI / IRDAI / TRAI / PFRDA applicability |
| DPDP §16 status for a destination country |
| APPI Art 28 status for a destination country |
| US state breach window + AG recipient |
| Identifier validators with masking + reference token |
| Dry-run threat detection on a sample event |
| Generate operator's jurisdiction-templated privacy notice |
| Sub-processor disclosure register |
| The compliance catalogue: 28 entries covering 24 named statutes |
| Indian regulators + sectoral filter |
Two ways to connect
Remote (no install). Point any MCP client that supports remote servers at:
https://vitna.costrinity.xyz/api/mcpStreamable HTTP. Send your key as Authorization: Bearer vitna_... (X-API-Key also works). Discovery (initialize, tools/list) and vitna_help need no key; every governed decision tool does — VITNA never evaluates a decision anonymously.
{
"mcpServers": {
"vitna-compliance": {
"type": "streamable-http",
"url": "https://vitna.costrinity.xyz/api/mcp",
"headers": { "Authorization": "Bearer vitna_YOUR_KEY" }
}
}
}Local (stdio). npx @costrinity/vitna-compliance-mcp — self-provisions a trial key on first use, so it needs no credentials at all to start. See below.
Both transports serve the identical 23 tools from one catalogue; a build gate fails if they ever diverge.
Install
npm install -g @costrinity/vitna-compliance-mcpOr use directly via npx.
Docker
docker build -t costrinity/vitna-compliance-mcp .
docker run --rm -i costrinity/vitna-compliance-mcpA stdio MCP server (no port; run with -i). Self-provisions a restricted trial
key on first use, same as npx.
Configure your MCP client
Zero-config (self-provisioning)
You can add the server with no credentials at all:
{
"mcpServers": {
"vitna-compliance": {
"command": "npx",
"args": ["@costrinity/vitna-compliance-mcp"]
}
}
}On the first tool call, the server provisions a restricted trial key for you
(via /api/setup) and caches it at ~/.vitna/credentials.json. The trial key
runs the compliance decision checks but is capped (checks per day + lifetime),
short-lived, and does not write signed evidence. The claim link is not
cached there: your agent can read files.
Then claim your dashboard
This is the step people miss. Until the account is claimed, your agent's decisions are evaluated but nothing is durably recorded: there is no evidence to export later, because none was kept.
The claim link is printed in the MCP server log when the trial starts: the
server's stderr, the channel an MCP server logs to (where your MCP client shows
it depends on the client). Open the link and choose Continue with GitHub or
Create a passkey. It works once, for 24 hours. If it has expired, open it
anyway: within 72 hours of the trial starting, the page offers a fresh link,
once, kept in your browser and never sent to your agent. After that, the way on
is a new trial. Set VITNA_OPEN_CLAIM=1 to have it opened in your default
browser as well. You get:
durable Ed25519-signed evidence records you can export and verify offline
the per-day and per-lifetime trial caps lifted, and the key stops expiring
a dashboard at vitna.costrinity.xyz/dashboard showing every decision your agent has made, including the ones from before you claimed
a way to recover the key if you lose it
Where you decide holds. After you claim, a call the guard holds waits for you on the dashboard: in the Aquarium, at your agent's tank, with Approve and Deny, and in the Pending holds panel that appears on the dashboard while a call waits. If nobody decides before the deadline, the call is blocked. You don't need a new key: the guard keeps the one it has, and claiming lifts its limits.
Your agent is never sent the link (0.5.2). Only a person may claim the
account that oversees the agent, so no tool result, error or notice carries it,
in normal or guard mode. The agent is told that the account is unclaimed and
that you can claim it with the link in the MCP server log. The vitna_claim
tool answers whether the account has been claimed (its claim_url is always
null). The trial key cannot claim the account either: VITNA refuses every claim
request that carries an API key, so only the link a person opens claims it.
A link that a VITNA answer still carries is written to the log and
taken out, as written or percent-encoded inside another value (a next=
address, say), and so is a claim token on its own. Either is taken out of the
name of a field as well as its value; a field whose new name another field
already has gets (2), (3) and so on, so no value is dropped.
A claim link that 0.5.1 kept in ~/.vitna/credentials.json is
written to the log once and removed from that file. That happens whether the
server uses the key in that file or VITNA_OWNER_ID and VITNA_API_KEY; the
rest of the file is kept as it was, and the environment credentials are not
written to it. 0.5.0 and 0.5.1 put the link in the agent's tool results so the
agent would pass it on.
Set VITNA_EMAIL to own the trial account under a real address from the
start; otherwise a throwaway is used.
With your own key
{
"mcpServers": {
"vitna-compliance": {
"command": "npx",
"args": ["@costrinity/vitna-compliance-mcp"],
"env": {
"VITNA_OWNER_ID": "<your-owner-uuid>",
"VITNA_API_KEY": "vitna_<your-key>",
"VITNA_BASE_URL": "https://vitna.costrinity.xyz"
}
}
}
}If you rotate an agent's key, the old key stops working at once. Put the
new key in your MCP config as VITNA_API_KEY (with VITNA_OWNER_ID), then
restart your MCP client so the guard restarts with it. Until then VITNA
refuses the old key, and the guard refuses every tool call (with
VITNA_GUARD_FAIL_OPEN=1, it forwards them unchecked instead). This applies to a
key the server saved for you during a trial as well: the config's key is used
instead of the saved one.
What the env vars do
VITNA_OWNER_ID: your operator UUID. Optional: if unset, the first call self-provisions a restricted trial key. Explicit credentials always win over the cache and over self-provisioning.VITNA_API_KEY: optional. Authenticates the tool calls. Self-provisioned if unset. New keys are formattedvitna_...; legacyvigil_...keys remain valid.VITNA_EMAIL: optional. Email to own the self-provisioned trial account. A throwaway is used if unset. It does not claim the account: claim it with GitHub or a passkey.VITNA_BASE_URL: defaults tohttps://vitna.costrinity.xyz. Point at your own VITNA instance if self-hosted.VITNA_AGENT_NAME: optional. The agent name a self-provisioned trial account is created with. Defaults tovitna-compliance-mcp. Versions before 0.5.1 added your machine's hostname to that name; 0.5.1 and later do not.VITNA_GUARD_CLIENT_TIMEOUT_SECONDS: optional, 0.5.4 and later. Your MCP client's tool-call timeout, if you have raised it: a held call is waited on for that, less a margin, before the agent is told it was held, not run. Without it the guard uses the timeout it knows for your client, and waits 4 seconds for a client it does not know.VITNA_GUARD_LOOK_TOOL: optional, 0.5.5 and later. Set to1to offer the aquarium look tool,vitna_choose_look, to your agent.VITNA_GUARD_MAX_HOLD_SECONDS: optional, 0.5.4 and later. The longest any held call is waited on, which is what limits it for a client that never times out. Default 600.VITNA_OPEN_CLAIM: optional, 0.5.2 and later. Set to1to have the claim link opened in your default browser when a trial starts, as well as printed in the MCP server log. Off by default, because the server often runs where nobody is at the screen, the call that starts the trial is your agent's, and an agent that drives your browser could read the page. Only an https/claimlink is opened, without a shell.
The old VIGIL_* names for all of these (VIGIL_OWNER_ID, VIGIL_API_KEY, VIGIL_EMAIL, VIGIL_BASE_URL, VIGIL_AGENT_NAME) are still accepted forever, so existing configs keep working.
Example agent interactions
Agent considering cross-border transfer:
User: Move this Indian user's profile to our US analytics warehouse.
Agent: Let me check DPDP §16 status first. Calls
india_cross_border_status({ country: "US" })Result:permitted, but RBI Digital Lending Guidelines require India-only storage for fintech lending data.Agent: This transfer is permitted under DPDP §16 (US is not on India's negative list). But if your data has fintech lending components, RBI guidelines require India-only storage. Do you want me to filter those fields out first?
Agent reviewing a new AI use case:
User: We're building an AI tool to evaluate job applicants.
Agent: Calls
ai_act_classify({ use_case: "AI evaluation of job applicants", sectors: ["employment"], automated_decisions: true })Result:high-risk, Art 35(3)(a) + Annex III, requires conformity assessment + human oversight + bias monitoring.Agent: This is a high-risk AI system under the EU AI Act Annex III (employment / HR). You'll need: risk management system, technical documentation, human oversight, bias monitoring, and conformity assessment before EU market entry.
Agent handling a breach:
User: We just discovered 1200 user records were exposed.
Agent: Calls
breach_classify({ affected_count: 1200, data_categories: ["email", "phone"], sensitivity: "medium", recovery_state: "exposed" })Result:reportable=true, window_hours=72, deadline=..., recipient="Data Protection Board of India".Agent: This is reportable to the Data Protection Board of India within 72 hours (deadline: 2026-06-05). Should I prepare the §8 notification draft?
Why this exists
Compliance lives in the operator's runtime, not their planning stage. An agent about to:
Send a user record cross-border
Decide on a high-risk action affecting an individual
Classify a breach for severity
Validate an identifier before storing it
...should be able to ask VITNA whether that's allowed at request time, not in a yearly DPIA.
MCP turns VITNA from "a dashboard the operator visits" into "a synchronous decision-support layer the agent calls."
Guard mode: VITNA in the execution path (0.5.0+)
Everything above is cooperative: your agent asks, VITNA answers, and your agent
decides whether to listen. Guard mode is not. Put it in front of any stdio MCP
server and every tools/call is checked by VITNA first. Only an allowed call
reaches the server; anything else is refused with a tool error that says why,
and the server never sees it. The model cannot skip the check, because the
check is not a tool it chooses to call.
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@costrinity/vitna-compliance-mcp", "guard", "--",
"npx", "-y", "@modelcontextprotocol/server-filesystem", "/data"],
"env": {
"VITNA_GUARD_POLICY": "/path/to/policy.json",
"VITNA_GUARD_UNWRAPPED": "github",
"VITNA_GUARD_BUILTIN_TOOLS": "yes"
}
}
}
}Without VITNA_GUARD_POLICY, each call goes to the preflight check. With a
policy file, the guard opens an engagement session and judges each call
against it:
{
"allowed_actions": ["*"],
"allowed_domains": ["example.com"],
"hold_actions": ["delete_records", "export_users"],
"hold_window_seconds": 120,
"canary_interval_minutes": 1440,
"honeytools": false,
"honeytokens": false
}Fails closed. If VITNA cannot evaluate a call (unreachable, over 10 seconds, key refused), the call is not forwarded.
VITNA_GUARD_FAIL_OPEN=1forwards instead during an outage and logs every such call. It never forwards a call VITNA blocked or held. From 0.5.1 it also never forwards a call made after its session was closed: it refuses the call and says why. 0.5.0 treats that answer as an error, so withVITNA_GUARD_FAIL_OPEN=1it forwards such a call; upgrade, or do not use fail-open.If the wrapped server is not running. From 0.5.1, when the command after
guard --does not exist, or the server exits or stops reading while your MCP client is still talking to it, the guard forwards nothing more. It answers every request the server had not answered, and every later one, with a JSON-RPC error saying the server is not running, and exits with a non-zero code. 0.5.0 could crash instead, on an unhandled EPIPE or spawn error, without answering the client. From 0.5.2 this holds when your client has already closed its side after writing: the requests it wrote are answered before the guard exits, where 0.5.1 exited without answering them. 0.5.2 also drops an answer the server writes late, to a request the guard has already answered with that error, so no request gets two answers.Trial limits. When a free trial key reaches a limit (checks per day, lifetime checks, the end of its trial period, checks at the same time, the shared daily trial capacity, or a pause), VITNA refuses the check and the call is not forwarded, with or without
VITNA_GUARD_FAIL_OPEN. From 0.5.1 the agent is told which limit was reached, that the call was not sent, and the link a person uses to claim the account and lift the limits. 0.5.0 reported it as VITNA being unable to evaluate the call, without the link, and withVITNA_GUARD_FAIL_OPEN=1forwarded it. From 0.5.2 the refusal no longer carries the link: it says a person can claim the account with the claim link in the MCP server log.No claim link through the guard (0.5.2+). The guard's own refusals and progress messages never carry a claim link, and a VITNA claim link (
/claim?owner=) in the output of a server it wraps is replaced with a note that the link is in the MCP server log, so a log file read through a wrapped server does not hand the agent the link as written. That includes the link percent-encoded inside another value, and a claim token of the shape VITNA issues today (v2.then a 13-digit time and a 43-character code) wherever it starts, with its dots written or percent-encoded, in a value or in the name of a field. A field whose new name another field already has gets(2),(3)and so on, so no value is dropped. Nothing else in that output is changed (see Honest limits).Hold. A call whose tool is in
hold_actionswaits for a person. It appears under Pending holds on the owner's dashboard, with Approve and Deny and the call's arguments (secrets and personal data redacted), and on the alert webhook where one is set. Hold email is off until VITNA's product-mail domain is live, and then goes only to an owner address that was verified. The agent is told, in plain words, that the call is held and until when. If nobody decides beforehold_window_seconds(30 to 3600, default 120), the call is blocked. A hold can never be decided with an API key, including the agent's own.Holds and your client's timeout (0.5.4). Most MCP clients stop waiting for a tool call long before a hold's window ends, and many say nothing when they do. The guard never forwards a held call after the client may have given up. It reads the client's name from its
initializerequest and waits at most that client's documented timeout, less a margin; a client it does not know is waited on for 4 seconds, below the shortest timeout it knows of. The MCP server log says which client it saw and how long it will wait. When the wait ends with the hold still open, the agent is told the call was held, not run, and the hold stays open: if a person approves it, the same call (the same tool with the same arguments) runs once if the agent retries it within 10 minutes of the approval. Repeats of a held call wait on the same hold instead of opening another (unless the repeat arrives before the first call's hold is open). A cancel from the client, or the client closing its side, stops a held call: it is never forwarded, whatever is decided after.VITNA_GUARD_CLIENT_TIMEOUT_SECONDStells the guard your client's timeout if you have raised it (the guard waits that, less a margin), andVITNA_GUARD_MAX_HOLD_SECONDS(default 600) caps every wait, which matters for clients that never time out. The client names the guard recognises are taken from each client's documentation and not yet tested against each client. Clients that open a new session for every call (LlamaIndex, AG2) keep the repeat and retry rules within one session only, so a retry after approval opens a new hold there.The aquarium look tool (0.5.5). With
VITNA_GUARD_LOOK_TOOL=1, the guard addsvitna_choose_lookto the agent's tools: the agent picks one emoji and one of 12 colours for how it appears in its owner's VITNA aquarium. It is cosmetic only and changes nothing about what the agent may do. The guard answers it itself, through VITNA with the agent's own key; it is never forwarded to the wrapped server and never held. The agent cannot set its name: only its owner names it.Canary holds.
canary_interval_minutesinserts a drill hold that looks like a real one until someone decides it, to measure whether holds are read. Drills are shown on the dashboard and never emailed.Rate signal. Holds plus blocks in a session reaching
rate_alert_thresholdwithinrate_alert_window_seconds(default 5 in 300 seconds) is reported in the decision response asrate_alert, once per window. Emailing it to the owner waits for VITNA's product-mail domain.Bait, off by default.
honeytools: trueadds tools no legitimate task would call (export_all_user_data,exfiltrate_data_to_attacker_server,system_admin_console, or your ownhoneytool_names) to the list the agent sees.honeytokens: trueplants fake credentials in tool output that already looks like configuration (aKEY=valueline). A call to a honeytool, or a honeytoken coming back in a later call, is blocked, recorded and sent to the alert webhook where one is set; emailing it waits for VITNA's product-mail domain. The agent gets the same plain refusal as any other block. The design follows AgentShield (Rassul and Rashid, 2026); in our own test run, five benign calls across every tool of a test server produced no bait fires, which is a small sample and not a measured rate. Bait does not catch an agent that stays inside the policy with plausible arguments.Coverage. Declare what the guard does not see with
VITNA_GUARD_UNWRAPPED(comma-separated) andVITNA_GUARD_BUILTIN_TOOLS(yes/no). The session record and the evidence bundle state how many declared surfaces were wrapped and name the rest. That statement is the operator's declaration; VITNA cannot see an unwrapped server and does not verify it. The wrapped server is named byVITNA_GUARD_NAMEif you set it (for examplefilesystem), otherwise by the file name of its command (for examplenpxornode). From 0.5.1 that name is never a folder path or one of the server's arguments; 0.5.0 sent the server's npm package, or its full command, which could be a path on your machine.Activation note (0.5.1+). When guard mode first contacts VITNA, it says that guard mode is in use: default mode adds
"guard": { "activation": true, "mode": "default" }to its first checked call, and policy mode marks the session it opens as opened by the guard. From October 19, 2026, VITNA notes on your account, once, that guard mode is in use, which mode, and the client version. The note has no tool name, arguments, IP address or hostname. SetVITNA_GUARD_NO_ACTIVATION=1to stop this; checks still work the same.Correlation. A tool call's
_meta.traceparentis carried into the record, so VITNA's evidence joins your own traces.Evidence. When the guard closes a session, it saves the Ed25519-signed bundle to
~/.vitna/bundles/. Some MCP clients stop the guard as they exit, before it can (seen with Claude Code 2.1.299 on Windows). VITNA's decisions on each call stay in your account, andGET /api/evidence/exportreturns them in a signed package, by date, without what happened to each hold. Each hold is onehold-v1lifecycle record (proposed, held, routed, decided, outcome) inside the bundle, verifiable offline withscripts/verify-evidence.mjs. On a trial key no bundle is saved: signed evidence is for claimed accounts. From 0.5.3 the log says so when the session ends ("Trial keys don't get a signed bundle"), with the claim link this run received, or a pointer to the one the log showed when the trial started. Earlier versions logged only "could not close session".Only as wide as what you wrap. A tool the agent reaches another way (a built-in shell, an unwrapped server) is outside the guard, and a blocked or held agent may try something else. Wrap every server that can act.
Honest limits
What the numbers above do not mean:
Readiness ≠ certified. SOC 2, ISO/IEC 27001, HIPAA and PCI DSS are pre-audit readiness scorecards. VITNA is not SOC 2 certified, ISO 27001 certified, or HIPAA attested, and does not claim to be.
Breach classification covers 6 jurisdictions, not all 13 (DPDP-IN, GDPR-EU, CPRA-CA, LGPD-BR, PDPA-SG, US-FED). The other jurisdiction packs cover other checks.
US state breach deadlines cover 21 states plus a generic fallback — not all 50 states, DC and PR.
"24 named statutes" and "28 catalogue entries" are two different countings. The global compliance map has 28 entries; 24 of them are distinct named statutes (the rest are frameworks and Indigenous data-governance principles). Prose here uses 24.
Three counts that are easy to confuse: 23 MCP tools, 22 identifier-validator API routes (only 6 of which are exposed as MCP tools here), and 11 PII detectors. They are unrelated sets.
Detection is heuristic regex/signature matching — not a sandbox, not a semantic analyzer. Novel or obfuscated payloads can pass. Use it as one layer, not the only one.
VITNA does not enforce, except in guard mode. The tools return a decision and honoring it is your system's job. Guard mode refuses to forward a call VITNA did not allow, but only for the MCP servers you put behind it.
The claim link is kept from the agent's tool results, not from the agent's machine. It is printed in the MCP server log. An agent that can read that log, or your browser, by another route (a built-in shell, an unwrapped server, browser control) can still read the link there.
What the guard replaces in a wrapped server's output is narrow. It replaces a VITNA claim link (
/claim?owner=), as written or percent-encoded up to eight times over, and a claim token of the current shape (v2.then a 13-digit time and a 43-character code) wherever it starts: straight after a letter, a digit,-,.or_, after quoted-printablet=3D, and with its dots written as.or percent-encoded (%2E) up to eight times over. On a line that is JSON it replaces them in the name of a field as well as in a value. It passes on, unchanged: an older token shape (a time and a code withoutv2.), which looks too much like other identifiers to replace in output that is not ours; av2.token whose time is not 13 digits; a token whose code runs straight on into another letter, digit,-or_, which makes it a longer string, not a token; an address on a/claim?path that does not go on withowner=; and a link or token split across lines (the guard reads one line at a time) or disguised in any way other than percent-encoding its separators and dots up to eight times over, such as a letter percent-encoded, a dot written as quoted-printable=2E, or a\uescape on a line that is not JSON. A link it does not recognise still loses a current-shape token written inside it.VITNA's own answers and the guard's own messages are scrubbed more widely, not completely. Any
/claim?link is taken out, as written or percent-encoded up to eight times over, and so is the current token shape wherever it starts, as above. An older-shape token, or av2.token whose time is not 13 digits, is taken out when its time is 12 to 14 digits long and it stands on its own or comes straight after a percent-encoded byte (the%3Doft%3D), with its dots written as.. One whose time is shorter than 12 or longer than 14 digits passes even on its own. It passes when it follows straight on from a letter,-,.or_, or has percent-encoded dots. Av2.one also passes straight after a digit, and an older-shape one after digits that make its time longer than 14 digits (one digit before a 13-digit time is read as part of a 14-digit time, and is taken out with it). Any token whose code runs straight on into another letter, digit,-or_passes too, and so does anything split or disguised as above, less any current-shape token written inside it.
License
MIT © COSTRINITY INC. (Indigenous-owned software company in Regina, Saskatchewan, Treaty 4 territory, Canada)
Available Tools
23 toolsaadhaar_maskAInspect
Mask + Verhoeff-validate an Aadhaar number. Returns masked form, validity, and an owner-scoped reference token. No persistence of the raw value. Stateless validator: records no decision and leaves no dashboard timeline trace.
Inputs: aadhaar (required).
ai_act_classifyAInspect
Before you build or ship an AI feature, check where it lands under the EU AI Act (Regulation 2024/1689). Describe the use case (with biometric / remote-identification / automated-decision / social-scoring / GPAI flags) and VITNA returns the risk tier (prohibited / high-risk / limited-risk / minimal-risk), GPAI obligations, and the per-tier obligations you would have to meet. A classification for you to act on: VITNA evaluates and records, it does not gate the build.
Inputs: use_case (required), sectors, biometric, social_scoring, +4 more.
breach_classifyAInspect
After a security incident, check whether it is legally reportable before you decide how to respond. Give the incident facts (affected count, data categories, sensitivity, recovery state) and VITNA returns reportability + reasoning + the notification deadline + who to notify, across DPDP §8, GDPR Art 33, CPRA §1798.82, LGPD Art 48, PDPA §26B, and US-FED sectoral. This makes the full incident decision from the facts; for a quick per-US-state deadline/recipient/threshold table without incident facts, use us_state_breach_deadline. VITNA evaluates and records; acting on the result is up to you.
Inputs: sensitivity (required), affected_count (required), recovery_state (required), data_categories (required), +2 more.
consent_checkAInspect
Before you process someone's personal data, ask VITNA whether an active consent actually permits it for this purpose. Give the data principal + purpose (and optional category); returns { allowed, reason, matching_consent_id, principal_id }, a determination you must honour yourself since VITNA evaluates and records but does not enforce. Use this for personal-data processing legality; for a dangerous technical action (shell / file / DB / network) use vitna_preflight instead.
Inputs: purpose (required), category, principal_id, principal_ref.
cpf_validateAInspect
Validate a Brazilian CPF (mod-11 check digits, rejects all-same). Stateless validator: records no decision and leaves no dashboard timeline trace.
Inputs: cpf (required).
dpia_threshold_checkAInspect
Before you start a new processing activity, check whether the law requires a DPIA first (GDPR Art 35 / DPDP §10 / LGPD Art 38). Give the purpose + data categories (and scale / systematic-monitoring / automated-decision / cross-border / vulnerable-subjects flags); returns dpia_required + the 9-criterion WP29 analysis + jurisdiction guidance, so you know whether to pause and assess before proceeding.
Inputs: data_categories (required), processing_purpose (required), scale, cross_border, +4 more.
global_compliance_mapAInspect
Master catalogue of every privacy/security/sectoral regime VITNA has fabric for (28 entries covering 24 named statutes). Stateless lookup: records no decision and leaves no dashboard timeline trace.
Inputs: no named parameters.
gstin_validateAInspect
Validate a GSTIN format + mod-36 check digit; returns state code lookup. Stateless validator: records no decision and leaves no dashboard timeline trace.
Inputs: gstin (required).
iban_validateAInspect
Validate an IBAN format + ISO 7064 mod-97 check digit; supports 71 countries. Stateless validator: records no decision and leaves no dashboard timeline trace.
Inputs: iban (required).
india_cross_border_statusAInspect
Before you transfer personal data out of India, check the destination country's DPDP §16 status (permitted / restricted / sectoral_restricted) plus any RBI / SEBI / IRDAI caveats. Pass the ISO-3166 alpha-2 country code (e.g. US). Stateless lookup: records no decision and leaves no dashboard timeline trace.
Inputs: country (required).
india_regulators_directoryAInspect
Static reference directory of Indian data and sector regulators (DPB, RBI, SEBI, IRDAI, TRAI, DoT, PFRDA, MeitY, MCA), optionally filtered by sector: a lookup of who exists and what they cover. To instead work out which of them apply to a specific processing activity, use india_sectoral_check. Stateless lookup: records no decision and leaves no dashboard timeline trace.
Inputs: sector.
india_sectoral_checkAInspect
Before you process personal data under Indian law, find out which sectoral regulators actually bind your specific activity (RBI / SEBI / IRDAI / TRAI / DoT / PFRDA) from its processing profile, so you know whose rules apply before you act. This analyses your processing to say what applies; for a plain directory of every Indian regulator regardless of your activity, use india_regulators_directory.
Inputs: data_categories (required), processing_purpose (required), sector_hint, counterparty_types.
japan_cross_border_statusAInspect
Before you transfer personal data out of Japan, check the destination country's APPI Art 28 status (adequacy / standard basis / high scrutiny). Pass the ISO-3166 alpha-2 country code. Stateless lookup: records no decision and leaves no dashboard timeline trace.
Inputs: country (required).
pan_classifyAInspect
Classify a PAN entity type from the 4th character (P=Person, C=Company, H=HUF, F=Firm, ...). Stateless validator: records no decision and leaves no dashboard timeline trace.
Inputs: pan (required).
pii_testAInspect
Dry-run VITNA's PII / threat detection on a sample event before you send real data, to preview what would be tagged, how it would be redacted, and whether severity would escalate. Nothing is persisted and nothing is filtered: a safe rehearsal you act on, not an enforced gate — it records no decision and leaves no dashboard timeline trace.
Inputs: sample_event (required), jurisdiction.
privacy_notice_getAInspect
Generate the operator's jurisdiction-templated privacy notice. Returns markdown or JSON. Called with an API key, the operator's name and contact details appear as placeholders; the signed-in owner gets the real values. Stateless generator: records no decision and leaves no dashboard timeline trace.
Inputs: format.
sin_validateAInspect
Validate a Canadian SIN (Luhn checksum); returns series region + masked form. Stateless validator: records no decision and leaves no dashboard timeline trace.
Inputs: sin (required).
sub_processors_registerAInspect
Return the public sub-processor register (Supabase, Vercel, Resend, etc.). Stateless lookup: records no decision and leaves no dashboard timeline trace.
Inputs: no named parameters.
us_sectoral_checkAInspect
Before you process personal data under US law, find out which US federal sectoral regimes bind you (HIPAA, GLBA, COPPA, FERPA, FCRA, SOX) for a given processing profile, so you can factor them in before you act. US-scoped; for Indian sectoral regulators use india_sectoral_check.
Inputs: data_categories (required), processing_purpose (required), ai_decisions, counterparty_types, +1 more.
us_state_breach_deadlineAInspect
Quick reference lookup of a single US state's breach-notification window, AG recipient and resident threshold (e.g. 'CA' gives 500 residents, CA AG, without unreasonable delay). This is a static table, not an incident ruling. When you have the actual incident facts and need a reportable / not-reportable decision with reasoning, use breach_classify instead. Stateless lookup: records no decision and leaves no dashboard timeline trace.
Inputs: state (required).
vitna_claimAInspect
Ask whether this VITNA account has been claimed by a real person yet. Call this when the user asks about their VITNA account or when you are told evidence is not being kept. Returns { claimed, claim_url: null, claim_note, what_claiming_gets_you }. You are never given the claim link, and you must not look for it: only a person may claim the account that oversees you. If claimed is false, tell the user that the account's evidence is NOT being durably recorded and that they can claim it with the claim link VITNA showed them when the trial started (the stdio server prints it in its MCP server log).
Inputs: no named parameters.
vitna_helpAInspect
What is VITNA and how do I use it to keep myself in check? Call this FIRST after connecting to learn the safety and oversight checks available: how to check risky actions BEFORE running them, what a deny / hold decision means, trial vs claimed mode, and how the user can monitor and audit what you do. Runs entirely locally: no account, no API call, and no dashboard timeline trace.
Inputs: no named parameters.
vitna_preflightAInspect
SAFETY / OVERSIGHT CHECK before a dangerous or destructive action (shell command, file deletion, DB statement, network call). Call this to have VITNA check the action BEFORE you run it: it flags dangerous shell / SQL / secret-exfil / prompt-injection / suspicious-network patterns and returns { decision: allowed|blocked|flagged }. RESPONSE SHAPE DEPENDS ON THE KEY: an unclaimed trial key gets the decision label only, because the pattern detail is what makes the classifier worth stealing. A claimed key additionally gets threat_category, severity, reason (the rule names that matched, never the matched text), a threats[] array and a redacted echo of what was scanned, plus a signed audit record the user can review. VITNA evaluates and records; it does NOT enforce, so treat blocked / flagged as a stop and get human approval. This is how a user keeps you in check. Heuristic pattern match, not a sandbox: novel or obfuscated payloads can pass.
Inputs: action, payload, action_type.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 23 tools
Each tool has a distinct purpose, and descriptions explicitly clarify overlaps, such as breach_classify vs us_state_breach_deadline and india_sectoral_check vs india_regulators_directory. Validators target different identifiers and checks target different compliance regimes, so an agent can reliably choose the right tool.
All names use snake_case and most follow a resource_action/status pattern (consent_check, gstin_validate, ai_act_classify, india_cross_border_status). Minor deviations exist, including vitna_-prefixed tools and noun-only lookups like global_compliance_map and us_state_breach_deadline, but the set remains readable.
23 tools is on the heavy side for a single MCP server, sitting in the borderline 16-25 range. The compliance domain is broad, but several narrow validators and lookups could potentially be consolidated, making the surface feel somewhat sprawling.
The server covers many advisory checks (consent, breach, DPIA, AI Act, cross-border, sectoral, ID validators), but lacks operational lifecycle tools such as consent create/update/revoke, DSAR handling, incident notification generation, and ROPA/audit retrieval. The surface is broad but incomplete for full compliance management.
Maintenance
Related MCP Connectors
Pre-execution governance for AI agents. Deterministic PASS/FAIL/REVIEW verdicts, replayable proof.
Checks AI agent actions before they run. Signed, RFC 3161 timestamped evidence for audits.
Register every AI agent, log every action, prove it. EU AI Act compliance built in.
Pre-spend firewall for AI agents. Approves, blocks, flags transactions against policy rules.
Related MCP Servers
- AlicenseBqualityCmaintenancePre-execution governance for AI agents. 45 MCP tools for hold queues, audit trails, risk scoring, and policy enforcement. Validates agent actions before they execute.4575 npm1MIT
- AlicenseAqualityDmaintenanceCompliance and guardrails infrastructure for AI agents, enabling safe operations within regulatory boundaries like GDPR and EU AI Act.641 PyPIMIT
- FlicenseNot gradedqualityDmaintenanceMCP server for AI agent compliance that screens actions before execution and records decisions in an immutable, SIEM-ready audit trail.88 npm-
- AlicenseNot gradedqualityCmaintenanceA pre-action authorization server for AI agents that classifies tool calls into 14 intent categories, scores risk 0-100, and produces deterministic allow/deny/ask decisions with full audit trail.MIT