CodeMind
An AI Security Guardian MCP server that provides real-time vulnerability scanning, secrets detection, and secure coding enforcement for AI-generated code in modern web frameworks.
README
CodeMind — AI Security Guardian
<p align="center"> <pre align="center">
/ _ | | | / () __ | |
/ / / _ \ / _ |/ _ \ |\/| | | '_ \ / _ |
/ /| () | (| | __/ | | | | | | | (| |
_/_/ _,|__|| |||| ||_,_|
</pre>
</p>
<p align="center"> <strong>🛡️ Enterprise-Grade Security for AI-Generated Code</strong><br> <em>Think before ship.</em> </p>
<p align="center"> <a href="https://pypi.org/project/codemind-mcp/">📦 PyPI</a> • <a href="https://codemind-ai.github.io/codemind">📖 Documentation</a> • <a href="#installation">🚀 Quick Start</a> • <a href="#available-tools">🔧 Tools</a> </p>
<p align="center"> <a href="https://pypi.org/project/codemind-mcp/"> <img src="https://img.shields.io/pypi/v/codemind-mcp.svg" alt="PyPI Version"> </a> <img src="https://img.shields.io/badge/python-3.10+-green.svg" alt="Python"> <img src="https://img.shields.io/badge/MCP-Native-purple.svg" alt="MCP"> <img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License"> <img src="https://img.shields.io/badge/privacy-100%25%20local-brightgreen.svg" alt="Privacy"> </p>
Technical Overview
CodeMind transforms your AI coding assistant (Cursor, Windsurf, Claude Desktop) into a full security platform for the modern web. Specialized for Next.js, React, and TypeScript, it provides real-time oversight of AI-generated code across five security dimensions.
Core Capabilities
| Module | Description |
|---|---|
| Modular Skills | Plugin-based agentic personas (Security, UI, Docs) with specialized prompts. |
| Safety Lock | Hard-coded protection against DROP, TRUNCATE, and unconditional DELETE. |
| Intent Discovery | Automatic detection of the optimal skill/persona for any given task. |
| SAST Engine | Detection of SQL injection, XSS, SSRF, and command injection patterns. |
| Prompt Security | Specialized detection for prompt injection and leak vulnerabilities. |
| Secrets Detection | Identification of hardcoded API keys and tokens with entropy analysis. |
| IaC Scanning | Security auditing for Dockerfiles, GitHub Actions, and docker-compose. |
Quick Start
1. Installation
Install the core engine from PyPI:
pip install codemind-mcp
2. MCP Configuration
Add CodeMind to your claude_desktop_config.json (or equivalent MCP client config):
{
"mcpServers": {
"codemind": {
"command": "codemind",
"args": ["serve"],
"env": {
"CONTEXT7_API_KEY": "your_optional_key_here"
}
}
}
}
Usage
Simply include the trigger phrase in your chat prompt:
"Generate a login endpoint for FastAPI. use codemind"
Instant SaaS Protection
When you use the use codemind trigger, the Guardian automatically enforces essential protections for modern SaaS applications:
- Rate Limiting: Automatic protection against DDoS and brute-force attacks.
- Data Isolation: Enforcement of Row Level Security (RLS) to ensure users only access their own data.
- Zod Validation: Strict server-side schema validation to prevent untrusted client data from reaching your database.
- Next.js & React Hardening: Automated detection of unsafe
dangerouslySetInnerHTML, exposedNEXT_PUBLIC_secrets, and insecurelocalStoragepatterns. - CSRF Protection: Auditing for missing security headers and insecure client-side data mutations.
- Secure Default Props: Enforcement of TypeScript best practices to eliminate "undefined" security gaps.
- Prompt Security: Hardened system prompts and injection-resistant templates for AI feature implementations.
Available Tools
CodeMind exposes 15 MCP tools for seamless automated workflows:
guard_code: Static analysis for vulnerabilities (including Prompt Injection).detect_intent: 🧠 Automatically identifies the best Skill for a given task.activate_skill: Manually switch between agentic personas (Security, UI, Docs).run_workflow: 🚀 Execute complex multi-step actions (e.g.,/deploy,/audit-deep).list_skills: View all available modular personas and their capabilities.audit_prompt: Specialized analyzer for AI prompt security and leaks.scan_secrets: Entropy-based credential detection.scan_dependencies: Software Composition Analysis (SCA).scan_iac_file: Infrastructure-as-Code auditing.deep_security_scan: Consolidated multi-layer analysis.
Strategic Roadmap
The transition from a hackathon project to a foundational security primitive.
Phase 1: Foundation (Vibeathon Momentum)
- [x] Initial MCP Server: Secure bridge between IDE and AI.
- [x] Core SAST Engine: 50+ deep-scan rules for modern web.
- [x] Secrets & SCA: Entropy-based scanning and dependency auditing.
- [x] Prompt Security: Industry-leading injection & jailbreak detection.
- [ ] Vibeathon Grand Finale: Winning the vibeathon (goal!!)
Phase 2: Intelligence & Personas (Ahead of Schedule)
- [x] Modular Skill System: Plugin-based architecture for Security, UI, and Docs experts.
- [x] Intent Discovery: Real-time semantic task classification.
- [x] AI Slop Detection: Eliminating redundant commentary from AI responses.
- [x] Safety Lock: Hard-coded constraints for destructive database operations.
- [x] Semantic Analysis: AST-based auditing for Python & JavaScript.
Phase 3: Total Autonomy (The Scale Phase)
- [ ] Self-Healing Code: Autonomous fix-verify loops for complex vulnerabilities.
- [ ] Project-Wide Reasoning: Cross-file dependency analysis and taint-tracking.
- [ ] CI/CD Native: Seamless integration with GitHub Actions as a first-class security citizen.
- [ ] Local LLM Fine-tuning: Custom models optimized for security-first code generation.
Phase 4: Global Transformation (YC & Beyond)
- [ ] Universal Security Primitive: The default security layer for all AI-driven development.
- [ ] Real-time Runtime Protection: Monitoring AI-agent actions in production environments.
- [ ] Enterprise Autonomous Guardian: Team-wide security analytics with zero data leak.
- [ ] The AI-Sec Standard: Leading the certification for secure AI-assistants.
Privacy Policy
CodeMind is built on the principle of Local-First Security.
- Your source code never leaves your machine.
- All pattern matching and analysis are performed locally.
- SCA requests to OSV.dev contain only package names and versions.
- No telemetry or tracking scripts are included.
License
Distributed under the MIT License. See LICENSE for more information.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。