Most MCP servers pass tool calls straight through to execution. There is no inspection step, no policy check, and no record of what ran or why. If you want to know whether an AI agent called a deletion API it should not have touched, you find out from logs after the fact, if you find out at all.
vaikora-guard-mcp is a small, MIT-licensed Python proxy published on PyPI that sits between an MCP client and the tools it calls. Every tool invocation passes through a policy check before execution. The decision, allow, block, modify, or require approval, happens inline. The action either runs or it does not. There is no post-execution detection step.
What Problem This Actually Solves
MCP gives AI agents a standard interface to call tools: file systems, APIs, databases, shell commands. That is useful. It also means an agent with broad tool access can take consequential actions with no guardrail between intent and execution.
The gap is not that MCP is insecure by design. The gap is that nothing in the protocol requires a policy layer. The developer who wires up the tools decides what the agent is allowed to do, usually at build time, usually in the system prompt. System prompts are not enforcement. They are suggestions that can be overridden, misinterpreted, or bypassed by prompt injection.
A proxy that checks the tool call itself, before the underlying function runs, closes that gap deterministically.
How vaikora-guard-mcp Works
Install it from PyPI:
“`
pip install vaikora-guard-mcp
“`
The proxy wraps your existing MCP server. When an MCP client sends a `tools/call` request, the proxy intercepts it, evaluates the call against configured policy, and either forwards it, blocks it, rewrites parameters, or holds it for human approval before the downstream server ever sees the request.
Policy is defined in a local configuration file. Rules match on tool name, parameter values, or combinations of both. A rule might say: block any call to a `delete_file` tool where the path matches `/prod/*`. Another might say: require approval for any `send_email` call where the recipient is not in an allowed domain list.
The check is deterministic. Identical input produces the identical decision every time. There is no probabilistic scoring involved in the enforcement step.
Every decision is written to a SHA-256 hash-chained, tamper-evident audit log. That means you can prove, after the fact, that a specific tool call was blocked at a specific time, and that the log has not been modified.
A Concrete Scenario
Say you are building an agent that manages cloud infrastructure. It has access to a tool that calls the AWS EC2 `TerminateInstances` API.
Without a policy gate, the agent can terminate any instance it has IAM permission to touch. You might rely on the system prompt to restrict this. If the agent is manipulated by a prompt injection attack that overrides the system prompt instruction, there is nothing left between the agent and the action.
With vaikora-guard-mcp in front of the tool, you write a policy rule: block `TerminateInstances` calls where the instance ID matches a tag value of `environment=production`. The proxy checks the parameter before the call reaches your AWS adapter. The agent cannot work around this by rephrasing its intent, because the check runs on the structured tool call, not on natural language.
If the agent attempts the call anyway, the proxy blocks it, the audit log records the attempt with a timestamp and the input parameters, and the action never reaches AWS.
What Gets Logged and Why It Matters
The audit chain is not optional or configurable. Every allow, block, modify, and require-approval decision is recorded. The SHA-256 chaining means any attempt to delete or alter a log entry breaks the chain and is detectable.
This matters for compliance. If you need to demonstrate to an auditor that your AI agent did not access a specific resource class during a given period, you can produce a verifiable record. The log answers who, what, when, and what decision was made, in a form that cannot be quietly edited after the fact.
Vaikora compliance presets for HIPAA, PCI-DSS, GDPR, SOC 2, and ISO 27001 ship with the enterprise control plane if you need pre-built policy sets rather than writing rules from scratch.
Self-Hosted, Open Source, MCP-Compatible
The proxy is self-hosted. Your tool call data does not leave your environment to be evaluated. The MIT license means you can inspect the code, modify it, and run it without restriction.
The source is on PyPI as `vaikora-guard-mcp`. It is written in Python and works with any MCP-compatible client.
If you need centralized policy management across multiple agents, the Vaikora enterprise control plane connects to the proxy and lets you manage rules, review approval queues, and query the audit log from one place. That is the commercial product. The proxy itself runs without it.
What to Check Next
Pull the package, read the policy configuration schema, and write one rule against a tool your agent already calls. Block a specific parameter pattern that you would not want an agent to hit in production. Run the agent through a few test cases and confirm the audit log captures both the allowed and blocked decisions.
If you want to test tamper evidence, make a copy of the log file, alter one entry, and confirm the chain validation reports the break.
That sequence will tell you more about whether the approach fits your environment than any documentation will.