MCP Code Analysis & Quality Server

MCP Code Analysis & Quality Server

Provides comprehensive code analysis through three MCP servers: static analysis for code quality and security, dependency analysis for package management and vulnerabilities, and complexity analysis for maintainability assessment across multiple programming languages.

Category
Visit Server

README

MCP Code Analysis & Quality Server

License: MIT Node.js Version TypeScript

Note: This project was recently completed and has not undergone extensive testing. Use with caution and report any issues you encounter.

Developed by: Chris Bunting

A suite of MCP (Model Context Protocol) servers providing code analysis, dependency management, complexity analysis, and intelligent prioritization capabilities.

Overview

This project provides three MCP servers and one intelligent prioritization library that deliver comprehensive code quality analysis:

  • Static Analysis Server: Code quality and security analysis
  • Dependency Analysis Server: Dependency management and analysis
  • Complexity Analyzer Server: Code complexity assessment
  • Intelligent Prioritizer: AI-powered prioritization library (used by other servers)

Features

Static Analysis Server

  • Code quality analysis
  • Security vulnerability detection
  • Best practices validation
  • Multi-language support (JavaScript, TypeScript, Python, Java, C++, Go, Rust)

Dependency Analysis Server

  • Dependency analysis and management
  • Package compatibility checking
  • Security vulnerability scanning
  • Version resolution and conflict detection

Complexity Analyzer Server

  • Code complexity measurement
  • Maintainability assessment
  • Code structure analysis
  • AST-based processing

Intelligent Prioritizer

  • AI-powered prioritization library
  • Context-aware analysis engine
  • Learning-based recommendations
  • Impact assessment and scoring (used internally by other servers)

Quick Start

Prerequisites

  • Node.js 18.0 or higher
  • npm 8.0 or higher
  • Git

Development Installation

Clone the repository and install dependencies:

# Clone the repository
git clone <repository-url>
cd mcp-code-analysis-server

# Install all dependencies
npm install

# Build all packages
npm run build

MCP Configuration

After building, add the following to your MCP client's configuration file (usually mcp.json or similar):

{
  "mcpServers": {
    "static-analysis-server": {
      "command": "node",
      "args": ["/path/to/mcp-code-analysis-server/packages/static-analysis-server/dist/index.js"],
      "env": {
        "NODE_ENV": "development"
      }
    },
    "dependency-analysis-server": {
      "command": "node",
      "args": ["/path/to/mcp-code-analysis-server/packages/dependency-analysis-server/dist/index.js"],
      "env": {
        "NODE_ENV": "development"
      }
    },
    "complexity-analyzer-server": {
      "command": "node",
      "args": ["/path/to/mcp-code-analysis-server/packages/complexity-analyzer-server/dist/index.js"],
      "env": {
        "NODE_ENV": "development"
      }
    }
  }
}

Note: Replace /path/to/mcp-code-analysis-server with the actual path to your cloned repository.

Development Workflow

For development and testing:

# Run tests
npm test

# Run linting
npm run lint

# Run type checking
npm run type-check

# Start individual servers for testing
cd packages/static-analysis-server
npm start

cd ../dependency-analysis-server
npm start

cd ../complexity-analyzer-server
npm start

Usage

Once configured, the MCP servers will be automatically available in your MCP client. Each server provides specific tools:

  • Static Analysis Server: Code quality analysis, security checks, best practices validation
  • Dependency Analysis Server: Package dependency analysis, compatibility checking, security scanning
  • Complexity Analyzer Server: Code complexity measurement, maintainability assessment
  • Intelligent Prioritizer: AI-powered prioritization library (integrated into other servers)

Development

Available Scripts

# Build all packages
npm run build

# Build shared packages first, then servers
npm run build:shared
npm run build:servers

# Run tests across all packages
npm test

# Run linting
npm run lint

# Run type checking
npm run type-check

# Clean all packages
npm run clean

Project Structure

mcp-code-analysis-server/
├── packages/
│   ├── static-analysis-server/          # Static code analysis MCP server
│   │   ├── src/
│   │   ├── dist/
│   │   ├── package.json
│   │   └── tsconfig.json
│   ├── dependency-analysis-server/      # Dependency analysis MCP server
│   │   ├── src/
│   │   ├── dist/
│   │   ├── package.json
│   │   └── tsconfig.json
│   ├── complexity-analyzer-server/      # Complexity analysis MCP server
│   │   ├── src/
│   │   ├── dist/
│   │   ├── package.json
│   │   └── tsconfig.json
│   ├── intelligent-prioritizer/         # AI prioritization library
│   │   ├── src/
│   │   ├── dist/
│   │   ├── package.json
│   │   └── tsconfig.json
│   ├── combined-reporting/              # Combined analysis reporting
│   │   └── src/
│   ├── context-aware-analysis/          # Context-aware analysis engine
│   │   └── src/
│   ├── knowledge-base/                  # Knowledge base service
│   │   └── src/
│   ├── progressive-disclosure/          # Progressive disclosure service
│   │   └── src/
│   ├── quality-dashboard/               # Quality dashboard service
│   │   └── src/
│   ├── team-preference-learning/        # Team preference learning
│   │   └── src/
│   ├── shared-cache/                    # Shared caching utilities
│   │   ├── src/
│   │   ├── package.json
│   │   └── tsconfig.json
│   ├── shared-communication/            # Shared communication utilities
│   │   ├── src/
│   │   ├── package.json
│   │   └── tsconfig.json
│   ├── shared-config/                   # Shared configuration utilities
│   │   ├── src/
│   │   ├── package.json
│   │   └── tsconfig.json
│   ├── shared-logger/                   # Shared logging utilities
│   │   ├── src/
│   │   ├── package.json
│   │   └── tsconfig.json
│   ├── shared-plugins/                  # Shared plugin system
│   │   ├── src/
│   │   ├── package.json
│   │   └── tsconfig.json
│   └── shared-types/                    # Shared type definitions
│       ├── src/
│       ├── package.json
│       └── tsconfig.json
├── docker/                              # Docker configurations
│   ├── complexity-analyzer.Dockerfile
│   ├── dependency-analysis.Dockerfile
│   └── static-analysis.Dockerfile
├── docker-compose.yml
├── jest.config.js                       # Test configuration
├── tsconfig.json                        # TypeScript configuration
├── package.json                         # Workspace configuration
├── mcp.json                             # MCP configuration
├── README.md
├── LICENSE
├── CHANGELOG.md
└── mcp_instructions.md

Architecture

The project uses a monorepo structure with shared packages:

  • Shared Packages: Common utilities, types, and configurations
  • Server Packages: Individual MCP servers with specific functionality
  • Library Packages: Reusable libraries (e.g., intelligent-prioritizer)
  • Analysis Packages: Specialized analysis components

## Development

### Available Scripts

```bash
# Build all packages
npm run build

# Run all tests
npm run test

# Run linting
npm run lint

# Type checking
npm run type-check

# Development mode
npm run dev

# Clean build artifacts
npm run clean

Testing

Run all tests:

npm test

Code Quality

This project uses several tools to maintain code quality:

  • ESLint: JavaScript/TypeScript linting
  • Prettier: Code formatting
  • Jest: Unit testing
  • TypeScript: Type checking

Docker

Build and run with Docker:

# Build images
docker build -t mcp-code-analysis/static-analysis-server -f docker/static-analysis.Dockerfile .
docker build -t mcp-code-analysis/dependency-analysis-server -f docker/dependency-analysis.Dockerfile .
docker build -t mcp-code-analysis/complexity-analyzer-server -f docker/complexity-analyzer.Dockerfile .
docker build -t mcp-code-analysis/intelligent-prioritizer -f docker/intelligent-prioritizer.Dockerfile .

# Run containers
docker run mcp-code-analysis/static-analysis-server
docker run mcp-code-analysis/dependency-analysis-server
docker run mcp-code-analysis/complexity-analyzer-server
docker run mcp-code-analysis/intelligent-prioritizer

Or use docker-compose:

docker-compose up

Release Notes

Version 1.0.1 (2025-09-10)

🎉 Initial Production Release

This is the first production-ready release of the MCP Code Analysis & Quality Server, providing comprehensive code analysis capabilities through three integrated MCP servers.

What's New

  • Static Analysis Server: Multi-language code quality and security analysis
  • Dependency Analysis Server: Complete dependency management and security scanning
  • Complexity Analyzer Server: Advanced code complexity assessment
  • Intelligent Prioritizer: Smart issue prioritization with team learning
  • Shared Infrastructure: Robust caching, communication, and configuration systems

Key Features

  • ✅ Full TypeScript implementation with strict typing
  • ✅ Multi-language support (JavaScript, TypeScript, Python, Java, C++, Go, Rust)
  • ✅ Docker containerization for all servers
  • ✅ MCP Protocol compliance
  • ✅ Comprehensive testing framework setup
  • ✅ ESLint configuration with auto-fix capabilities

Known Items

  • Some ESLint warnings remain (to be addressed in future patches)
  • Test coverage to be expanded in upcoming releases
  • Documentation examples to be enhanced

Development Setup

git clone <repository-url>
cd mcp-code-analysis-server
npm install
npm run build

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured