Analyzes repositories, detects code hotspots, calculates complexity, and creates structured refactoring plans through MCP.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent ā or use 1-click editor setup below.
š” Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Code Guardian.
phuongrealmax/code-guardian MCP server, also called Code Guardian Studio or CCG, provides MCP tools for analyzing and refactoring large code repositories. Its optimizer can map a repository, calculate complexity and nesting metrics, score hotspots, create refactoring plans, record optimization sessions, and generate Markdown reports.
The server also includes modules for persistent memory, guard rules, workflow management, multi-phase reasoning, specialized agents, structured thinking, documentation management, and test-runner integration. Guard rules are intended to block dangerous patterns such as fake tests and empty catch blocks. The README describes more than 113 MCP tools across these capabilities.
The main workflow starts by initializing CCG in a project and scanning the codebase. A quickstart command combines initialization, repository scanning, complexity analysis, hotspot detection, and report generation. Developers can instead run the optimizer manually and request a report or advanced options.
The optimizer exposes focused operations such as code_scan_repository, code_metrics, code_hotspots, code_refactor_plan, code_record_optimization, code_generate_report, code_quick_analysis, and code_optimizer_status. These operations let an agent move from repository inventory to prioritized findings and planned changes without treating the entire workflow as one opaque action.
Session persistence and the memory module are designed to retain context across conversations. Workflow and progress features provide task tracking, while the report generator creates Markdown output for reviewing findings and deciding which hotspots to address first.
phuongrealmax/code-guardian MCP server is distributed through the npm package codeguardian-studio. The documented installation uses a global npm install:
After installation, initialize the project with:
For an immediate combined analysis, run:
For a more controlled workflow, use ccg code-optimize --report; advanced options are available through ccg code-optimize --help-advanced.
The package depends on better-sqlite3, so local installation may require native build tools. The README lists build-essential and Python 3 for Debian or Ubuntu, Xcode Command Line Tools for macOS, and Visual Studio Build Tools for Windows. Docker installation is also documented using a Node 20 slim image with build dependencies. Apple Silicon and Ubuntu ARM64 are supported, although some systems may build the dependency from source.
The free Dev tier is local and self-hostable. Team and Enterprise plans require license validation through api.codeguardian.studio, so availability of paid features depends on the selected license tier. The documented interface centers on Claude Code; the supplied material does not establish compatibility with Claude Desktop, Cursor, Windsurf, or Cline.
Native SQLite bindings can fail when system build tools are missing or when the Node.js version does not match the installed module. The README recommends installing the required tools or running npm rebuild better-sqlite3 for a version mismatch. The project is licensed under MIT as an open-core project.
Factual signals from GitHub, npm, and our automated checks ā not a rating.
No reviews yet ā be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/phuongrealmax-code-guardian)<a href="https://allmcps.com/mcp/phuongrealmax-code-guardian"><img src="https://allmcps.com/api/badge/phuongrealmax-code-guardian?style=directory" alt="Code Guardian on AllMCPs" /></a>