Nura MCP Policy Interceptor
This server acts as an MCP policy interceptor, enforcing governance guardrails on tool executions. It provides two built-in tools: apply_deal_discount (apply a percentage discount to a deal, with a configurable upper limit on the discount percentage) and delete_database_record (permanently purge a database record). The policy interceptor can block forbidden tools (e.g., delete_database_record), require human approval for sensitive operations (e.g., apply_deal_discount), and enforce numeric parameter bounds (e.g., max discount percentage). Policies are loaded dynamically from external JSON or YAML files, and every tool evaluation is audited with a detailed log entry. The server can be used as a drop-in wrapper for existing MCP servers or as a standalone server over stdio.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Nura MCP Policy Interceptor Evaluate tool call issue_refund with amount 2000"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Nura MCP Policy Interceptor
A lightweight, deterministic governance and policy enforcement gateway for Model Context Protocol (MCP) servers.
Install
npm install mcp-policy-interceptorRequires Node.js 20 or later and @modelcontextprotocol/sdk 1.26 or later. npm installs the SDK peer automatically when it is not already present.
Protect an existing MCP tools/call handler in three lines:
import { createPolicyInterceptor } from "mcp-policy-interceptor";
const protect = await createPolicyInterceptor("./policy.yaml");
server.setRequestHandler(CallToolRequestSchema, protect(callToolHandler));The wrapped handler runs only when the policy returns ALLOW. BLOCK and REQUIRE_APPROVAL requests return MCP errors without invoking application code. Pass a policy object, a PolicyEngine, or a path to a .json, .yaml, or .yml file.
Related MCP server: Aegis
Enterprise Governance & Pilot Program
mcp-policy-interceptor is architected as a deterministic, cross-language policy sidecar/proxy for Model Context Protocol (MCP) servers.
We are currently collaborating with engineering teams and enterprise architects to implement runtime write-path protection, asynchronous Human-in-the-Loop (HITL) approval webhooks, and immutable audit trails.
📊 Take our 60-second survey: AI Agent Security Survey
📬 Discuss an Enterprise Pilot: Open an issue or contact
horvathkit@gmail.com
Features
Hard Guardrails: Instantly drop forbidden tool execution requests before hitting systems of record.
Dynamic Parameter Bounds: Intercept requests that exceed numerical thresholds (e.g., discounts, spend limits).
Human-in-the-Loop Hooks: Pause high-risk operations and surface human review requests.
Audit Telemetry: Cryptographic-ready logging for all agent-tool evaluations.
Demo CLI
npx mcp-policy-interceptor --policy ./policy.yamlThe demo CLI uses MCP stdio transport and is intended to be launched by an MCP client.
External Policy Files
Pass a JSON or YAML policy at startup to update rules without recompiling TypeScript:
node dist/cli.js --policy ./policy.json
# The npm equivalent passes arguments after --
npm start -- --policy ./policy.yamlJSON example:
{
"forbiddenTools": ["delete_database_record", "purge_crm_contacts"],
"requireApprovalTools": ["issue_refund", "update_deal_stage"],
"maxParamLimits": {
"discountPercentage": 20,
"amount": 1000
}
}YAML example:
forbiddenTools:
- delete_database_record
- purge_crm_contacts
requireApprovalTools:
- issue_refund
- update_deal_stage
maxParamLimits:
discountPercentage: 20
amount: 1000Supported extensions are .json, .yaml, and .yml. Relative paths are resolved from the process working directory. Missing, malformed, or schema-invalid policy files stop startup with an error. If --policy is omitted, the built-in policy is used.
Development
npm install
npm testVerification
npm testThe test command builds into dist/ and verifies:
Governance decisions use only
ALLOW,BLOCK, andREQUIRE_APPROVAL.Forbidden tools and out-of-bounds parameters return policy failures without invoking the target executor.
Every evaluated tool request emits a
[GOVERNANCE AUDIT LOG]entry with its timestamp, decision, tool name, and reason.The compiled stdio server enforces built-in and external policy behavior through an MCP client.
Available Tools
2 toolsapply_deal_discountB
Applies a percentage discount to an active deal.
Inputs: dealId (required), discountPercentage (required).
delete_database_recordB
Permanently purges a record from the database.
Inputs: recordId.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools are entirely distinct: one applies a discount to a deal, the other deletes a database record. There is no overlap or ambiguity between their purposes.
Both tools follow the verb_noun pattern with snake_case: 'apply_deal_discount' and 'delete_database_record'. This is consistent and predictable.
With only 2 tools, the server feels thin for a 'Policy Interceptor' scope. The count is on the low end of borderline, as it may not cover enough operations to be truly useful.
The tool surface is sparse and lacks obvious lifecycle operations. For a policy interceptor, one would expect at least read/list functionality alongside the action tools, and the current set leaves significant gaps in typical CRUD or policy management workflows.
Maintenance
Related MCP Connectors
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
MCP gateway with runtime security policy, tool-call-level control, and audit of agent actions.
Governed MCP gateway for business apps: roles, previews, approvals and one audit log.
Zero-secret MCP gateway for AI agents: risk-scored, audited calls with human-in-the-loop approval.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceProvides a governance proxy layer for MCP servers, enforcing per-tool allowlists, human approval for write operations, quotas, secret redaction, and a hash-chained audit log of all calls.MIT
- AlicenseNot gradedqualityDmaintenanceEnables governing tenant-aware MCP tools with policy enforcement, scoped access, human approval workflows, and tamper-evident audit logging.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents and MCP clients to safely access upstream MCP servers through centralized policy enforcement, including allow/deny/approval decisions, schema pinning, circuit breakers, and audit logging.MIT
- AlicenseNot gradedqualityCmaintenanceEnables centralized proxy and orchestration of MCP servers, providing unified tool discovery, authentication, and secure request routing. It adds a human-in-the-loop approval gate for high-risk actions and audit logging.Apache 2.0