Skip to main content
Glama

DefAudit MCP

A small Python MCP server that lets Claude Code, Antigravity, and other MCP clients work with an existing DefAudit installation.

Available tools:

  • list_projects — list active projects and the latest scan for each one.

  • start_scan — start a scan on an existing project and optional branch.

  • list_scans — list recent project scans.

  • get_scan — read status, progress, timestamps, and severity totals.

  • get_scan_results — read all findings, including their current disposition.

  • mark_false_positive — mark a finding and its matching project-wide fingerprint as false positive.

  • unmark_false_positive — remove that false-positive mark.

Prerequisites

  • Python 3.10 or newer.

  • pipx (python3 -m pip install --user pipx).

  • A DefAudit installation that includes the /api/mcp/v1 API.

  • A personal app token from Settings → Profile → Personal app token. Copy the secret when it is created; DefAudit stores only its hash and cannot display it again.

The token acts as its owner. Viewers can read projects and scans, users can also start scans, and managers/administrators can additionally mark or restore false positives. Disabling the account or token revokes access immediately.

Related MCP server: scopeguard-mcp

Quick install: Claude Code

Replace the URL and token, then run:

claude mcp add --scope user \
  defaudit \
  -e DEFAUDIT_URL=https://defaudit.example.com \
  -e DEFAUDIT_APP_TOKEN=defa_pat_REPLACE_ME \
  -- pipx run --spec git+https://github.com/intellisoftalpin/defaudit-mcp.git defaudit-mcp

Verify the connection:

claude mcp get defaudit

Quick install: Antigravity (formerly Gemini)

Replace the URL and token, then run:

antigravity --add-mcp '{"name":"defaudit","command":"pipx","args":["run","--spec","git+https://github.com/intellisoftalpin/defaudit-mcp.git","defaudit-mcp"],"env":{"DEFAUDIT_URL":"https://defaudit.example.com","DEFAUDIT_APP_TOKEN":"defa_pat_REPLACE_ME"}}'

Alternatively, open Agent → MCP Servers → Manage MCP Servers → View raw config, then add this server to mcpServers:

{
  "mcpServers": {
    "defaudit": {
      "command": "pipx",
      "args": [
        "run",
        "--spec",
        "git+https://github.com/intellisoftalpin/defaudit-mcp.git",
        "defaudit-mcp"
      ],
      "env": {
        "DEFAUDIT_URL": "https://defaudit.example.com",
        "DEFAUDIT_APP_TOKEN": "defa_pat_REPLACE_ME"
      }
    }
  }
}

On Linux, the raw configuration file is normally ~/.gemini/antigravity/mcp_config.json. Restart the MCP server from the Antigravity MCP manager after saving.

Local development

git clone https://github.com/intellisoftalpin/defaudit-mcp.git
cd defaudit-mcp
python3 -m venv .venv
. .venv/bin/activate
python -m pip install -e '.[test]'
pytest

Run the stdio server directly:

DEFAUDIT_URL=https://defaudit.example.com \
DEFAUDIT_APP_TOKEN=defa_pat_REPLACE_ME \
defaudit-mcp

Optional environment variables:

Variable

Default

Meaning

DEFAUDIT_TIMEOUT

30

HTTP timeout in seconds.

DEFAUDIT_VERIFY_TLS

true

Set to false only for a trusted development instance using a self-signed certificate.

Security

  • Treat DEFAUDIT_APP_TOKEN like a password; never commit it.

  • Prefer a dedicated least-privilege DefAudit user for automation.

  • The server communicates over stdio and writes no protocol messages to stdout outside the MCP SDK.

  • False-positive changes require a reason and are recorded in the DefAudit audit log.

License

MIT

Available Tools

7 tools
get_scanB

Read scan status, progress, timestamps, and severity summary.

Inputs: scan_id (required). Returns: object

get_scan_resultsA

Read completed scan findings, including each finding's false-positive status.

Inputs: scan_id (required). Returns: object

list_projectsA

List active DefAudit projects and their most recent scan.

Inputs: no named parameters. Returns: object

list_scansA

List recent scans for a project. Limit must be between 1 and 100.

Inputs: project_id (required), limit. Returns: object

mark_false_positiveB

Mark a finding and matching findings in the project as false positives. A reason is required.

Inputs: reason (required), finding_id (required). Returns: object

start_scanA

Start a security scan for an existing project. Omit branch to use the project default.

Inputs: project_id (required), branch. Returns: object

unmark_false_positiveA

Remove the false-positive flag from a finding and matching findings in the project.

Inputs: finding_id (required). Returns: object

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 7 tools

    Disambiguation5/5

    Each tool targets a distinct action and resource: projects vs scans vs findings, with clear separation of listing, starting, reading status/results, and managing false positives. No overlap or ambiguity.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern using snake_case (e.g., list_projects, start_scan, mark_false_positive). The pattern is uniform and predictable.

    Tool Count5/5

    Seven tools cover the core scanning and false-positive management workflow without unnecessary bloat. The set is well-scoped for a security audit MCP server.

    Completeness4/5

    The surface covers project listing, scan initiation/status/results, and false-positive toggling. Minor gaps exist (e.g., no stop_scan or project creation), but the primary workflows are complete and no critical dead ends.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Enables policy-first defensive security operations for MCP, providing repository and web-security analysis with controlled authorization, scoped execution, and auditability.
      9
      1
      MIT
    • A
      license
      A
      quality
      F
      maintenance
      Enables interaction with the public Digital Asset Scan API to analyze digital assets, list assets, retrieve methodology, and poll asynchronous analysis jobs over MCP.
      4
      MIT
    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables querying SAST code quality and security data from SonarQube and Coverity Connect via MCP, including quality gates, issues, projects, streams, and defects.
      177 npm
      1
      -