Code Guardian Studio (CCG for short) is an AI-driven code refactoring engine for large code repositories, built on top of Claude Code + MCP. It is essentially an MCP server that turns Claude Code into an intelligent refactoring assistant: scanning codebases, discovering hotspots, generating optimization reports, and helping developers complete refactoring safely. The current version is 4.1.0 and it uses the MIT (open-core) license.
Purpose CCG primarily serves refactoring and optimization scenarios for large-scale codebases. It can automatically analyze code structure, identify files with high code complexity, deep nesting, and many branches (i.e. "hotspots"), and based on this generate executable optimization plans to help developers fix code issues step by step in order of priority.
Main Capabilities
- Code Optimizer module (8 tools):
- code_scan_repository: maps the entire codebase
- code_metrics: calculates complexity, nesting, and branching scores
- code_hotspots: locates files that need attention
- code_refactor_plan: generates a step-by-step refactoring plan
- code_record_optimization: records optimization sessions
- code_generate_report: generates a Markdown report
- code_quick_analysis: completes scanning + metrics + hotspot analysis in one call
- code_optimizer_status: views module status
-
Other modules: Memory (persistent storage across sessions), Guard (intercepts dangerous patterns such as fake tests, empty catch, etc.), Workflow (task management and tracking), Latent Chain (multi-stage reasoning for complex tasks), Agents (specialized agent coordination), Thinking (structured reasoning models), Documents (document management), Testing (test runner integration).
-
Platform-level features: provides a total of 113+ MCP tools; supports session management so work can continue across conversations; provides a real-time progress dashboard to track refactoring progress; Latent Chain supports multi-stage reasoning to handle complex tasks.
How to Use 3-minute quick start: the first code analysis can be completed with a single command. The quickstart command automatically: initializes CCG in the project, scans the codebase, analyzes code complexity and hotspots, and generates a detailed Markdown report. Then you can open the generated report and start fixing from the highest-scoring hotspot. For more fine-grained control, manual setup can be used. The project also provides a GitHub Action (ccg-action) for CI/CD integration and PR analysis.
Installation Requirements CCG uses better-sqlite3 (native SQLite bindings), which requires build tools to be installed on the system. Systems such as Linux (Ubuntu/Debian) need the corresponding build tools installed in advance. Common issues include: missing make causing gyp errors, which requires installing build tools; a Node.js version mismatch causing "Module did not self-register", which can be fixed by rebuilding with npm rebuild better-sqlite3. For ARM64 compatibility, Apple Silicon (M1/M2/M3) and Ubuntu ARM64 are supported, and some platforms may require building from source.
Use Cases Suitable for code quality assessment of large code repositories, technical debt identification, refactoring prioritization, PR analysis in CI/CD, and development teams that need to continuously track refactoring progress across sessions.
Limitations and License The Dev tier is fully local and self-hostable; the Team/Enterprise tiers require license verification through api.codeguardian.studio. It uses the MIT (open-core) license, and a comparison of features across tiers can be found on its License Tiers page.