wemake-python-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@wemake-python-mcp What does the WPS432 rule check?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
wemake-python-mcp
Model Context Protocol (MCP) server providing automated code linting, rule explanations, and configuration templates for wemake-python-styleguide (WPS).
Features
Automatic Venv Resolution: Automatically detects project virtualenvs (
.venv,venv,uv) to executeflake8 --select=WPS.Structured Violation Output: Returns JSON violation reports with file, line, column, rule code, title, category, and message.
Offline WPS Rule Database: Bundled offline lookup database covering all 263 WPS rules (
WPS000–WPS699).Live Scraper & Updater: Scrapes official documentation to keep rule definitions and links up to date.
FastMCP Protocol Support: Implements tools and resources via standard
stdiotransport.
Related MCP server: mcp-lint-tools
Prerequisites
Python 3.10+
wemake-python-styleguide(installed in target project virtual environment or system environment)uv(recommended) orpip
Installation
Using uv (Recommended)
Clone the repository and install dependencies into a local virtualenv:
git clone https://github.com/your-org/wemake-python-mcp.git
cd wemake-python-mcp
uv venv
uv pip install -e .Using pip
pip install -e .Usage & MCP Client Configuration
CLI Usage
Run the server over stdio transport:
wemake-python-mcp --transport stdioCheck version:
wemake-python-mcp --versionClaude Desktop / Cursor / MCP Client Configuration
Add the following to your MCP client configuration file (e.g., claude_desktop_config.json):
Using uv (Recommended)
{
"mcpServers": {
"wemake-python": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/wemake-python-mcp",
"run",
"wemake-python-mcp"
]
}
}
}Direct Executable
{
"mcpServers": {
"wemake-python": {
"command": "/absolute/path/to/wemake-python-mcp/.venv/bin/wemake-python-mcp",
"args": []
}
}
}Tools Reference
Tool Name | Parameters | Description |
|
| Lints a single |
|
| Recursively lints a Python project directory. |
|
| Lints a raw Python code string snippet. |
|
| Returns documentation, title, category, and URL for a rule (e.g. |
| None | Scrapes official readthedocs documentation and updates the local rule database. |
Sample Tool Output (lint_file / lint_code)
{
"success": false,
"violation_count": 1,
"violations": [
{
"file": "example.py",
"line": 1,
"column": 5,
"code": "WPS432",
"title": "Forbid magic numbers",
"category": "Best practices",
"message": "Found magic number: 42"
}
],
"summary": "Found 1 wemake-python-styleguide violation across 1 file."
}Resources Reference
Resource URI | Mime Type | Description |
|
| Categorized index of all WPS rule codes and titles. |
|
| Full Markdown documentation for a specific rule (e.g., |
|
| Recommended |
Environment Variables
WPS_FLAKE8_PATH: Explicit path toflake8executable. Overrides auto-detection logic.
Development & Testing
Run tests and type checks:
# Run unit tests
uv run pytest
# Type check
uv run mypy src/ tests/
# Ruff linting
uv run ruff check src/ tests/ scripts/
# WPS styleguide compliance check
uv run flake8 src/ tests/ --select=WPSAvailable Tools
5 toolsexplain_ruleA
Explain a wemake-python-styleguide rule by code (e.g. WPS432, 432).
Args: code: WPS violation code (e.g. 'WPS432' or '432').
Inputs: code (required). Returns: result
lint_codeA
Lint a raw Python code string using wemake-python-styleguide rules.
Args: code: Python source code string to lint.
Inputs: code (required). Returns: result
lint_fileA
Lint a single Python file using wemake-python-styleguide rules.
Args: path: Path to the Python (.py) file to lint.
Inputs: path (required). Returns: result
lint_projectA
Lint an entire Python project directory recursively using wemake-python-styleguide rules.
Args: directory: Path to the target project directory (defaults to current directory).
Inputs: directory. Returns: result
update_rule_dbA
Scrape and update the offline wemake-python-styleguide rules database.
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct input type or purpose: lint_file, lint_project, and lint_code differ by input source (file, directory, string), while explain_rule and update_rule_db serve separate functions. There is no overlap ambiguity.
All tool names follow a consistent lowercase snake_case verb_noun pattern (lint_file, lint_project, lint_code, explain_rule, update_rule_db). The naming is uniform and predictable.
With 5 tools, the server is well-scoped for its purpose. It covers multiple linting input modes plus auxiliary rule explanation and database update features without unnecessary bloat.
The tool surface covers the core linting workflows (file, project, code string) and supporting rule utilities. A minor gap is the lack of a direct list-rules tool, but the existing tools handle common use cases effectively.
Maintenance
Related MCP Connectors
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
Official MCP server for Qase — manage test cases, runs, suites, defects via AI tools.
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
MCP Server for Slima - AI Writing IDE for Novel Authors with AI Beta Reader.
Related MCP Servers
- AlicenseBqualityCmaintenanceAn MCP server that performs comprehensive Python code analysis using Ruff, ty, and Vulture for linting, type checking, and dead code detection.8144 PyPI11MIT
- AlicenseNot gradedqualityDmaintenanceCode linting and style checking tools for AI agents, exposed as an MCP server. Supports style checks, naming conventions, complexity analysis, dead code detection, and import analysis.40 npmMIT
- AlicenseBqualityDmaintenanceAn MCP server that integrates Ruff linting, formatting, and code analysis tools with advanced logging and configuration options for AI coding assistants.41MIT

ocentra-enforcerofficial
AlicenseNot gradedqualityDmaintenanceMCP server for enforcing coding rules in Rust projects via scanning, routing, and explanation tools, designed for use with Codex, CI pipelines, and precommit hooks.MIT