Works with the AI Agents you already use

    mcp guard

    by Kirtikumar Alone

    1

    Guides your agent to install and run mcp-guard, an open-source proxy that redacts PII and secrets from MCP tool results. Includes audit logs, read-only database scans, and clear notes on privacy limits.

    Free

    Security scanned
    mcp guard

    mcp guard

    Example session with this skill installed

    I have an MCP server running at http://localhost:7000/ that returns customer records with SSNs, card numbers and emails. Set up mcp-guard so the model never sees the raw values, and show me that it works. I don't want any of this data sent to a third-party service.

    • Read your context and instructions
    • Compiled the mcp guard

    Summary

    mcp-guard is running on localhost:5000 in

    regex-only mode, so nothing leaves your machine. It sits in front of your MCP server at http://localhost:7000/. I tested it with a customer record, and the SSN, card number, email and API key were all masked before the output reached me.

    What I set up

    1. Cloned and built mcp-guard (Node 20+): npm install, cp .env.example .env, npm run build
    2. Set MCP_SERVER_URL=http://127.0.0.1:7000/ and left OPENROUTER_API_KEY empty (no AI pass, no third party)
    3. Started it in the background with npm start
    4. Confirmed it is healthy with GET /health

    Verification

    Call made through the guard: POST /mcp/call with {"name":"get_customer","arguments":{"id":1}}

    TypeFoundResult
    SSN1[REDACTED_SSN_1]
    Credit card1[REDACTED_CREDIT_CARD_1]
    Email1[REDACTED_EMAIL_1]
    API key1[REDACTED_API_KEY_1]

    What the model sees (the clean field):

    Customer Jane Roe, SSN [REDACTED_SSN_1], card [REDACTED_CREDIT_CARD_1], email [REDACTED_EMAIL_1], key [REDACTED_API_KEY_1]
    

    The audit log (GET /audit/summary) recorded 4 redactions, all inbound. Tool arguments are also scanned on the way out: an SSN typed into a request was redacted too.

    Things you should know

    • The customer's name was not masked. In regex-only mode, names and free-form addresses are not detected. Detecting them needs the AI pass, which sends text to OpenRouter. You said you don't want that, so I left it off.
    • Matching is shape-only. Long digit strings such as order numbers may be redacted as card numbers. This over-redacts rather than leaks.
    • The repo's own test suite shows 2 failures. They are known and relate to out-of-date test expectations, not your setup.

    Next steps

    1. Point your agent's MCP calls at POST http://localhost:5000/mcp/call instead of the server directly
    2. Use a read-only database user if you add the PostgreSQL scanner
    3. Change CORS_ORIGIN from * before deploying anywhere beyond localhost
    4. Set MONGODB_URI if you want the audit log to survive restarts

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

    About this skill

    What it does

    This skill teaches your AI agent to install, run and use mcp-guard, an open-source data-loss-prevention (DLP) proxy for MCP traffic. mcp-guard sits between your agent and an MCP server, scans tool calls in both directions, and replaces sensitive values with stable placeholders such as [REDACTED_SSN_1] before the model sees them.

    Instead of reading the README and explaining it to your agent, you ask in plain language and the agent already knows the steps.

    What your agent will be able to do

    • Clone, build and start mcp-guard (Node 20+)
    • Point it at your own MCP server and route tool calls through it
    • Verify masking with a test scan before you rely on it
    • Scan pasted text or data from a read-only PostgreSQL database, a MongoDB collection or an HTTP API
    • Read the audit log and summary (what was redacted, by type, direction and origin)
    • Troubleshoot common problems (upstream unreachable, empty audit log, rate limits)

    What it detects

    SSNs, card numbers, emails, phone numbers, IP addresses, IBANs, API keys and CVVs. Placeholders are stable, so the same value always gets the same placeholder and the agent can still reason about which records match.

    Honest limits

    This skill tells your agent to explain these up front:

    • The optional AI pass sends text to OpenRouter to catch names and addresses. For sensitive data, run in regex-only mode, where nothing leaves your machine.
    • Regex-only mode does not catch names or free-form addresses.
    • Matching is shape-only, so long digit strings (such as order numbers) may be redacted as card numbers. It errs toward over-redacting.
    • No per-type block/allow policy yet. Everything detected is redacted.
    • Early-stage project. Not audited, and not a sole control for regulated data (HIPAA, PCI, GDPR).

    Tested

    Checked on a local run (Node 22, regex-only mode, with a mock upstream MCP server): scanning, inbound and outbound redaction, the audit log, and the SQL and URL safety filters. Not tested: the OpenRouter AI pass, live PostgreSQL/MongoDB connectors, and the dashboard.

    Requirements

    Node.js 20 or newer, git, and network access to clone the repo and install packages. An OpenRouter API key is optional or any local model or trusteed AI API key provider . .

    Source

    mcp-guard is MIT licensed: https://github.com/kirtikumarAlone/mcp-guard

    Requires Node 20+. 16-digit numbers trigger false positives for credit cards. Regex-only mode misses unstructured names/addresses. Not for regulated HIPAA/PCI data.

    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 12 days ago

    • Free with an Agensi account

    Accounts
    AI API key
    Software
    GitNode.js

    Permissions

    Terminal / Shell
    Network Access
    Read Files
    Environment Variables
    Browser
    Listed12 days ago

    What's inside

    Creator

    Kirtikumar Alone

    Kirtikumar Alone

    Frequently Asked Questions

    Unlike system prompts which can be ignored or bypassed by LLMs, mcp-guard acts as a hard programmatic firewall that physically removes sensitive data from the traffic stream before it ever reaches the model's context window.

    The skill works with any AI agent or framework that uses the Model Context Protocol (MCP). Simply point your agent's tool calls to the mcp-guard proxy endpoint instead of the direct tool server.

    Yes, you can toggle between a high-speed local regex mode for common patterns (like SSNs and API keys) and an LLM-assisted mode for identifying more complex PII like names or physical addresses.

    The purchase includes the full Node.js source code, a pre-configured Express server for proxying, setup scripts for local installation, and documentation for connecting to PostgreSQL, MongoDB, or HTTP sources.

    The system uses stable placeholders, meaning the same sensitive value will receive the same label (e.g., [REDACTED_EMAIL_1]) throughout a session. This allows the AI to perform tasks like deduplication or pattern analysis without ever seeing the raw data.

    In regex-only mode, all processing is done locally on your machine or server; if you enable LLM-based detection for higher accuracy, data is sent to OpenRouter for classification before being returned to your agent.

    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