Home | Blog | Open-Source MCP Proxy for AI Agents: Running Policy Checks Before Tool Calls Execute

Open-Source MCP Proxy for AI Agents: Running Policy Checks Before Tool Calls Execute

A single unapproved tool call from an AI agent can write to production, exfiltrate data, or trigger a downstream chain of actions that is difficult to reverse. The question is not whether your agents will reach a point where that matters. It is whether a policy decision runs before the action or after.

Vaikora Guard MCP is the open-source component that puts a policy check at that exact moment. It sits inline between an AI agent and the tools it calls, intercepts each request, evaluates it against configured policy, and returns an allow, block, modify, or require-approval decision before execution proceeds. The source is MIT-licensed, written in Python, and published on PyPI as `vaikora-guard-mcp`.

What "Inline" Actually Means Here

Inline enforcement is a specific architectural property. The agent sends a tool call request to the proxy. The proxy evaluates the request and either forwards it, rewrites it, holds it for human approval, or drops it with an explanation. The tool never receives a request that the policy rejected. There is no "detect and respond after the fact" window.

This is different from logging or monitoring. Logging tells you what happened. An inline proxy decides what happens.

Vaikora Guard MCP is MCP-compatible, so it works with any agent framework that speaks the Model Context Protocol. No SDK migration is required for the agent side.

What the Policy Check Actually Does

Each incoming tool call passes through six content inspection modules before a decision is made. Inspection covers the tool name, arguments, payload content, and contextual signals from the session. Policy rules are deterministic: identical input always produces identical output. That property matters for auditability, because a decision that depends on runtime state you cannot reconstruct is a decision you cannot explain later.

The enforcement decision is written to a SHA-256 hash-chained audit log. Each entry is signed into the chain, so the record is tamper-evident and ordered. If a compliance auditor or incident investigator asks what an agent did at a specific time, the log answers that question without ambiguity.

Supported compliance presets ship for SOC 2, HIPAA, GDPR, PCI-DSS, and ISO 27001. A team working under HIPAA, for example, can load the HIPAA preset and immediately get policy rules that reflect the control requirements for that framework, rather than writing rules from scratch.

A Concrete Deployment Scenario

Suppose you are running a coding agent that has access to a database query tool, a file write tool, and an external API call tool. Without a policy gate, any prompt injection or logic error that causes the agent to issue an unexpected `file_write` or external API call executes immediately.

With Vaikora Guard MCP deployed as the proxy:

  • The `file_write` tool call hits the proxy first.
  • The proxy checks the target path and payload against policy. If the path is outside the approved working directory, the call is blocked and the agent receives a rejection with a reason.
  • If the external API call targets a domain not on the approved list, it is blocked the same way.
  • Both decisions are written to the audit chain with timestamps, session context, and the matched rule.

The agent never touches production storage for that unapproved write. The audit log records what was attempted, what rule applied, and what the outcome was.

Self-Hosted, Commercial Control Plane Optional

The proxy itself is self-hosted. You run it in your own environment, your data does not leave your infrastructure, and the MIT license means you can inspect and modify the code. The commercial product, the Vaikora Control Plane, adds centralized policy management, team-level governance, alerting, and the native integrations with Microsoft Sentinel, Microsoft Defender, SentinelOne, CrowdStrike Falcon, and AWS Security Hub.

For teams that want to start with the open-source proxy and add the control plane later, that path is straightforward because they share the same enforcement core.

The proxy is also available as an enterprise deployment through AWS Marketplace as a SaaS subscription with private offer and EDP draw-down support.

What to Check Next

If you are evaluating this for an existing agent deployment, the practical starting point is your current tool list. Map which tools have write access, external network access, or access to sensitive data stores. Those are the calls that need a policy check running before execution. Install `vaikora-guard-mcp` from PyPI, configure a policy file for one of those tool categories, and run a test session against your agent to see what the proxy intercepts. The audit log output tells you immediately whether your agents are calling tools you did not expect.