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
Transforms Claude Desktop into a conversational development environment using distributed MCP servers.
Manage ServiceNow metadata, modules, records, and tests using Fluent, a TypeScript-based declarative DSL. Supports all ServiceNow SDK CLI commands.
A service framework supporting the Model Context Protocol (MCP) to integrate enterprise systems and AI platforms via RESTful, gRPC, and Dubbo protocols.
Captures and manages stdout logs from multiple processes via a named pipe system for real-time debugging and analysis.
Empowers LLMs with real-time network traffic analysis using tshark. Requires Wireshark's tshark to be installed.
Interact with the Postman API via an MCP server. Requires a Postman API key.
Automate Android devices using the uiautomator2 library, requiring adb and a connected device.
A template for building Model Context Protocol (MCP) servers using the mcp-framework for Node.js.
An MCP server for log analysis using the LogAI framework, with optional Grafana and GitHub integrations.
Integrates with the unofficial Google Gemini CLI, allowing file access within configured directories.