Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

code-mcp

MCP.Pizza Chef: davidvc

The code-mcp server is an advanced Model Context Protocol plugin designed to empower AI assistants like Cline and Claude with deep codebase analysis capabilities. By leveraging a Neo4j graph database, it provides structured insights into code structure, including component relationships, class hierarchies, and method complexities. It also calculates essential code quality metrics such as cyclomatic complexity, coupling, cohesion, and test coverage. Additionally, it supports documentation analysis by parsing markdown files and evaluating documentation quality and coverage. This plugin enables AI models to answer sophisticated questions about codebases, making it invaluable for developers seeking automated code review, quality assessment, and documentation insights.

Use This MCP server To

Analyze code structure and module dependencies Calculate cyclomatic complexity and code metrics Detect code duplication and quality issues Evaluate test coverage and code reliability Parse and assess documentation quality Answer high-level questions about codebases Visualize class hierarchies and relationships Automate code review and quality audits

README

Code Analysis MCP Plugin

A Model Context Protocol (MCP) plugin that enables AI assistants like Cline and Claude to perform sophisticated code analysis and answer questions about codebases.

Overview

This plugin provides AI assistants with direct access to codebase analysis capabilities through a Neo4j graph database, enabling them to:

  • Analyze code structure and relationships
  • Calculate code quality metrics
  • Extract documentation and context
  • Answer high-level questions about the codebase

Features

  • Code Structure Analysis

    • Component and module relationships
    • Class hierarchies and dependencies
    • Method complexity and relationships
    • File organization and imports
  • Code Quality Metrics

    • Cyclomatic complexity
    • Coupling and cohesion metrics
    • Code duplication detection
    • Test coverage analysis
  • Documentation Analysis

    • Markdown file parsing
    • Documentation quality metrics
    • Documentation coverage analysis
    • Automated documentation updates
  • Natural Language Queries

    • Ask questions about code structure
    • Get high-level architectural overviews
    • Identify potential code issues
    • Find relevant code examples

Example Queries

The plugin can answer questions like:

  • "Please summarize the key features and functionality of this codebase"
  • "Write a high level design document for this codebase, using object and sequence diagrams where useful"
  • "Write a summary of the key components of this codebase, with a paragraph or two for each component"
  • "What are some of the more problematic files, applying SOLID and clean coding principles"

Architecture

The plugin uses:

  • Neo4j graph database for storing code structure and relationships
  • Language-specific parsers for code analysis
  • MCP interface for AI assistant integration
  • Advanced metrics calculation for code quality analysis

Getting Started

See CONTRIBUTING.md for development setup instructions.

License

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

code-mcp FAQ

How does code-mcp integrate with AI assistants?
code-mcp connects via the MCP protocol, exposing code analysis data through a Neo4j graph database, enabling AI assistants like Cline, Claude, and Gemini to query and reason about codebases.
What programming languages does code-mcp support?
code-mcp primarily analyzes codebases that can be represented in the Neo4j graph structure; language support depends on the parsers feeding the graph, typically including popular languages like Java, Python, and JavaScript.
How is code quality measured by code-mcp?
It calculates metrics such as cyclomatic complexity, coupling, cohesion, code duplication, and test coverage to provide a comprehensive quality assessment.
Can code-mcp analyze documentation?
Yes, it parses markdown files and evaluates documentation quality and coverage to help improve project documentation.
Is code-mcp compatible with multiple LLM providers?
Yes, it works seamlessly with AI models from OpenAI, Anthropic Claude, and Google Gemini through the MCP protocol.
How does code-mcp handle large codebases?
By leveraging Neo4j's graph database capabilities, code-mcp efficiently manages and queries large-scale codebases with complex relationships.
What are the security considerations when using code-mcp?
code-mcp follows MCP's principles for secure, scoped, and observable interactions, ensuring safe access to code data without exposing sensitive information unnecessarily.
How do I deploy code-mcp?
code-mcp can be deployed as a standalone MCP server with access to your Neo4j database; detailed setup instructions depend on your environment and integration needs.