π Advanced code analysis system with knowledge graph and AI insights
A sophisticated MCP Server that combines Neo4j knowledge graphs, AI-powered analysis, and advanced static analysis for large-scale code projects.
- π§ AI-Powered Analysis with GPT-4/Claude for advanced insights
- π Advanced Knowledge Graph with Neo4j for complex relationships
- π Natural Language Queries with no learning curve
- ποΈ Deep Architectural Analysis
- β‘ Parallel Processing for large projects
- π‘οΈ Automated Security Analysis
- π Comprehensive Quality Metrics
- Up to 10M lines of code in under 30 minutes
- 10+ concurrent analyses
- Query response time < 1 second for most queries
- 95%+ accuracy in entity and relationship detection
- Node.js 18+
- Docker & Docker Compose
- 8GB+ RAM
- 100GB+ disk space
# Clone the project
git clone https://github.com/ItamarZand88/advanced-code-analysis-mcp.git
cd advanced-code-analysis-mcp
# Setup environment configuration
cp .env.example .env
# Edit .env with your settings
# Run the system
docker-compose up -d
# Check status
curl http://localhost:3000/health
# Install dependencies
npm install
# Build the project
npm run build
# Run in development
npm run dev
# Run in production
npm start
import { MCPServer } from './dist/index.js';
const server = new MCPServer();
// Start analysis
const result = await server.analyzeRepository(
'https://github.com/microsoft/vscode',
'main',
{
includeTests: true,
enableAIInsights: true,
parallelWorkers: 8
}
);
console.log(`Job ID: ${result.jobId}`);
// Example queries
const queries = [
'Show me the most complex functions in the system',
'Find circular dependencies',
'Which files are missing tests?',
'Show me potential security vulnerabilities',
'What are the main architectural patterns?'
];
for (const query of queries) {
const result = await server.queryGraph(query, graphId);
console.log(result.interpretation);
}
// Complexity analysis
const complexity = await server.getComplexityAnalysis(graphId);
// Dependency analysis
const dependencies = await server.getDependencyAnalysis(graphId);
// Quality assessment
const quality = await server.getQualityMetrics(graphId);
// Security analysis
const security = await server.getSecurityAnalysis(graphId);
// .env
MAX_CONCURRENT_ANALYSES=10
PARALLEL_WORKERS=16
MAX_FILE_SIZE=50485760 // 50MB
INCLUDE_TESTS=true
ENABLE_AI_INSIGHTS=true
AI_PROVIDER=openai
AI_MODEL=gpt-4
OPENAI_API_KEY=your_key_here
ANTHROPIC_API_KEY=your_key_here
NEO4J_URI=bolt://localhost:7687
NEO4J_USERNAME=neo4j
NEO4J_PASSWORD=secure_password
NEO4J_DATABASE=codeanalysis
- Neo4j Browser: http://localhost:7474
- Grafana Dashboard: http://localhost:3001 (admin/admin)
- Prometheus Metrics: http://localhost:9091
- Health Check: http://localhost:3000/health
Analyze our main system for security issues and code smells
Show me the core components and how they interact
Find the most tightly coupled components and suggest where to break dependencies
Find bottlenecks and inefficient algorithms
npm test
npm run test:watch
npm run test:coverage
npm run lint
npm run lint:fix
npm run format
npm run build
npm run docker:build
- π API Documentation
- ποΈ Architecture Guide
- π§ Configuration Reference
- π Deployment Guide
- π€ Contributing Guidelines
- Fork the project
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
- π§ Email: support@code-analysis.com
- π¬ Discord: Community Server
- π Issues: GitHub Issues
- π Documentation: Full Docs
β Don't forget to star the project if it helps you!