MCP Code Checker logo

MCP Code Checker

by MarcusJellinghaus

The MCP Code Checker is a Model Context Protocol (MCP) server that provides code quality checking operations. It offers an API for performing code quality checks within a specified project directory, enabling AI assistants to analyze and improve code.

View on GitHub

Last updated: N/A

What is MCP Code Checker?

This MCP server enables AI assistants to perform quality checks on your code. It allows running pylint and pytest checks, generating smart prompts for LLMs to explain issues and suggest fixes, and combining multiple checks for comprehensive code quality analysis.

How to use MCP Code Checker?

First, install the server by cloning the repository, creating a virtual environment, and installing dependencies. Then, run the server using the provided command, specifying the project directory. Finally, configure your AI assistant (like Claude Desktop) or MCP Inspector with the server's address and necessary parameters to enable code analysis.

Key features of MCP Code Checker

  • Run pylint checks to identify code quality issues

  • Execute pytest to identify failing tests

  • Generate smart prompts for LLMs to explain issues and suggest fixes

  • Combine multiple checks for comprehensive code quality analysis

  • Securely contained operations within the specified project directory

  • Customizable pylint and pytest parameters

Use cases of MCP Code Checker

  • Automated code review with AI assistance

  • Debugging and fixing code issues using natural language prompts

  • Improving code quality and style consistency

  • Identifying potential bugs and vulnerabilities

  • Integrating code quality checks into CI/CD pipelines

FAQ from MCP Code Checker

What is the purpose of the --project-dir parameter?

The --project-dir parameter is required for security reasons. All code checking operations will be restricted to this directory.

How do I configure Claude Desktop to use this server?

You need to modify the Claude configuration file (claude_desktop_config.json) and add the MCP server configuration with the correct paths to your Python virtual environment, project directory, and PYTHONPATH.

What parameters can I customize for pylint checks?

You can customize the disable_codes parameter to disable specific pylint error codes and pylint_categories to include specific message categories.

What parameters can I customize for pytest checks?

You can customize parameters such as test_folder, markers, verbosity, extra_args, env_vars, keep_temp_files, continue_on_collection_errors, python_executable, and venv_path.

Where can I find logs for troubleshooting?

Log files are located in %APPDATA%\Claude\logs on Windows and ~/Library/Application Support/Claude/logs on macOS.