agent-cache-guard-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
agent-cache-guard
Zero-proxy LLM FinOps prompt-cache linter, session-distilled least-privilege allowlist generator, SHA-256 READ_ONLY_LOCKDOWN audit chain, context/ZIP leak scanner, and interactive MCP App.
Silent prompt-cache invalidation (timestamps in CLAUDE.md/GEMINI.md, shuffled JSON tool keys, 1h TTL after 5m, Bedrock top-level cache_control, or >20-block lookback gaps) inflates LLM input bills 2× to 10×. Meanwhile, wildcard .claude/settings.json rules and uninspected .zip/context exports expose agent sandboxes to prompt injection and credential leaks.
agent-cache-guard solves both locally and in CI with zero npm dependencies (Node.js ≥ 20 standard library only) and zero traffic proxying.
Quickstart
1. Install as Agent Skills (skills.sh compatible)
Works across Claude Code, Antigravity, Cursor, Codex, and Windsurf:
npx skills add paul1064/agent-cache-guardIncluded skills under skills/:
prompt-cache-check— Lints Claude 5/5.5/Fable/Mythos, Bedrock & Gemini payloads, diffs consecutive turns (tools→system→messages), scansGEMINI.md/AGENTS.md/CLAUDE.md/SKILL.mdfor volatile prefixes, and computes realizedusagehit rates & savings.permission-allowlist— Distills strictly read-only.claude/settings.jsonallowlists from JSONL session transcripts and rejects wildcard mutations or shell chaining.sandbox-self-heal— Auditsenvironment.yamlallowed_hosts, blocks token-in-URL leaks, checks RAM headroom, and cleans orphaned.ck.tmp/.check.patchartifacts.lockdown-audit-chain— O(1) SHA-256 tamper-evident audit ledger, constant-time token check, shell-segment classifier, andREAD_ONLY_LOCKDOWNcircuit breaker.unified-memory-sync— Pure-Node.zipCentral-Directory &.htmlscanner catching API keys, Luhn payment cards, IBANs, local paths, and EN/DE prompt-injection directives, plus deterministic dated fact conflict resolution.
2. Run the Unified CLI
# Run full 0-100 FinOps & Security scorecard on any repository
node ./bin/agent-cache-guard.mjs audit-all .
# Lint a Messages API payload & compute ROI from usage logs
node ./bin/agent-cache-guard.mjs cache request skills/prompt-cache-check/examples/request-good.json
node ./bin/agent-cache-guard.mjs cache usage skills/prompt-cache-check/examples/usage.jsonl --model claude-opus-5-5 --min-hit 0.7
# Distill a safe read-only .claude/settings.json from session transcripts
node ./bin/agent-cache-guard.mjs allowlist generate skills/permission-allowlist/examples/sample-transcript.jsonl
# Test a shell command against emergency READ_ONLY_LOCKDOWN
node ./bin/agent-cache-guard.mjs lockdown check-cmd "git status && rm -rf /" --lockdown3. Add as a GitHub Action PR Gate
- name: Agent Cache & Security Guard
uses: paul1064/agent-cache-guard@v1
with:
target-dir: "."
usage-file: "./logs/usage.jsonl"
model: "claude-sonnet-5-5"
min-hit-rate: "0.75"4. Connect the MCP Server & Interactive Waterfall UI (@modelcontextprotocol/ext-apps)
agent-cache-guard-mcp runs over stdio and serves ui://agent-cache-guard/waterfall.html (text/html;profile=mcp-app)—rendering an interactive Prefix Cache Waterfall (tools → system → messages), Monthly LLM FinOps ROI Estimator, and READ_ONLY_LOCKDOWN Command Simulator directly inside Antigravity, Claude Desktop, VS Code Copilot, and Goose.
{
"mcpServers": {
"agent-cache-guard": {
"command": "node",
"args": ["./src/mcp-server.mjs"]
}
}
}MCP Tool | Purpose |
| Lints/diffs requests, audits rule files, calculates |
| Audits |
| Scans text, folders, |
| Evaluates shell chains under |
| Probes sandbox |
Related MCP server: aiops-field-notes-mcp
Architecture
flowchart LR
A["Rules & Payloads (CLAUDE.md / JSON / JSONL)"] --> B["Prompt-Cache-Check (pcc.mjs)"]
C["Session Transcripts & Settings"] --> D["Permission-Allowlist + Lockdown Chain"]
E["Context Folders & .zip Archives"] --> F["Unified-Memory-Sync + Sandbox Probe"]
B --> G["CLI / GitHub Action / MCP Server"]
D --> G
F --> G
G --> H["Interactive MCP App (ui://agent-cache-guard/waterfall.html)"]Pro Packs, Playbooks & B2B FinOps Audits
Need production org policy packs, multi-agent workflow playbooks, or a hands-on FinOps & security architecture review? Grab the official companions on Gumroad:
Tier | What You Get | Price | Link |
Antigravity Duo | Antigravity für Einsteiger + Yodas — step-by-step multi-agent setup, byte-identical prompt-cache hygiene & swarm workflows. | €24 | |
FinOps Pro Pack | Multi-repo GitHub Action PR comment scorecards, Bedrock/Vertex org policy templates, 1h-vs-5m TTL calculators & strict MCP allowlist presets. | €39 | |
1:1 B2B FinOps & Security Audit | Hands-on prefix-cache architecture refactor (80–95% cached input target), least-privilege MCP lockdown, and cryptographic SHA-256 audit ledger integration. | €990 |
Storefront & bundle catalog: https://nobis23.gumroad.com · Main Hub & 15 Kitchen Books: https://nobis23-werkstatt.netlify.app/ (#buecher · #forge) · Live Interactive Hub: THE WONDER ENGINE
Development & Verification
node --test
node ./bin/agent-cache-guard.mjs audit-all .License
MIT © paul1064
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Scans untrusted web pages, emails, MCP responses, or A2A payloads for hidden prompt injections an.
Cryptographic 563-leaf LLM rate oracle, context-cliff auditor, and prompt cache optimizer.
Detects database migration table locks, terraform cost leaks, and OWASP API flaws.
Checks AI-written code for leaked keys and made-up packages, on your machine. Never uploads code.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables enterprise MCP security auditing through 12 deterministic no-LLM tools for evidence-gated claims, skill/prompt supply-chain audits, token profiling, and server auth-mode checks.MIT
- AlicenseAqualityBmaintenanceEnables engineers to estimate LLM costs, check GPU VRAM fit, audit MCP configs for security risks, and analyze network device config changes and compliance—all locally, with no account or telemetry.7MIT
- AlicenseNot gradedqualityBmaintenanceEnables real-time injection fuzzing and canary-based exfiltration detection over untrusted prompts, RAG context, and agent actions, with entropy analysis, outbound channel interception, least-privilege sandboxing, and cryptographic audit proofs.7MIT
- AlicenseNot gradedqualityCmaintenanceEnables developers to audit local MCP server code for prompt injection surfaces, unconstrained shell execution, hardcoded secrets, and JSON-RPC schema issues, and to fuzz system prompts against jailbreak payloads. It also generates Shields.io-compatible verification badges for embedding in repository READMEs.27 npmApache 2.0