Get the FREE Ultimate OpenClaw Setup Guide →

code-guardian

Code Guardian Studio – AI-powered code refactor engine for large repositories, built on Claude Code + MCP.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio phuongrealmax-code-guardian npx -y codeguardian-studio

How to use

Code Guardian Studio (CCG) is an MCP server that acts as an intelligent refactoring assistant for Claude Code-based workflows. It provides a large suite of MCP tools (113+ capabilities) including code analysis, hotspot detection, refactor planning, memory persistence, workflow management, guard rules, and latent chain reasoning, all in a single server. You can run analyses, generate reports, manage sessions across conversations, and track real-time progress through a unified dashboard. The quickstart flow lets you install the package globally, initialize CCG in your project, and run an end-to-end analysis that scans your codebase, computes complexity and hotspots, and outputs a detailed markdown report for immediate action. For more advanced usage, you can tailor analyses, generate custom reports, and leverage modules like Memory, Guard, and Workflow to fit your development process.

How to install

Prerequisites:

  • Node.js (recommended current LTS) and npm installed on your system
  • Internet access to install the MCP package

Option A: Install and run via npx (no permanent install required)

  1. Ensure Node.js is installed:
    • macOS/Linux: node -v && npm -v
    • Windows: node -v && npm -v
  2. Run Code Guardian Studio via npx (the MCP server): npm init -y npx -y codeguardian-studio

Option B: Install globally for repeated use

  1. Ensure Node.js is installed: node -v npm -v
  2. Install the package globally: npm install -g codeguardian-studio
  3. Initialize in your project (example): ccg init
  4. Run an analysis with custom options (example): ccg code-optimize --report

Notes:

  • The package is named codeguardian-studio and is the MCP server wrapper around Code Guardian Studio.
  • If you prefer to run locally from a project, follow the Manual Setup steps in the documentation after installation.

Additional notes

Tips and caveats:

  • Ensure build tools are available if you need native modules (better-sqlite3) depending on your platform. See the Installation Requirements in the README for OS-specific details.
  • ARM64 (Apple Silicon) is supported, but some environments may require rebuilding native bindings: npm rebuild better-sqlite3
  • If you run into environment-related build errors, install the required system packages for your OS (build-essential on Linux, Xcode CLI tools on macOS, and Visual Studio Build Tools on Windows).
  • The Dev/Team/Enterprise licensing impacts feature access; verify license status if you plan to use advanced MCP tools or the full feature set.
  • For containerized deployments, consider using the Docker snippet in the README to ensure build dependencies are present in the image.

Related MCP Servers

Sponsor this space

Reach thousands of developers