Skip to content

feat: add MCP server for LLM-driven linting#3631

Draft
Copilot wants to merge 5 commits intomasterfrom
copilot/add-mcp-implementation-wemake-styleguide
Draft

feat: add MCP server for LLM-driven linting#3631
Copilot wants to merge 5 commits intomasterfrom
copilot/add-mcp-implementation-wemake-styleguide

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 19, 2026

  • Investigate CI failures (lock file out of date + WPS violations in tests)
  • Run poetry lock to regenerate lock file with the new mcp optional dependency
  • Fix WPS linting violations in test files (WPS110, WPS218, WPS204, WPS111, WPS214)
  • Verify all 30 tests pass and flake8 is clean
  • Verify poetry check --lock passes
  • CI runs pending maintainer approval (action_required status)

Copilot AI and others added 3 commits April 19, 2026 08:27
Adds an MCP (Model Context Protocol) server that exposes the linter
as tools for LLMs:
- `lint`: lint Python source code with JSON output
- `lint_file`: lint a Python file on disk
- `explain_rule`: get full documentation for a WPS violation rule

All tools return structured JSON with violation locations, source
context, and full rule explanations.

Agent-Logs-Url: https://github.com/wemake-services/wemake-python-styleguide/sessions/5b895ecf-0f6c-4263-9655-ed7fb9703eaa

Co-authored-by: sobolevn <4660275+sobolevn@users.noreply.github.com>
- Run `poetry lock` to include the new `mcp` optional dependency
- Rename `result` variables to `output`/`parsed`/`first` (WPS110)
- Split test_single_violation into code/location tests (WPS218)
- Extract result[0] into `first` variable (WPS204)
- Rename `v` to `entry` in list comprehension (WPS111)
- Split TestParseViolations into Basic/Enrichment classes (WPS214)

Agent-Logs-Url: https://github.com/wemake-services/wemake-python-styleguide/sessions/89e72bc3-65ef-47f4-9249-a3124fd28ebc

Co-authored-by: sobolevn <4660275+sobolevn@users.noreply.github.com>
Copilot AI requested a review from sobolevn April 19, 2026 09:25
@sobolevn
Copy link
Copy Markdown
Member

The result quality is really low :(
But, I can use this to setup my own tooling for mcp later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants