DevGuard-MCP
DevGuard-MCP is an MCP server that lets AI assistants safely audit, clean, and monitor developer workspaces for reclaimable artifacts and security risks.
scan_workspace: Discover reclaimable artifacts (node_modules, virtualenvs, caches, build outputs) and secret files with size filtering.
audit_workspace_secrets: Detect exposed
.envfiles, API keys, and credential leaks; get a health score and recommendations.preview_cleanup: Dry-run cleanup simulation to inspect target items and reclaimable space before deletion.
clean_workspace: Safely remove artifacts using trash quarantine or permanent deletion, with dry-run enabled by default.
get_workspace_health: Get a high-level overview of disk footprint, artifact counts, secret alerts, and category breakdowns.
get_audit_history: Retrieve historical scan and cleanup records for tracking workspace hygiene over time.
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., "@DevGuard-MCP scan this project for exposed .env files and secret leaks"
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.
🛡️ DevGuard-MCP
DevGuard-MCP is a fast, local, deterministic developer workspace auditor, safe cleaner, advanced security secret scanner, and Model Context Protocol (MCP) server.
✨ Features
🔍 Workspace Auditing: Detects reclaimable build artifacts, dependencies, and caches (
node_modules,.venv,.pytest_cache,__pycache__,target/,build/,dist/,.next/, logs).🔒 Advanced Security Engine:
High-Confidence Signatures: Real-time regex pattern matching for AWS Access Keys (
AKIA...), GitHub Tokens (ghp_...,github_pat_...), OpenAI API keys (sk-...), and Private RSA/SSH/EC keys.Shannon Information Entropy ($H$): Flags suspicious high-entropy pseudo-random tokens and passwords in configuration files.
Automated Secret Masking: Obfuscates sensitive credentials in logs and outputs (e.g.
sk-proj-abc1...****).
📜 SQLite History & Delta Tracking: Automatically logs workspace scans and cleanup events to a local SQLite database (
~/.devguard/history.db) to track workspace hygiene changes over time.🗑️ Safe Cleanup: Built-in safety mechanisms with dry-run previews, OS Recycle Bin / Trash quarantine (
send2trash), and protected system path verification.📊 Rich CLI: Beautiful terminal user interface powered by Typer and Rich (tables, progress bars, colored summaries, JSON outputs).
🤖 MCP Server: Native Model Context Protocol support to let AI assistants (Claude, Antigravity, Cursor, etc.) safely audit workspaces and diagnose security hygiene.
Related MCP server: trestle
🚀 Quick Start
Installation
Install via pip or run directly using uvx:
# Using pip
pip install devguard-mcp
# Or run ephemerally with uvx
uvx devguard-mcp --helpCLI Usage
# 🔍 Scan workspace for reclaimable artifacts
devguard scan
# 🔒 Run deep security audit (detects .env exposures and leaked API keys)
devguard audit
# 📜 View historical audit timeline and metric deltas
devguard history --limit 10
# 🗑️ Preview safe cleanup (dry-run simulation by default)
devguard clean --dry-run
# 🗑️ Clean specific artifacts into OS Recycle Bin
devguard clean --type node_modules --trash --execute🤖 MCP Server Configuration
Configure DevGuard with your MCP client (Claude Desktop, Antigravity IDE, Cursor):
Example mcp_config.json:
{
"mcpServers": {
"devguard": {
"command": "uvx",
"args": ["devguard-mcp"]
}
}
}Available MCP Tools
scan_workspace(path, max_depth, artifact_types, min_size_mb): Discover cleanable artifacts and disk usage.audit_workspace_secrets(path): Deep security audit detecting exposed credentials,.envfiles, and health scores.get_audit_history(path, limit): Query historical scan reports and cleanup logs.preview_cleanup(path, target_paths, artifact_types, older_than_days): Dry-run simulation of safe cleanup.clean_workspace(path, target_paths, artifact_types, mode, dry_run): Clean artifacts with safety boundaries.get_workspace_health(path): High-level overview of disk footprint and security health.
📄 License
MIT License © 2026 DevGuard Team
Available Tools
6 toolsaudit_workspace_secretsA
Audit workspace for security risks: untracked .env files, exposed API keys, and workspace hygiene.
Args: path: Root directory to audit.
Returns: Security audit report including health score (0-100), detected exposed .env files, embedded secret leaks, and hygiene recommendations.
Inputs: path. Returns: object
clean_workspaceA
Clean reclaimable developer artifacts with safety checks and Recycle Bin quarantine.
IMPORTANT: dry_run is True by default for safety. You must explicitly set dry_run=False to perform deletion.
Args: path: Root directory of the workspace. target_paths: Explicit paths to clean. If omitted, cleans all non-secret artifacts matching criteria. artifact_types: Filter specific artifact types to clean. mode: Deletion mode ('trash' for OS Recycle Bin quarantine, 'permanent' for direct deletion). dry_run: If True, simulates cleanup without removing files. Default is True.
Returns: Clean report with status of removed items, freed space, and any errors.
Inputs: mode, path, dry_run, target_paths, +1 more. Returns: object
get_audit_historyA
Retrieve historical workspace audit scans and cleanup activity logs.
Args: path: Optional workspace root directory to filter history. limit: Maximum number of records to return (default: 10).
Returns: Historical scan records and cleanup logs with totals and metrics.
Inputs: path, limit. Returns: object
get_workspace_healthA
Get high-level health overview and disk space metrics for a developer workspace.
Args: path: Workspace root directory.
Returns: Summary metrics (total reclaimable space, artifact count, secret alerts, category breakdown).
Inputs: path. Returns: object
preview_cleanupA
Dry-run simulation of workspace cleanup to inspect items and reclaimable space before executing.
Args: path: Root workspace path. target_paths: Optional list of explicit paths to clean. artifact_types: Optional list of artifact types to target. older_than_days: Only include artifacts inactive for at least N days.
Returns: Preview report with items that would be removed and total reclaimable bytes.
Inputs: path, target_paths, artifact_types, older_than_days. Returns: object
scan_workspaceA
Scan a developer workspace for reclaimable artifacts, build files, virtualenvs, caches, and secret files.
Args: path: Root directory to scan (defaults to current directory). max_depth: Max directory traversal depth (default: 6). artifact_types: Optional list of specific types to filter: ['node_modules', 'python_venv', 'python_cache', 'build_artifact', 'temp_logs', 'env_secret']. min_size_mb: Minimum item size in Megabytes to report (default: 0.0).
Returns: Structured scan report with discovered items, sizes, categories, and secret warnings.
Inputs: path, max_depth, min_size_mb, artifact_types. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Most tools have clearly distinct purposes: audit focuses on security risks, scan on reclaimable artifacts, preview/clean are paired, history and health are distinct. The only potential overlap is between audit_workspace_secrets and scan_workspace, as both may detect secrets, but their descriptions emphasize different objectives (security audit vs artifact discovery).
All tool names follow a consistent verb_noun pattern in snake_case (audit, preview, get, clean, scan), with only minor variation like audit_workspace_secrets adding an extra noun. The style is uniform and predictable, making it easy to infer behavior from names.
Six tools is well-scoped for a workspace hygiene server, covering scanning, auditing, previewing, cleaning, health metrics, and history. Each tool serves a distinct function without redundancy, and the count feels neither sparse nor bloated.
The surface covers the core lifecycle: scan (discover), audit (security), preview (simulate), clean (execute), plus health and history. Minor gaps exist such as no explicit tool for managing exclusion lists or restoring from recycle bin, but these are not critical for the primary workflow.
Maintenance
Related MCP Connectors
Checks AI-written code for leaked keys and made-up packages, on your machine. Never uploads code.
Lets coding agents check their own code for leaked secrets, risky dependencies and AI-code mistakes
Security scanner for AI-written code: SAST, secrets, dependencies, IaC, containers and DAST.
Deep security scans of repos you own from your editor: dependency CVEs, SAST, git-history secrets.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceLocal-first security check for AI coding agents — finds hardcoded secrets, exposed .env files, git-history leaks and vulnerable dependencies (OSV), entirely on your machine. Ask your agent "is this safe to ship?" and get a Launch Readiness score with a fix for every finding.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to scan source code for secrets like API keys and passwords locally without network requests.2Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to scan and audit environment files for leaked secrets, sanitize them, encrypt/decrypt vaults, and run processes with zero-disk secret injection.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to autonomously scan repositories and staged changes for leaked secrets, move exposed credentials into environment files, purge secrets from Git history, and verify remediation through deterministic tools.MIT