Skip to main content
Glama
secureaudit-mcp
by rev2ret

πŸ›‘οΈ SecureAudit-MCP

A Model Context Protocol (MCP) Server for C/C++ Static Code Auditing & Compiled PE/ELF Binary Security Parsing.

Equip your AI Coding Agents (Claude Code, Cursor, Cline) with safe, low-level binary analysis and secure static code scanning tools.


πŸš€ Why SecureAudit-MCP?

AI Coding Assistants and Agentic loops are incredible at writing code, but they lack local system capabilities to check low-level binary compilation properties or perform deep static secure auditing.

SecureAudit-MCP solves this by standardizing tools under the Model Context Protocol (MCP). By registering this server, your AI agent gains native, sandboxed commands to inspect C/C++ source code files for severe logic and library errors (like buffer overflows, format vulnerabilities, and command injections), parse local executables (Windows PE / Linux ELF) for binary hardening features (ASLR, DEP/NX, PIE), and extract printable ASCII strings securely.


Related MCP server: mcp-skylos

πŸ› οΈ Features & Tools

1. audit_source_code

  • Purpose: Performs lightweight static analysis scans on C/C++ source files.

  • Checks:

    • Unsafe standard library functions (strcpy, gets, sprintf, scanf).

    • Heap overflow risks (like signed multiplications inside malloc).

    • Format string vulnerabilities (printf(variable) instead of printf("%s", variable)).

    • System-level command injection entry points (system()).

    • Basic memory leaks (unmatched malloc vs free statement loops).

2. check_binary_protections

  • Purpose: Safely reads raw binary headers (first 1024 bytes) to check for defensive security compile flags.

  • Capabilities:

    • Identifies formatting magic signatures (PE for Windows executables, ELF for Linux).

    • Evaluates architecture sizes (32-bit vs 64-bit).

    • In PE optional headers, parses DllCharacteristics to check for ASLR (Dynamic Base), DEP/NX (Data Execution Prevention), and SafeSEH.

    • In ELF headers, parses ELF type to identify PIE (Position Independent Executable) compiling.

3. safe_extract_strings

  • Purpose: Securely parses ASCII string constants from compiled binaries (acting as a safe, local implementation of the standard Linux strings CLI utility) to identify indicator hashes, embedded secrets, or hardcoded URLs.

4. remediate_vulnerability

  • Purpose: Supplies pre-compiled secure remediation blocks and structured replacement code templates for all identified vulnerabilities.


🎨 Architecture Flow

 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”             β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”             β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β”‚  AI Agent Clientβ”‚ ──────────> β”‚ SecureAudit-MCP β”‚ ──────────> β”‚ Target Code /  β”‚
 β”‚  (Claude/Cline) β”‚ <────────── β”‚ (TypeScript SDK)β”‚ <────────── β”‚ Binary File    β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  JSON-RPC   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ File Read   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ”Œ Integration & Client Setup

Since this is a standard Model Context Protocol (MCP) server, it connects seamlessly with all major supporting IDEs and CLI agents.

1. Claude Desktop

Add this configuration snippet to your Claude Desktop configuration file (typically located at %APPDATA%\Claude\claude_desktop_config.json on Windows or ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "secureaudit-mcp": {
      "command": "node",
      "args": [
        "/path/to/secureaudit-mcp/build/index.js"
      ]
    }
  }
}

2. Cline (VS Code Extension)

In your Cline settings, select the MCP Servers panel:

  • Click Create/Add MCP Server.

  • Configure:

    • Name: secureaudit-mcp

    • Command: node

    • Args: /path/to/secureaudit-mcp/build/index.js

3. Cursor

In Cursor Settings -> Beta Features -> MCP:

  • Click + Add New MCP Server.

  • Configure:

    • Name: secureaudit-mcp

    • Type: stdio

    • Command: node /path/to/secureaudit-mcp/build/index.js


πŸ’» Local Quickstart & Development

1. Install & Build

Run the following commands inside the repository root to compile TypeScript files:

npm install
npm run build

2. Run Tools against the Demo Suite

This repository includes a pre-packaged vulnerable C file inside /demo/vulnerable.c containing various security vulnerabilities for testing purposes.

Your MCP agent will be able to scan this file automatically. To inspect the tool definitions manually using the MCP developer command-line inspector (optional):

npx @modelcontextprotocol/inspector node build/index.js

πŸ“„ License

MIT License. Free to use and distribute under open-source terms.

Available Tools

4 tools
audit_source_codeA

Scans C/C++ source code files for critical secure coding issues such as stack buffer overflows, gets/strcpy usage, format string exploits, command injections, and memory leaks.

Inputs: filePath (required).

check_binary_protectionsA

Parses compiled binary files (Windows PE .exe/.dll or Linux ELF executables) to verify active defensive compiler protections including ASLR, DEP/NX, SafeSEH, and PIE.

Inputs: filePath (required).

remediate_vulnerabilityB

Provides pre-compiled secure remediation templates and code blocks to safely replace vulnerable C/C++ segments.

Inputs: vulnerabilityType (required).

safe_extract_stringsB

Safely extracts print-printable ASCII strings from local binary files (mimicking the Linux 'strings' utility) to look for indicators, secrets, or hardcoded URLs.

Inputs: filePath (required), minLength.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool covers a distinct area of security auditing: source code scanning, binary protection verification, vulnerability remediation, and string extraction. No overlap in purposes.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in snake_case (audit_source_code, check_binary_protections, remediate_vulnerability, safe_extract_strings).

    Tool Count5/5

    Four tools is well-scoped for a security auditing server, covering the main stages of analysis, remediation, and information gathering without being excessive or insufficient.

    Completeness4/5

    The tool set covers source code auditing, binary protection checks, remediation, and string extraction. Minor gaps such as dynamic analysis or report generation are present, but core workflows are effectively supported.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A prompt-validation service that checks incoming prompts against security rules, blocking those matching high-severity security or jailbreak patterns while authorizing safe prompts.
      14
      MIT
    • A
      license
      A
      quality
      A
      maintenance
      Skylos MCP server exposes static analysis as tools for AI coding agents β€” scan any Python, TypeScript, or Go codebase for dead code, security vulnerabilities, and quality issues directly from Claude, Cursor, or any MCP-compatible client. Returns findings with file paths, line numbers, and severity so agents can auto-fix issues in context.
      24
      18,490 PyPI
      936
      Apache 2.0
    • F
      license
      Not graded
      quality
      D
      maintenance
      Local MCP server that scans code for security issues (secrets, dependencies, configurations, risky patterns) and integrates with GitHub Copilot in VS Code for automated pre-commit reviews.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Security scanning MCP server. Semgrep integration, SARIF parsing, baseline diffing, framework-aware ruleset selection, and automated finding triage.
      4 npm
      1
      MIT