The Code Quality Checker for AI Assistants is a Model Context Protocol (MCP) server designed to perform code quality checks using tools like pylint
and pytest
. This server enables AI assistants, such as Claude, to analyze your code and suggest improvements by generating smart prompts for large language models (LLMs). The server operates within a specified project directory, ensuring secure and controlled code analysis.
pylint
on the project code and generates LLM-friendly prompts to identify code quality issues.pytest
on the project code and provides detailed information about test failures.pylint
and pytest
checks for a comprehensive code quality analysis.# Clone the repository
git clone https://github.com/MarcusJellinghaus/mcp-code-checker.git
cd mcp-code-checker
# Create and activate a virtual environment (optional but recommended)
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
pip install -e .
python -m src.main --project-dir /path/to/project
The server uses FastMCP for operation. The --project-dir
parameter is required to restrict code checking operations to the specified directory.
To integrate the Code Quality Checker with Claude Desktop:
%APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Add the MCP server configuration:
{
"mcpServers": {
"code_checker": {
"command": "C:\\path\\to\\mcp_code_checker\\.venv\\Scripts\\python.exe",
"args": [
"C:\\path\\to\\mcp_code_checker\\src\\main.py",
"--project-dir",
"C:\\path\\to\\your\\project"
],
"env": {
"PYTHONPATH": "C:\\path\\to\\mcp_code_checker\\"
}
}
}
}
C:\\path\\to\\
instances with your actual paths.MCP Inspector allows you to debug and test the MCP server:
npx @modelcontextprotocol/inspector \
uv \
--directory C:\path\to\mcp_code_checker \
run \
src\main.py
REM Clone the repository
git clone https://github.com/MarcusJellinghaus/mcp-code-checker.git
cd mcp-code-checker
REM Create and activate a virtual environment
python -m venv .venv
.venv\Scripts\activate
REM Install dependencies
pip install -e .
REM Install development dependencies
pip install -e ".[dev]"
# Set the PYTHONPATH and run the server module using mcp dev
set PYTHONPATH=. && mcp dev src/server.py
This project is licensed under the MIT License. See the LICENSE file for details.