VaikoraVaikora

Vaikora › Blog › Product Updates

Publishing an MCP-compatible policy gate as open source: what vaikora-guard-mcp checks before any tool call runs

Product Updates · Nov 26, 2026 · 3 min read

Most agent frameworks let tool calls execute and then ask questions afterward. The problem with that order is obvious once an agent deletes a record, posts to an external endpoint, or reads a file it had no business touching. The action is already done.

vaikora-guard-mcp flips that. It sits inline between an agent and the tools it calls, checks each call against policy before execution, and returns allow, block, modify, or require-approval. The tool either runs or it does not. There is no after-the-fact review for the actions it blocks.

The code is MIT-licensed, written in Python, and published on PyPI as `vaikora-guard-mcp`. You can read it, fork it, run it on your own infrastructure, and modify it without restriction.

What the proxy actually does

When an agent sends a tool call, the request hits vaikora-guard-mcp first. The proxy extracts the tool name and parameters, runs them through the configured policy, and either forwards the call or stops it.

The gateway ships six content inspection modules. These cover things like prompt injection patterns in parameters, data leaving a permitted scope, and calls to tools that policy marks as off-limits for a given agent identity or session context.

Every decision is written to a SHA-256 hash-chained, tamper-evident audit log. That log is ordered and signed, so you can prove after the fact what the agent attempted and what the policy answered.

Enforcement speed at this gate is P50 8ms and P99 45ms. At that latency the check is not a bottleneck in any realistic agent workflow.

A concrete scenario

Say you have an agent connected to three MCP tools: a SQL query tool, an S3 file writer, and an external webhook. Policy says the agent can query the database and read files, but it cannot write to S3 and cannot call the webhook without a human approval step.

Without a policy gate, the agent calls whatever its reasoning says to call. With vaikora-guard-mcp in the path:

The agent sees a blocked or pending response rather than a success. The behavior is deterministic: identical input always produces the same decision, so the policy is auditable and testable.

How to run it

Install from PyPI:

```
pip install vaikora-guard-mcp
```

Point your agent's MCP configuration at the proxy instead of directly at the tools. The proxy handles the routing. You define policy in configuration, mapping tool names and parameter patterns to decisions.

The self-hosted version is the open-source gateway. The Vaikora Control Plane, which Data443 hosts, adds centralized policy management, team-level controls, and the integrations with Microsoft Sentinel, CrowdStrike Falcon, SentinelOne, and AWS Security Hub. The gateway runs fine standalone if you just need the inline check.

What to check before you deploy

A few things worth verifying in your environment before you put the proxy in front of production tool calls:

The repository and the PyPI package are the starting point. Read the policy configuration documentation before writing your first rule set, particularly around parameter-level matching, which is where most misconfigurations show up.

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