SecureAudit-MCP is a Model Context Protocol (MCP) server focused on C/C++ static code auditing and secure parsing of compiled PE/ELF binaries. It is designed to provide local system capabilities for AI programming assistants and agent loops, enabling them to inspect low-level binary compilation attributes or perform in-depth static security audits.
Purpose
AI programming assistants excel at writing code, but lack the local system capabilities to inspect low-level binary compilation attributes or perform in-depth static security audits. SecureAudit-MCP standardizes tools under the MCP protocol, giving AI agents native, sandboxed commands for inspecting critical logic and library errors in C/C++ source code files, parsing the binary hardening characteristics of local executables (Windows PE / Linux ELF), and safely extracting printable ASCII strings.
Key Capabilities
The server provides four core tools:
-
audit_source_code: Performs a lightweight static analysis scan on C/C++ source files. Checks include: unsafe standard library functions (strcpy, gets, sprintf, scanf); heap overflow risks (such as signed multiplication in malloc); format string vulnerabilities (printf(variable) instead of printf("%s", variable)); system-level command injection entry points (system()); basic memory leaks (mismatched malloc and free statements in loops).
-
check_binary_protections: Safely reads the raw binary header (first 1024 bytes) to check defensive security compilation flags. Capabilities include: identifying format magic signatures (PE for Windows executables, ELF for Linux); assessing architecture bitness (32-bit vs 64-bit); parsing DllCharacteristics in the PE optional header to check ASLR (Dynamic Base), DEP/NX (Data Execution Prevention), and SafeSEH; parsing the ELF type in the ELF header to identify PIE (Position Independent Executable) compilation.
-
safe_extract_strings: Safely parses ASCII string constants from compiled binary files (as a secure local implementation of the standard Linux strings CLI tool),used to identify hashes, embedded secrets, or hardcoded URLs.
-
remediate_vulnerability: Provides precompiled secure fix blocks and structured replacement code templates for all identified vulnerabilities.
How to Use
As a standard MCP server, it connects seamlessly with all major supported IDEs and CLI agents.
Claude Desktop: Add the configuration snippet to the Claude Desktop configuration file (on Windows, typically located at %APPDATA%\Claude\claude_desktop_config.json; on macOS, at ~/Library/Application Support/Claude/claude_desktop_config.json).
Cline (VS Code extension): In Cline settings, select the MCP Servers panel, click Create/Add MCP Server, and configure: name secureaudit-mcp, command node, argument /path/to/secureaudit-mcp/build/index.js.
Cursor: In Cursor Settings -> Beta Features -> MCP, click + Add New MCP Server, and configure: name secureaudit-mcp, type stdio, command node /path/to/secureaudit-mcp/build/index.js.
Local Quick Start and Development: Run the command in the repository root to compile the TypeScript files. The repository includes a pre-packaged vulnerable C file /demo/vulnerable.c, containing multiple security vulnerabilities for testing. The MCP agent will be able to automatically scan this file. You can use the MCP developer command-line inspector to manually inspect tool definitions (optional).
Use Cases
Suitable for development scenarios where an AI programming assistant is needed for C/C++ code security auditing, binary hardening feature inspection, string extraction, and vulnerability remediation recommendations. Particularly suitable for security researchers, developers, and teams using AI agents for code review.
Limitations
The materials do not provide information on performance limitations,Detailed information such as the supported maximum file size and specific dependency version requirements. The project uses the MIT License and can be used and distributed free of charge.