Works with the AI Agents you already use

    MCP Security Gateway Hardening

    by Alexey Zhuykov

    1

    Turn any stdio MCP server into a zero-trust, policy-enforced endpoint for Claude Code, Cursor, and Copilot without relying on system prompts as a firewall.

    Free

    Security scanned

    MCP Security Gateway Hardening

    Example session with this skill installed

    Audit our local ops MCP server (read_log, read_ticket, restart_service), generate a strict policy.json with Path Jail + operator approval gate, and wrap it for Cursor.

    • Read your context and instructions
    • Compiled the mcp security gateway

    Summary

    Generated a default-deny zero-trust policy (default_deny_unlisted: true) with Path Jail on read_log, <UNTRUSTED_TOOL_OUTPUT> isolation on read_ticket, and operator approval + rate cap (5/min) on restart_service.

    ToolModePath JailUntrusted OutputRate Limit
    read_logread_onlyfilenametrue30/min
    read_ticketread_only-true30/min
    restart_servicemutating (approval)-false5/min

    Validator result: pass=3 warn=3 fail=0 · audit_verify: ok=True.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Harden any local or third-party Model Context Protocol (MCP) stdio server with deterministic zero-trust controls instead of fragile system-prompt guardrails. What this skill gives your AI agent:

    • 4-layer security audit workflow stopping Tool Poisoning, Rug-Pull schema mutations (SHA-256 pinning), Path Traversal, covert exfiltration arguments, and Indirect Prompt Injection.
    • Standalone zero-dependency Python 3.11+ validator (scripts/validate_mcp_policy.py) that audits declarative policy.json files and verifies SHA-256 hash-chained audit.jsonl logs offline.
    • Drop-in wrapper snippets for Claude Desktop, Cursor, and hardened non-root Docker Compose (UID 10001, read_only, cap_drop: [ALL], network_mode: none). Official open-source MIT gateway repository: Author & B2B security consulting:

    Supports only stdio transport for MCP. Requires Python 3.11+ with no third-party dependencies. Does not support SSE or WebSocket MCP servers.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 9 days ago

    • Free with an Agensi account

    Software
    Security Gateway MCPPython

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Network Access
    Listed9 days ago

    What's inside

    Frequently Asked Questions

    While system prompts rely on LLM 'obedience,' this skill adds a physical security layer at the transport level. It prevents unauthorized tool execution and path traversal even if an agent is successfully targeted by a prompt injection attack.

    This gateway works with any AI agent that supports the Model Context Protocol (MCP) over stdio, including Claude Desktop, Cursor, and GitHub Copilot. It is designed to wrap any standard MCP server regardless of the underlying language.

    You will receive a suite of Python-based validation scripts, the security gateway proxy logic, and a set of declarative JSON policy templates. These components allow you to audit, wrap, and enforce zero-trust rules on your existing MCP servers.

    The setup involves running a classification script on your target MCP server to generate a policy.json, which you then customize to your security needs. Once validated, you simply update your agent's config file to point to the gateway wrapper instead of the raw server command.

    The path jail enforcement uses regex patterns and root directory constraints to ensure file-access tools cannot escape their designated folders. If an agent attempts to access a path outside the 'jail,' the gateway intercepts and blocks the request before it ever reaches the server.

    Yes, the gateway includes SHA-256 tool pinning, which locks tool schemas to specific hashes. If an MCP server update silently changes its capabilities or parameters, the gateway will detect the mismatch and block execution to prevent 'rug-pull' vulnerabilities.

    New in LLM Ops

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.

    Free