Sponsored by Deepsite.site

Advanced Code Analysis MCP Server

Created By
ItamarZand887 months ago
Advanced Code Analysis MCP Server with Knowledge Graph and AI Insights - TypeScript implementation with Neo4j backend
Content

Advanced Code Analysis MCP Server

🚀 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.

✨ Key Features

  • 🧠 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

🎯 Performance Targets

  • 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

🚀 Quick Setup

System Requirements

  • Node.js 18+
  • Docker & Docker Compose
  • 8GB+ RAM
  • 100GB+ disk space

Setup with Docker

# 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

Local Installation

# Install dependencies
npm install

# Build the project
npm run build

# Run in development
npm run dev

# Run in production
npm start

📖 Basic Usage

Repository Analysis

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}`);

Natural Language Queries

// 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);
}

Advanced API

// 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);

🔧 Advanced Configuration

Analysis Settings

// .env
MAX_CONCURRENT_ANALYSES=10
PARALLEL_WORKERS=16
MAX_FILE_SIZE=50485760  // 50MB
INCLUDE_TESTS=true
ENABLE_AI_INSIGHTS=true

AI Configuration

AI_PROVIDER=openai
AI_MODEL=gpt-4
OPENAI_API_KEY=your_key_here
ANTHROPIC_API_KEY=your_key_here

Neo4j Configuration

NEO4J_URI=bolt://localhost:7687
NEO4J_USERNAME=neo4j
NEO4J_PASSWORD=secure_password
NEO4J_DATABASE=codeanalysis

📊 Monitoring and Metrics

🎨 Usage Examples

1. Enterprise Code Audit

Analyze our main system for security issues and code smells

2. Developer Onboarding

Show me the core components and how they interact

3. Refactoring Planning

Find the most tightly coupled components and suggest where to break dependencies

4. Performance Analysis

Find bottlenecks and inefficient algorithms

🛠️ Development

Running Tests

npm test
npm run test:watch
npm run test:coverage

Code Quality and Linting

npm run lint
npm run lint:fix
npm run format

Production Build

npm run build
npm run docker:build

📚 Additional Documentation

🤝 Contributing

  1. Fork the project
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

Distributed under the MIT License. See LICENSE for more information.

🙋‍♂️ Support


⭐ Don't forget to star the project if it helps you!

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
ChatWiseThe second fastest AI chatbot™
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Serper MCP ServerA Serper MCP Server
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
CursorThe AI Code Editor
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Amap Maps高德地图官方 MCP Server
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Playwright McpPlaywright MCP server
DeepChatYour AI Partner on Desktop
Tavily Mcp
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
WindsurfThe new purpose-built IDE to harness magic
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code