mcp_code_analyzer
A Model Context Protocol (MCP) server implementation for comprehensive code analysis. This tool integrates with Claude Desktop to provide code analysis capabilities through natural language interactions.
claude mcp add --transport stdio emiryasar-mcp_code_analyzer python -m mcp_code_analyzer --analyze-paths C:\Projects\path1
How to use
The MCP Code Analyzer is designed to help you understand and manage code changes by analyzing a project or specific files and advising on necessary updates to maintain consistency. It integrates with Claude Desktop to provide insights such as project structure, statistics, technology usage, and code references, enabling safer automated modifications when needed. Tools include project analysis (structure, statistics, technology, and code structure), code analysis (imports, file contents, and references), and file operations or code modification with appropriate backups. To use it, configure the server entry in Claude Desktop to run the Python module mcp_code_analyzer, then supply analyze paths or files for the tool to inspect. You can trigger analyses for multiple paths, and the tool will return structured results to guide changes across related usages and components.
How to install
Prerequisites:
- Python 3.10 or later
- Windows (Linux/macOS support may be untested)
Installation steps:
-
Clone the repository: git clone https://github.com/[your-username]/mcp-code-analyzer.git cd mcp-code-analyzer
-
Install the package in editable mode: pip install -e .
-
Ensure Python is available in your PATH and verify installation: python -m mcp_code_analyzer --help
-
If you use Claude Desktop, ensure the integration is configured as described in the Claude Desktop section of the README for proper path and module execution.
Additional notes
Tips and considerations:
- Always backup your codebase before using any modification features, as file operations can potentially modify or delete files.
- The project notes indicate several known issues and a warning about chat context limits impacting large file modifications. Use multiple smaller scopes when analyzing or modifying large projects.
- If you encounter issues with large-scale changes, consider using the backup features (version_control) to create dated backups before applying modifications.
- Environment variables can be added in the mcp_config under env to control runtime behavior or paths if required by your setup.
- The current integration example uses a Python module invocation with analysis paths; adapt the path(s) to your project structure as needed.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP