Mcp Python Refactoring

by slamer59

367 downloads
Not rated
GitHub

About

Educational Python refactoring assistant with guided suggestions for AI assistants

Details

Author
slamer59
Downloads
367
Categories
Other, Developer Tools

- Analyzes Python code for refactoring opportunities
- Provides structured JSON guidance with line numbers
- Detects long functions, high complexity, dead code
- Uses professional tools:

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Mcp Python Refactoring
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install and run using uvx: uvx --from git+https://github.com/slamer59/mcp-python-refactoring.git python-refactor server. Add it to Claude Code with claude-code mcp add mcp-python-refactoring uvx --from git+https://github.com/slamer59/mcp-python-refactoring.git python-refactor server. For local development, run python -m mcp_refactoring_assistant server or use the python-refactor server entry point.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mcp python refactoring": {
            "python-refactoring": {
                "command": "uvx",
                "args": [
                    "--from",
                    "git+https://github.com/slamer59/mcp-python-refactoring.git",
                    "python-refactor",
                    "server"
                ]
            }
        }
    }
}

McpServers

{
    "python-refactoring": {
        "command": "uvx",
        "args": [
            "--from",
            "git+https://github.com/slamer59/mcp-python-refactoring.git",
            "python-refactor",
            "server"
        ]
    }
}

MCP Python Refactoring

License: MIT
Python 3.13+
MCP
Registry
Docker

A Model Context Protocol (MCP) server that analyzes Python code and provides guided refactoring suggestions without automatically modifying your code.

Keywords

python refactoring code-analysis mcp-server ai-assistant claude rope radon vulture jedi educational mentoring code-quality static-analysis complexity-analysis

This tool integrates with AI coding assistants (Claude, ChatGPT, Cursor, etc.) to provide intelligent refactoring guidance. Instead of making automatic code changes, it gives you precise instructions on how to improve your Python code, acting as your refactoring mentor.

What This Tool Does

For AI Coding Assistants:
- Provides structured JSON responses with refactoring opportunities
- Identifies long functions, high complexity code, and dead code
- Gives precise line numbers for extract method refactoring
- Uses professional tools for comprehensive analysis

For Developers:
- Get step-by-step refactoring instructions
- Maintain full control over code changes
- Learn refactoring patterns through guided practice
- Improve code quality systematically

How It Differs

| Approach | This Tool | Traditional Refactoring Tools |
| ----------- | ------------------------------------------- | ----------------------------- |
| Integration | Works with any LLM/AI assistant | IDE-specific or standalone |
| Guidance | Step-by-step instructions with line numbers | Automatic changes only |
| Learning | Educational approach teaches patterns | No learning component |
| Control | Developer maintains full control | Tool makes all decisions |

Registry Submissions

This MCP server is available across the entire MCP ecosystem:

Official MCP Registry

Published and Live: registry.modelcontextprotocol.io - Server name: io.github.slamer59/mcp-python-refactoring - Discoverable by all MCP-compatible clients

🟡 Docker MCP Registry

Pull Request Submitted: docker/mcp-registry #207 - Will be available as mcp/mcp-python-refactoring on Docker Hub - Includes enhanced security: signatures, SBOM, provenance tracking - Integrated into Docker Desktop's MCP Toolkit

🟡 Awesome MCP Servers Lists

Community Curated Lists: - appcypher/awesome-mcp-servers #180 - Development Tools section - punkpeye/awesome-mcp-servers #1321 - Code Execution section

📦 Installation Options

Once all registries are live, users can discover via: - MCP catalog - Official registry search - Docker Desktop - MCP Toolkit integration - Community lists - GitHub awesome lists - Docker Hub - mcp/mcp-python-refactoring (with enhanced security)

Docker Support

Using with Docker MCP Catalog

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.