code-audit-mcp
Enables automated code auditing for JavaScript projects, including AST parsing, taint tracking, and vulnerability detection.
Enables automated code auditing for PHP projects, including AST parsing, taint tracking, and vulnerability detection (e.g., SQL injection, deserialization).
Enables automated code auditing for Python projects, including AST parsing, taint tracking, and vulnerability detection.
Enables automated code auditing for TypeScript projects, including AST parsing, taint tracking, and vulnerability detection.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@code-audit-mcpaudit the login module for SQL injection and XSS"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Code Audit MCP Server
An automated code audit tool based on Large Language Models (LLM) and the Model Context Protocol (MCP).
Features
Code Semantic Parsing: AST parsing, type inference, taint marking
Call Chain Tracing: Cross-file/cross-module data flow tracing
Vulnerability Validation: Automatically generate PoCs and execute validation
Multi-language Support: PHP, Python, Java, JavaScript/TypeScript
Related MCP server: Code Audit MCP Server
Quick Start
Requirements
Node.js >= 18.0
TypeScript >= 5.0
Cursor / Windsurf (MCP-capable IDE)
Installation
git clone https://github.com/kkk1259/code-audit-mcp.git
cd code-audit-mcp
npm install
npm run buildConfiguration
Configure the MCP Server in Cursor:
// .cursor/mcp.json
{
"mcpServers": {
"code-audit": {
"command": "node",
"args": ["./dist/server.js"],
"env": {
"PROJECT_ROOT": "/path/to/your/project"
}
}
}
}Usage Examples
SQL Injection Audit
用户: 请审计这个项目的SQL注入漏洞
AI: 我将使用MCP工具进行系统性审计。
首先,识别所有用户输入源和SQL执行点...Deserialization Vulnerability Discovery
用户: 检查是否存在反序列化漏洞
AI: 我将分析项目中的unserialize调用,并追踪POP链...Tool List
Tool Name | Function | Parameters |
| Parse source code AST |
|
| Find function callers |
|
| Trace data flow |
|
| Generate vulnerability PoC |
|
Project Structure
code-audit-mcp/
├── src/
│ ├── server.ts # MCP Server入口
│ ├── tools/
│ │ ├── parser.ts # AST解析
│ │ ├── callgraph.ts # 调用链追踪
│ │ ├── verifier.ts # 漏洞验证
│ │ └── poc.ts # PoC生成
│ ├── rules/
│ │ ├── php.json # PHP安全规则
│ │ ├── python.json # Python安全规则
│ │ └── java.json # Java安全规则
│ └── utils/
│ ├── taint.ts # 污点分析
│ └── sanitizer.ts # 过滤函数识别
├── prompts/
│ ├── audit-system.md # 系统Prompt
│ └── vuln-types/ # 各漏洞类型Prompt
├── tests/
├── package.json
└── README.mdBest Practices
✅ Do
Audit by module; don't feed the entire project at once
Run static tools first to get suspicious points, then use AI for in-depth analysis
Prepare dedicated Prompts for each vulnerability type
Let the AI understand the project structure (entry points, routes, database) before auditing
Manually review AI reports, especially "high-risk" findings
Save audit history for Prompt iteration and optimization
❌ Don't
Don't blindly trust AI reports; false positives are inevitable
Don't describe overly complex audit logic in Prompts
Don't skip the vulnerability validation step
Don't use cloud APIs for sensitive projects (use local models)
Don't ignore business logic vulnerabilities (AI is weaker at these)
Expected Results
Vulnerability Type | Recall Rate | Precision Rate |
Injection vulnerabilities | 80%+ | 75%+ |
Deserialization | POP chain discovery capability exceeds manual | - |
Logic vulnerabilities | Still requires manual audit as primary | - |
Overall efficiency: 3-5x improvement (including manual review time)
License
MIT License
Related Articles
Contributing
Issues and PRs are welcome!
Contact
GitHub: kkk1259
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI-powered Java source code vulnerability auditing through function-level taint analysis. Performs reverse tracking from dangerous functions to external entry points to automatically discover potential security vulnerability chains.115
- AlicenseBqualityCmaintenanceAn AI-native code security audit MCP server that supports multi-language AST analysis, call graph analysis, vulnerability detection, and AI deep audit.71MIT
- AlicenseNot gradedqualityDmaintenanceMulti-language SAST and AI-powered fuzzing MCP server for Claude Code integration, enabling static and dynamic security analysis of code.MIT
- FlicenseNot gradedqualityCmaintenanceA high-precision logical vulnerability auditing tool that uses MCP and CodeGraph for automated 0-day discovery and verification in multi-language codebases.
Related MCP Connectors
Zero-config MCP security scanner for AI-generated apps. 25K+ vulnerability patterns.
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
MCP server for static security analysis of Android source code
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kkk1259/code-audit-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server