VaikoraVaikora

Vaikora › Blog › Product Updates

From zero to enforced: wiring vaikora-guard-mcp into an MCP agent so policy runs before the tool does

Product Updates · Nov 6, 2026 · 4 min read

Most teams add guardrails to AI agents after something goes wrong. The model calls a tool it should not have touched, writes data to the wrong endpoint, or passes a credential in plain text through a prompt. The incident gets investigated, a policy gets written, and the policy lives in a document instead of in the execution path.

vaikora-guard-mcp exists to change where that policy sits. It runs inline, as a proxy, between the MCP client and whatever tools the agent can reach. The decision to allow, block, modify, or require approval happens before the tool executes. Not in a log reviewed later. Before.

What the proxy actually does

When an MCP tool call arrives at vaikora-guard-mcp, the proxy inspects the request against a policy file before forwarding it. If the request matches a block rule, the tool never runs and the agent receives a structured refusal. If it matches a modify rule, the proxy rewrites the request inline. If it matches a require-approval rule, execution pauses until a human responds.

Identical inputs always produce identical decisions. This is deterministic enforcement, not a model making a judgment call. Every decision is written to a SHA-256 hash-chained, tamper-evident audit log, so you have an ordered record of what was allowed and what was blocked, and that record cannot be quietly altered.

The P50 enforcement latency is 8ms. P99 is 45ms. For most agent workflows that is well inside any acceptable latency budget.

How to wire it in

vaikora-guard-mcp is published on PyPI as `vaikora-guard-mcp`, written in Python, and licensed MIT. Installing it and pointing it at an existing MCP server takes roughly as long as reading this paragraph.

A minimal setup looks like this:

The agent sees no difference. It still speaks MCP. The proxy intercepts every tool call, evaluates it, and forwards or blocks it. The upstream server never sees the calls that are blocked.

A concrete scenario: your agent has access to a file-write tool. You want to prevent it from writing to any path outside `/data/exports`. You add one policy rule:

```yaml
- tool: file_write
condition: "not request.path.startswith('/data/exports')"
action: block
reason: "Write path outside permitted directory"
```

That rule runs on every file-write call. No calls outside the permitted path reach the tool. No after-the-fact review required.

Compliance presets and what they cover

If you need to enforce compliance-aligned controls without writing every rule by hand, vaikora-guard-mcp ships presets for HIPAA, PCI-DSS, GDPR, SOC 2, and ISO 27001. Each preset is a curated policy file. You load it the same way you load a custom policy file. You can extend it, restrict it, or combine it with your own rules.

This matters for teams deploying agents in regulated environments where you need to show an auditor not just that a policy existed, but that it was enforced at every execution point.

Self-hosted, so your data stays inside

The proxy runs on your infrastructure. No tool call content is sent to Data443 or any third party. The MIT licence means you can read the enforcement code, modify it, and deploy it in any environment. The enterprise Control Plane, hosted by Data443, adds centralized policy management, team-level visibility, and SIEM integration with Microsoft Sentinel, CrowdStrike Falcon, SentinelOne, and AWS Security Hub. But the enforcement itself works without any of that.

This matters for air-gapped environments, for teams with strict data residency requirements, and for anyone who needs to audit what the enforcement code does before trusting it.

What to check next

If you have an MCP agent in production or staging, run `pip install vaikora-guard-mcp` and read the policy file schema. Write one rule against the tool you would least want misfiring, run your agent through a test call that should be blocked, and confirm the audit log captures the decision. That takes under an hour and gives you a concrete baseline to build from. The source is on PyPI and the licence lets you read every line.

See Vaikora enforce policy on your AI

Open-core AI runtime control. Self-host the MIT gateway free, or run the hosted Control Plane.

Get a demo Self-host the gateway

More from the Vaikora blog