# phuongrealmax/code-guardian [Health: Active]

**Category:** 🧮 Data Science Tools  
**Repository:** https://github.com/phuongrealmax/code-guardian  
**GitHub Stars:** 6  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/phuongrealmax-code-guardian

## Description
AI-powered code refactor engine with 80+ MCP tools for code analysis, hotspot detection, complexity metrics, persistent memory, and automated refactoring plans.

## Claude Desktop Quick Installation
Remote MCP endpoint (confidence: high). Install path detected from listing signals. Add as a URL/SSE server in your client:

```json
"mcpServers": {
  "code-guardian": {
    "url": "https://mcp.so/server/code-guardian"
  }
}
```

## Documentation

## What phuongrealmax/code-guardian MCP server does

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.

## How it works

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.

## Setup and configuration

phuongrealmax/code-guardian MCP server is distributed through the npm package `codeguardian-studio`. The documented installation uses a global npm install:

```bash
npm install -g codeguardian-studio
```

After installation, initialize the project with:

```bash
ccg init
```

For an immediate combined analysis, run:

```bash
ccg quickstart
```

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.

## Limitations and notes

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.

_Full upstream README: https://allmcps.com/mcp/phuongrealmax-code-guardian/readme_

