# AirgapGuard: Offline Secret & PII Masker for AI Agents

> 100% offline MCP server that automatically masks and locally restores API keys, passwords, and PII in AI prompts.

AirgapGuard: Offline Secret & PII Masker for AI Agents is a paid AI agent skill on Agensi by Chethanraj D.S, in LLM Ops. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $19.99 (one-time purchase)
- Creator: [Chethanraj D.S](https://www.agensi.io/creators/chethanraj-d-s)
- Category: [LLM Ops](https://www.agensi.io/skills/llm-ops)
- Version: 1.0
- Last updated: 2026-11-28
- Security: scan passed (2026-11-28); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/airgapguard-offline-secret-pii-masker-for-ai-agents
- Tags: mcp, security, secrets, pii, redaction, entropy, offline, air-gapped

## About this skill

Sharing configuration files or logs with AI agents often leads to accidental leaks of API keys, database strings, and PII. This skill provides a 100% offline MCP server that scrubs sensitive data before it reaches the model and restores it locally after code generation.

### What it does
- **Redact Sensitive Data** Scans text to replace credentials, private keys, and PII with reversible placeholders.
- **Restore Secrets Locally** Re-inserts original credentials into generated code or patches without exposing them to the LLM.
- **Audit Workspace Security** Scans directory trees for exposed `.env` files, SSH keys, and certificates to assess risk.
- **Shannon Entropy Detection** Identifies unformatted passwords or raw tokens by calculating character randomness.
- **Synthetic Mocking** Generates safe, inert environment variables for testing without using real production values.

### How it works
1. **Sanitize** Use `airgap_sanitize_text` to scrub code or logs, receiving a `session_id` and masked placeholders.
2. **Process** Pass the sanitized version to the AI agent for analysis or refactoring.
3. **Desanitize** Use `airgap_desanitize_patch` with the `session_id` to swap placeholders back for real secrets before saving.
4. **Audit** Run `airgap_audit_workspace` on new repos to find and fix tracking leaks.

### Frameworks & tools
This skill is built for the Model Context Protocol (MCP). It integrates with Claude Code, Cursor, Windsurf, GitHub Copilot, and any standard MCP client.

### Why this beats prompting it yourself
Prompt-based redaction is unreliable because the model still "sees" the secrets in the context window before scrubbing them. This tool processes data locally on your machine, ensuring sensitive strings never leave your environment.

### Use cases
- Reviewing production logs or `.env` files within an AI chat interface.
- Generating git patches that require local database connection strings.
- Scanning a legacy codebase for hardcoded keys and high-entropy tokens.
- Complying with zero-trust policies in regulated FinTech or Healthcare sectors.

### Known limitations
Secret mappings reside strictly in memory and are lost if the MCP server process restarts. It requires a local Python environment to run the server.

## Requires

- Python
- Git

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the AirgapGuard: Offline Secret & PII Masker for AI Agents skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does Airgapguard MCP prevent secrets from reaching the AI model?

Airgapguard MCP acts as a local buffer that redacts sensitive strings like API keys and PII before they are sent to an LLM, then restores them locally after the AI provides its output, ensuring your actual secrets never leave your machine.

### Which AI agents and IDEs can I use this skill with?

This skill is designed for the Model Context Protocol (MCP) and is fully compatible with popular AI-integrated environments including Claude Code, Cursor, Windsurf, and GitHub Copilot.

### Why shouldn't I just ask the AI to redact the information itself?

Unlike prompt-based instructions which require the model to see the data to redact it, this tool processes your data locally on your hardware, providing a true 'air-gapped' security layer that isn't dependent on model compliance.

### Can I use this to audit my existing project for previously leaked credentials?

Yes, the Shannon Entropy Detection feature allows you to scan entire directory trees to find unformatted passwords, raw tokens, or high-entropy strings that might be hidden in your codebase.

### What happens to the redacted data after a session ends?

For security, secret mappings are stored strictly in-memory during a session; if the MCP server process restarts, the active session IDs and their corresponding redaction maps are cleared.

### What is included in the purchase of this skill?

The package includes the MCP server source code, installation instructions for local Python environments, and a guide for integrating the server with your preferred MCP-compatible agent.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
