Skip to main content
Glama
YoruichiYams

DevGuard-MCP

by YoruichiYams

πŸ›‘οΈ DevGuard-MCP

CI / Automated Testing PyPI version Python versions License: MIT

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: env-secret-exposure-analyzer-mcp

πŸš€ 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 --help

CLI 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, .env files, 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 tools
audit_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.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNo.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, description carries full burden; it discloses output contents (health score, detected .env files, leaks, recommendations) and 'audit' implies non-destructive, but it does not explicitly state that no workspace modifications are made or mention permissions/limitations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two compact sentences plus Args/Returns; no redundant or vague filler, and the key details are front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Description is self-sufficient for a simple one-param audit call: it covers purpose, parameter role, and return contents; it lacks sibling differentiation and edge-case notes, but nothing essential is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The only parameter 'path' is clarified as 'Root directory to audit', adding semantic meaning beyond the bare schema type/default, though it doesn't specify path format, traversal, or how default '.' is used.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Purpose states a specific action 'Audit workspace for security risks' and enumerates concrete scan targets (.env files, API keys, hygiene), but it does not distinguish itself from sibling tools such as scan_workspace or get_workspace_health.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to choose this tool instead of scan_workspace, clean_workspace, or preview_cleanup; no conditions or exclusions are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
modeNotrash
pathNo.
dry_runNo
target_pathsNo
artifact_typesNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly explains dry_run safety behavior, the difference between trash and permanent deletion, and that a clean report is returned. While it could elaborate on what 'safety checks' entail or the irreversibility of permanent mode, the core destructive behavior is disclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and front-loaded: a one-sentence summary, a prominent safety warning, a compact Args list, and a Returns note. Every sentence contributes directly to correct usage, and there is no redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers all parameters, the default safety behavior, both deletion modes, and the return value, which is sufficient for invoking the tool. It is slightly incomplete in that it does not discuss tool-selection tradeoffs with siblings or define the 'non-secret artifacts matching criteria' any further, but these are secondary to correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must fully compensate, and it does. Every parameterβ€”path, target_paths, artifact_types, mode, and dry_runβ€”receives a meaningful explanation beyond the raw schema types and defaults. This gives an agent enough context to invoke the tool correctly.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a clear verb and resource, 'Clean reclaimable developer artifacts', making the tool's purpose immediately understandable. It does not explicitly distinguish itself from siblings like preview_cleanup or scan_workspace, but the resource and action are specific enough to avoid confusion.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear operational guidance, especially the important dry_run default and the fact that explicit paths can be provided. However, it does not say when to use this tool versus preview_cleanup, scan_workspace, or other sibling tools, and no exclusions are stated. Usage context is mostly implied rather than explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNo
limitNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It does disclose that the call retrieves history and returns 'scan records and cleanup logs with totals and metrics,' which implies a read-only operation. However, it does not explicitly confirm non-mutating behavior, permissions, or pagination semantics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded: one clear purpose sentence followed by a terse Args section and a short Returns line. Every line adds information; there is no repetition of the schema or irrelevant details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter read-only history tool with an output schema, the description covers the purpose, both parameters, and the return shape. It does not mention authentication requirements or rate limits, but these are less critical for a low-risk retrieval operation, and the existing detail is largely sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description compensates by explaining both parameters: path is an optional workspace root directory filter, and limit is a maximum record count with a default of 10. This adds real meaning beyond the raw schema, only leaving ambiguous the exact path format and behavior when path is omitted.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb-object pair: 'Retrieve historical workspace audit scans and cleanup activity logs.' This clearly identifies the resource (audit history) and the action (retrieve), while 'historical' distinguishes it from sibling actions like scan_workspace or audit_workspace_secrets.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'historical workspace audit scans and cleanup activity logs' implies this is for past activity rather than current scans, but the description does not explicitly state when to use this tool instead of a sibling, nor does it name any alternatives or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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).

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNo.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure. It clearly frames the operation as a read-style 'Get' and describes the summary output, which is helpful. However, it does not explicitly state that the tool is non-mutating, whether deeper scanning occurs, or any permission/performance considerations, leaving some behavioral ambiguity.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and well-structured: a one-sentence purpose, an Args line, and a Returns line. There is no filler or repetition, and the most important information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read-only health check with a single optional parameter and an output schema, the description covers the essential calling information and summaries what will be returned. The main gap is the lack of explicit guidance on when to choose this tool over sibling scanning/cleanup tools, but that is a minor omission given the tool's straightforward nature.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema gives the parameter only a title ('Path'), a default, and a type, with no description. The tool description compensates by explaining that path is the 'Workspace root directory,' adding real meaning. It does not mention default behavior when omitted, but the schema already exposes that default, so the added semantics are sufficient.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear verb and resource: 'Get high-level health overview and disk space metrics for a developer workspace.' It also lists the returned metric categories, which helps define scope. However, it does not explicitly contrast itself with sibling tools like scan_workspace or audit_workspace_secrets, so it stops short of full differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'high-level health overview' implies this tool is for an initial or summary check, and the return categories suggest it surfaces broad issues before deeper action. But the description does not name alternatives or state when to prefer scan_workspace, preview_cleanup, or audit_workspace_secrets. Usage guidance is only implied, not explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNo.
target_pathsNo
artifact_typesNo
older_than_daysNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It does this well by explicitly stating this is a dry-run simulation and that it returns 'items that would be removed' and reclaimable bytes, establishing a non-destructive preview. It stops short of an absolute statement like 'no files will be modified', but the dry-run terminology strongly implies it.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is tightly structured with a one-sentence purpose, a clear Args section, and a Returns section. Every line earns its place, and the most important traitβ€”dry-run/previewβ€”is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with four optional parameters and an output schema, the description covers the input semantics and the return shape sufficiently. It could be slightly more complete by explicitly directing the agent to clean_workspace for actual execution or restating that no changes are made, but the existing content is adequate for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for missing parameter documentation. It does: every parameter is listed with a meaningful one-line explanation, and 'older_than_days' gains important context as 'inactive for at least N days'. This adds real semantics beyond the raw schema fields.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with 'Dry-run simulation of workspace cleanup', which names a specific verb (simulate/preview) and a clear resource (workspace cleanup). It also differentiates itself from the sibling clean_workspace by framing this as a preview 'before executing', so an agent can immediately tell it apart from the actual cleanup tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly implies the tool is for planning: inspect items and reclaimable space 'before executing'. It does not explicitly name clean_workspace as the alternative to run when actual cleanup is intended, but the dry-run framing and 'before executing' language provide clear contextual guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNo.
max_depthNo
min_size_mbNo
artifact_typesNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full behavioral burden. It does disclose the return shape ('Structured scan report with discovered items, sizes, categories, and secret warnings'), and the word 'scan' implies read-only behavior. However, it never explicitly states that it does not modify or clean the workspace, nor does it disclose permission needs or runtime implications.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact, front-loaded with the core purpose, and uses clear Args/Returns sections. Every line adds useful information, and the artifact_types list is necessary because the schema lacks enums. Nothing is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the tool's purpose, all parameters, defaults, allowed filter values, and return report, so an agent can invoke it correctly. It is slightly incomplete only in not providing sibling routing or an explicit read-only guarantee, but for a pure-scan tool with an output schema this is nearly sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does thoroughly. It documents all four parameters with defaults and adds meaning absent from the schema, especially the allowed artifact_types list ('node_modules', 'python_venv', 'python_cache', 'build_artifact', 'temp_logs', 'env_secret'). This gives the agent everything needed to construct valid arguments.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource ('Scan a developer workspace') and enumerates concrete target categories: build files, virtualenvs, caches, and secret files. It does not explicitly differentiate itself from siblings like audit_workspace_secrets or clean_workspace, so it lacks explicit sibling distinction but is still clear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The main sentence implies when to use it: when you need a scan report of reclaimable artifacts in a workspace. However, it never tells the agent when not to use this tool or how it compares to alternatives such as audit_workspace_secrets, preview_cleanup, or clean_workspace. This leaves routing decisions to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 6 tool updatesv0.1.0
    • First observedaudit_workspace_secrets
    • First observedclean_workspace
    • First observedget_audit_history
    • First observedget_workspace_health
    • First observedpreview_cleanup
    • First observedscan_workspace

TDQS

A3.9/5.0

Scored across 6 tools

Disambiguation4/5

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).

Naming Consistency5/5

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.

Tool Count5/5

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.

Completeness4/5

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

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    Local-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
  • A
    license
    A
    quality
    B
    maintenance
    Provides AI coding agents with structured, evidence-based diagnostics about the local development environment, detecting tech stack, runtime mismatches, dependency state, services, ports, and Git status without exposing secrets or using network calls.
    10
    Apache 2.0