MCP Code Analyzer

Provides code analysis and automated management for MCP projects, examining structure, imports, references, and code changes.
  • python

39

GitHub Stars

python

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "emiryasar-mcp_code_analyzer": {
      "command": "python",
      "args": [
        "-m",
        "mcp_code_analyzer",
        "--analyze-paths",
        "C:\\Projects\\path1"
      ]
    }
  }
}

You use the MCP Code Analyzer to understand your project, analyze code at project and file levels, and automatically adapt changes so related usages stay consistent as you evolve your codebase.

How to use

You run the MCP Code Analyzer as a local, executable tool that integrates with your editor or client. It analyzes project structure, statistics, technology usage, and code details to identify where updates are needed. You can analyze multiple paths or files, and you can trigger analyses from a chat-like interface to focus on specific parts of your codebase. Prepare to review suggested changes and apply them carefully, keeping backups in case you need to revert.

How to install

Prerequisites you need to meet before installing:

  • Python 3.10 or later

  • Windows operating system (Linux and macOS support has not been tested)

How to install

# Clone the MCP Code Analyzer repository
git clone https://github.com/[your-username]/mcp-code-analyzer.git
cd mcp-code-analyzer

# Install dependencies in editable mode
pip install -e .

MCP server configuration for Claude Desktop

You can run the MCP Code Analyzer from Claude Desktop using a configured command. The following stdio configuration runs the analysis module and targets a specific analysis path.

{
  "type": "stdio",
  "name": "code_analyzer",
  "command": "python",
  "args": [
    "-m",
    "mcp_code_analyzer",
    "--analyze-paths",
    "C:\\Projects\\path1"
  ]
}

Available tools

project_analysis

Analyzes the overall project structure, returning an XML-like tree representation to understand modules, folders, and dependencies.

project_statistics

Collects statistics about the project, such as file counts, lines of code, and complexity measures.

project_technology

Identifies technology stacks used across the project, including languages, frameworks, and tooling.

analyze_code_structure

Inspects code organization, including modules, files, and their interrelations.

analyze_imports

Examines import statements to identify dependencies and potential cleanup opportunities.

analyze_file

Analyzes a single file to extract structure, references, and patterns.

find_references

Locates references to symbols across the codebase to support safe refactoring.

file_operations

Performs file-level operations with safety checks and backup prompts.

version_control

Creates dated backups before applying changes in version-controlled projects.

code_modifier

Applies automated modifications to code line by line while preserving formatting.

check_syntax

Validates syntax across analyzed files to catch errors early.

find_code_patterns

Searches for common code patterns to streamline refactoring efforts.

find_pattern_usages

Maps where specific patterns are used to assess impact of changes.

search_content

Searches file contents for targeted terms and patterns.

search_files

Locates files matching criteria across the project.

validate_code

Checks that code remains valid after proposed changes.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational