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.
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
ruffbackend 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.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。