Analyzes, optimizes, and detects duplicates in codebases for Claude Code.
A sophisticated Model Context Protocol (MCP) server that provides comprehensive codebase analysis, optimization, and duplicate detection capabilities for Claude Code.
🔍 Comprehensive Analysis
🤖 AI-Powered Learning
🚀 Zero Setup Required
analyze_project_structure
- Analyze project organization and architecturedetect_code_duplicates
- Find duplicate code across multiple languagesvalidate_microservices_architecture
- Validate microservices patternsoptimize_configurations
- Analyze configuration managementgenerate_improvement_report
- Generate comprehensive actionable reportrun_complete_project_analysis
- 🎯 ONE-COMMAND COMPLETE ANALYSIS
pip install mcp sqlite3
Add this to your Claude Code MCP configuration:
{
"mcpServers": {
"codebase-optimizer": {
"command": "python",
"args": ["/Users/liadgez/Documents/codebase-optimizer-mcp/server.py"],
"env": {
"PYTHONPATH": "/Users/liadgez/Documents/codebase-optimizer-mcp"
}
}
}
}
The tool will be automatically available in all Claude Code sessions.
Use run_complete_project_analysis with path "/path/to/your/project"
Use detect_code_duplicates with path "/path/to/project" and languages ["python", "javascript"]
Use validate_microservices_architecture with path "/path/to/microservices/project"
Use generate_improvement_report with path "/path/to/project"
Health Score: 87/100
- Organization Score: 0.9/1.0
- Duplication: 3.2%
- Security Score: 0.95/1.0
🔴 HIGH: Address security issues in configuration files
🟡 MEDIUM: Consolidate 12 duplicate functions into shared modules
🟢 LOW: Standardize naming conventions across directories
Phase 1: Critical Issues (1-2 days)
- Fix environment variable exposure
- Remove hardcoded secrets
Phase 2: Improvements (3-5 days)
- Refactor duplicate code blocks
- Standardize API error handling
The tool automatically:
Tool not appearing in Claude Code:
Analysis fails:
Performance issues:
codebase_patterns.db
To extend the tool:
codebase_optimizer_engine.py
server.py
MIT License - Feel free to use and modify for your projects.
Made with ❤️ for better codebases everywhere
A specialized MCP gateway for LLM enhancement prompts and jailbreaks with dynamic schema adaptation. Provides prompts for different LLMs using an enum-based approach.
Gentoro generates MCP Servers based on OpenAPI specifications.
An MCP server for AI coding assistants to control, inspect, and modify Bevy applications using the Bevy Remote Protocol (BRP).
A Python REPL with persistent sessions and automatic dependency management using uv.
A starter template for building Model Context Protocol (MCP) servers, designed for UI libraries and component registries.
A service framework supporting the Model Context Protocol (MCP) to integrate enterprise systems and AI platforms via RESTful, gRPC, and Dubbo protocols.
Bring the full power of BrowserStack’s Test Platform to your AI tools, making testing faster and easier for every developer and tester on your team.
Model Kontext Protocol Server for Kubernetes that allows LLM-powered applications to interact with Kubernetes clusters through native Go implementation with direct API integration and comprehensive resource management.
A server for JavaScript/TypeScript development with intelligent project tooling and testing capabilities.
A Next.js-based MCP server with OAuth 2.1 authentication support using Google as the default provider. Requires a PostgreSQL database and optionally Redis for SSE transport.