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).
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 ofprintf("%s", variable)). - System-level command injection entry points (
system()). - Basic memory leaks (unmatched
mallocvsfreestatement loops).
- Unsafe standard library functions (
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
DllCharacteristicsto 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
stringsCLI 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
- Name:
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
- Name:
💻 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.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。