code-quality-mcp

code-quality-mcp

Provides deterministic Python code quality analysis using flake8, mypy, McCabe, and vulture, enabling LLMs to access real linting and type checking results.

Category
Visit Server

README

code-quality-mcp

Stop asking your LLM if your Python is clean. Let it actually check.

An MCP server that gives Claude, Cursor, VS Code (or any MCP-compatible client) a real, deterministic view of your Python code quality — powered by the tools you already trust: flake8, mypy, McCabe, and vulture.

No more "looks good to me" from an LLM that never ran a linter. This is ground truth.


Why

LLMs hallucinate code reviews. They miss style violations, invent complexity numbers, and confidently declare your dead code "actively used."

code-quality-mcp plugs the gap: it runs the canonical Python quality tools and hands the LLM a clean, structured report. The model stops guessing and starts citing.

It also ships with a hard instruction baked into the server: never modify, refactor, or fix your code unless you explicitly ask. It reports. You decide.


What it gives you

Tool What it checks MCP function
flake8 PEP8 style, line length, unused imports analyze_style
McCabe Cyclomatic complexity per function analyze_complexity
vulture Dead code, unused variables and functions analyze_dead_code
mypy Static type errors analyze_types
All-in-one flake8 + McCabe + vulture, parallel analyze_all
Snippet mode Paste raw source, no file needed analyze_content

Reports come back as markdown tables — readable for you, parseable for the model.


Install

git clone https://github.com/Javier-Morenosa/code-quality-mcp.git
cd code-quality-mcp
pip install -e .

Requires Python 3.10+.


Wire it up

Cursor

Add to your Cursor MCP settings (or copy cursor_mcp.json):

{
  "mcpServers": {
    "code-quality": {
      "command": "python",
      "args": ["-m", "code_quality_mcp.server"],
      "env": {
        "PYTHONPATH": "C:/path/to/code-quality-mcp/src"
      }
    }
  }
}

VS Code

See vscode_mcp.json for a ready-to-use config.

Claude Code

claude mcp add code-quality -- python -m code_quality_mcp.server

Use it

Once the server is wired up, just talk to your LLM:

"Run a full quality analysis on src/my_module.py."

"Is there dead code in this project?"

"Which functions are too complex?"

The model will call the right tools, get real output from real linters, and give you a report grounded in facts — not vibes.

Pro tip

Call set_workspace once at the start of a session to point the server at your project root. After that, you can pass relative paths and everything Just Works.


What it will NOT do

By design, this server is read-only. It will not:

  • Edit your files
  • Refactor your code
  • Auto-fix style issues
  • Suggest changes unless you explicitly ask for them

If you want fixes, run black, ruff --fix, or ask your LLM directly. This server's job is to tell the truth about your code, nothing more.


Roadmap

  • ruff backend as a faster drop-in for flake8
  • Per-file complexity heatmap
  • Configurable rule sets via pyproject.toml

License

MIT. Use it, ship it, fork it.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured