secureaudit-mcp

secureaudit-mcp

An AppSec-focused MCP server that performs static analysis scans on C/C++ source code for memory-safety vulnerabilities and parses compiled PE/ELF binary headers locally to audit active defensive compiler mitigations (ASLR, DEP/NX, PIE).

Category
Visit Server

README

πŸ›‘οΈ 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.


πŸ› οΈ 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.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured