Vaikora › Blog › Product Updates
vaikora-guard-mcp: an open-source MCP proxy that enforces policy on tool calls before they execute
Tool calls are where AI agents cause real damage. Not in the prompt, not in the response. At the moment the agent decides to call `delete_records`, `send_email`, or `query_customer_db`, and that call goes through without any check. vaikora-guard-mcp is a small, MIT-licensed Python package that sits inline at that exact point.
It is published on PyPI as `vaikora-guard-mcp` and self-hosted. You read the source, you run it on your own infrastructure, nothing phones home unless you wire it to the Vaikora Control Plane yourself.
What the proxy actually intercepts
MCP (Model Context Protocol) is the standard that lets AI agents discover and call external tools. The agent sends a tool call request. Normally that request goes straight to the tool. With vaikora-guard-mcp in the path, the request goes to the proxy first.
The proxy evaluates the call against a policy. The result is one of four decisions:
- allow: the call proceeds as-is
- block: the call is rejected before the tool receives it
- modify: the proxy rewrites the request (stripping a field, masking a value) and then passes it through
- require-approval: the call is held until a human confirms it
The same input always produces the same decision. There is no probabilistic scoring underneath, no "likely malicious." The policy is deterministic. If the rule says block tool calls that reference production database credentials outside business hours, that rule runs the same way every time.
A concrete scenario
Say you have an AI agent that can read and write to a Snowflake warehouse. The agent is given a task that, mid-execution, causes it to construct a query touching a table flagged as containing PII.
Without a runtime gate, the query runs. The agent's underlying model had no way to know that table was off-limits. Your Snowflake RBAC might allow it because the service account has broad read access.
With vaikora-guard-mcp inline, the tool call hits the policy layer first. A rule keyed to table name or data classification label blocks the call before it reaches Snowflake. The agent gets a denial response. The query never executes. The event is written to the audit log.
Vaikora adds this gate on top of existing IAM and RBAC controls rather than replacing them. Azure RBAC, AWS IAM, Snowflake roles: they still apply. The proxy is an additional enforcement point specifically for the AI agent layer, where those controls have no visibility into what the model is actually doing.
Six content inspection modules
The gateway ships six content inspection modules. These handle the categories of risk that come up repeatedly in agent deployments:
- PII and sensitive data patterns in outbound tool call parameters
- Prompt injection attempts embedded in tool arguments
- Policy violations tied to data classification labels
- Credential and secret patterns
- Scope violations (an agent calling a tool outside its declared task)
- Custom rules you write yourself
The modules run inline. Enforcement latency is P50 8ms and P99 45ms. At that speed, the proxy is not a meaningful bottleneck even in high-volume agent workflows. The gateway handles 10,000+ actions per second.
What the audit log gives you
Every decision, allow or block or modify or require-approval, is written to a SHA-256 hash-chained, tamper-evident audit log. That chain gives you an ordered record where each entry is cryptographically tied to the one before it.
If a compliance auditor asks what your AI agent did with a particular customer record last Tuesday, the answer is in the log. If a tool call was blocked, you can show exactly which rule triggered, what the input was, and when it happened. That is the kind of auditability that satisfies SOC 2, HIPAA, GDPR, PCI-DSS, and ISO 27001 requirements, and Vaikora ships presets for all five.
Getting started
Install the package:
```
pip install vaikora-guard-mcp
```
The source is MIT-licensed and readable. Start with a policy file that defines the tools your agent is allowed to call and what parameters are permitted. Run the proxy locally against a test agent. Watch the audit log for a few hours of real traffic before you switch enforcement from log-only to block.
The next check worth running: map every tool your agents call today against the permissions that tool carries. Any tool that can write, delete, or transmit data to an external endpoint is a candidate for a require-approval rule at minimum. That mapping is where most teams find their actual risk surface.
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