VaikoraVaikora

Vaikora › Blog › Product Updates

Self-hosting an MCP policy gate: what vaikora-guard-mcp does, how it's built, and what you can change

Product Updates · Nov 28, 2026 · 3 min read

Before a hosted MCP tool call reaches its target, there is a window of roughly a few milliseconds where you can inspect it, match it against policy, and stop it. vaikora-guard-mcp sits in that window. The code is public, MIT-licensed, written in Python, and on PyPI.

What the proxy actually does

vaikora-guard-mcp acts as a pass-through between an AI agent and whatever MCP-compatible tools it is trying to call. Every tool invocation hits the proxy first. The proxy checks the call against a policy definition, then returns one of four decisions: allow, block, modify, or require-approval. The underlying tool never sees a blocked call. It only receives calls the policy permits.

This is not a logging layer. The check happens before execution, not after. If an agent tries to write to a path outside its declared scope, or call a tool with a parameter that matches a deny rule, the action stops there.

How to run it

Install from PyPI:

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

Point your MCP client at the proxy instead of directly at your tool server. The proxy configuration takes a policy file that defines which tools are allowed, which parameter patterns are blocked, and what requires human approval before proceeding. Because it is self-hosted, your tool call payloads stay inside your own infrastructure.

The proxy connects to the Vaikora Control Plane if you want centralized policy management, reporting, and the tamper-evident audit log. That part is the commercial product, hosted by Data443. The proxy itself runs entirely under your control.

A concrete example

Say your agent is connected to a filesystem tool and a database query tool. Your policy file allows the filesystem tool to read from `/data/reports/` but blocks any write operations. It allows the database tool to run SELECT statements but requires human approval before any DELETE or UPDATE.

At runtime, the agent calls the database tool with `DELETE FROM sessions WHERE expired = true`. The proxy matches the call against the require-approval rule, holds the action, and surfaces it for review. If no one approves within your configured timeout, the call is dropped. The agent gets a rejection response and can handle it however its error logic dictates.

That scenario plays out without any change to the tool server, the database, or the agent itself. The policy enforcement sits in the path.

What being open source changes for you

The MIT license means you can read every line of enforcement logic, modify it, and run a fork if you want different behavior. For teams that need to explain to their own security reviewers exactly what is inspecting AI agent traffic, "here is the GitHub repository" is a materially better answer than "trust our documentation."

Six content inspection modules ship inside the proxy. You can audit which patterns each module checks, extend them, or disable individual modules for environments where certain checks are not relevant.

The proxy also supports the major hosted model APIs through adapters, so you are not locked to a single LLM provider. Switching the model the agent uses does not require touching policy configuration.

What to look at next

Clone the repository and read the policy schema before you write your first rule. The clearest way to understand what the proxy can and cannot enforce is to look at the shape of a policy file and trace one tool call through the allow/block/modify/require-approval decision tree.

If you are running agents against MCP-compatible tools in production, map out which tools those agents can call and what the worst-case parameter combinations look like. That list becomes your first policy file. Start with block rules for the calls that should never happen, then layer in require-approval for anything sensitive but legitimate.

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