Vaikora › Blog › Product Updates
What actually happens when an MCP server blocks a tool call: vaikora-guard-mcp's enforcement path explained
Before an AI agent writes to a database or calls an external API, something has to decide whether that action is permitted. Without a gate at that point, the first signal you get is a completed action, possibly an irreversible one. That is the problem vaikora-guard-mcp is designed to solve, and because it is published on PyPI under the MIT licence, you can read exactly how it does it.
What the proxy actually intercepts
vaikora-guard-mcp sits inline between the agent and any tool it calls via the Model Context Protocol. When the agent issues a tool call, the proxy receives it before the tool executes. It runs the call through a set of content inspection modules, checks the result against your policy file, and returns one of four decisions: allow, block, modify, or require-approval.
The agent never reaches the tool unless the decision is "allow." That is different from an audit log or an alert system, where the action has already run by the time you see it.
The proxy writes every decision to a SHA-256 hash-chained audit log. Each entry is signed into the chain, so the record is tamper-evident and ordered. If you need to show an auditor exactly what an agent did and when, that log is your answer.
A concrete scenario
Say an agent is authorized to query a customer database but should not exfiltrate rows containing payment card data. Without a policy gate, the agent's LLM context window and tool permissions are the only controls. If the LLM generates a broad SELECT that returns PAN data, it runs.
With vaikora-guard-mcp in the path, you define a policy rule that blocks or modifies tool calls whose arguments or expected output match PCI-DSS sensitive patterns. The proxy inspects the call before it reaches the database, applies the rule, and writes the block decision to the audit chain. The query never runs. The compliance preset for PCI-DSS ships with the package, so you do not need to write that rule from scratch.
The same logic applies to HIPAA, GDPR, SOC 2, and ISO 27001. Each preset is a starting point, not a ceiling. You can extend it with custom rules specific to your environment.
Installing and running it
The package is published as `vaikora-guard-mcp` on PyPI. It is written in Python. Installation is:
```
pip install vaikora-guard-mcp
```
From there you point your MCP-compatible agent at the proxy endpoint instead of the tool directly, and supply a policy file. No SDK migration is required. The proxy supports 12 LLM providers, so if you are already using a hosted model API, the adapter for it is likely already included.
The proxy is self-hosted. Your tool call data stays in your infrastructure. The commercial Vaikora Control Plane, hosted by Data443, is a separate product if you need centralized policy management, SIEM integration, or multi-team governance. The open-source proxy works independently.
Performance under real load
A policy gate that adds noticeable latency to every tool call is a problem for agentic workflows that chain many calls in sequence. The proxy enforces policy at P50 8ms and P99 45ms, and handles over 10,000 actions per second. For most agent workflows, the enforcement overhead is not the bottleneck.
Detection accuracy in testing is 99.9%. That matters because a gate that generates false positives on legitimate tool calls creates friction that leads teams to disable it.
What the code lets you verify yourself
Because the licence is MIT and the source is public, you can inspect:
- The content inspection modules and what patterns they check
- How the policy decision logic maps inputs to allow/block/modify/require-approval
- How the audit chain is constructed and how the SHA-256 chaining works
- How the proxy connects to each supported LLM provider
That auditability is the point of open-sourcing the enforcement layer. If a policy gate is protecting sensitive tool calls, you should be able to verify its behavior directly, not take it on trust.
What to check next
If you are evaluating this for a production deployment, the first step is reading the policy file schema and confirming it covers your specific threat model. The compliance presets give you a baseline for regulated data types, but tool-specific risks (agent access to internal APIs, write operations on production systems, calls that trigger financial transactions) require rules you define.
After that, check the audit log format against whatever your SIEM or compliance reporting pipeline expects. The log is designed to be tamper-evident, but how you ingest and store it determines whether it holds up in an investigation.
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
Vaikora