Explore
Contribute
Sign In

Explore

  1. Explore
  2. /
  3. Python Refactoring Assistant

Python Refactoring Assistant

Python Refactoring Assistant

mcp

Educational Python refactoring assistant that provides guided suggestions for AI assistants. Features: • Step-by-step refactoring instructions without modifying code • Comprehensive code analysis using professional tools (Rope, Radon, Vulture, Jedi, LibCST, Pyrefly) • Educational approach teaching refactoring patterns through guided practice • Support for both guide-only and apply-changes modes • Identifies long functions, high complexity, dead code, and type issues • Provides precise line numbers and specific refactoring instructions • Compatible with all AI assistants (Claude, GPT, Cursor, Continue, etc.) Perfect for developers learning refactoring patterns while maintaining full control over code changes. Acts as a refactoring mentor rather than an automated code modifier.

1.5K

9 Tools

Packaged by
Add to Docker Desktop

Version 4.43 or later needs to be installed to add the server automatically

OverviewTools (9)Manual installation
Docker Hub⁠Github repository⁠

You can install this MCP server using:

​

Note: You should still configure the server and specify required secrets after installing it.

See client instructions below for how to connect the MCP Toolkit gateway to each client.

https://claude.ai/download⁠

Connect the MCP Toolkit gateway to Claude Desktop using:

​

Once connected, you can install this MCP server using:

​

Note: You should still configure the server and specify required secrets after installing it.

Restart Claude Desktop for the changes to take effect.

  1. Open Claude Settings.
  2. Select the Developer tab.
  3. Select the Edit Config button.
  4. Add mcp-python-refactoring to the mcpServers section:
{
  "mcpServers": {
    "mcp-python-refactoring": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
      - mcp/mcp-python-refactoring@sha256:4cd4303da424f021f03e9fafc46187a08bcab212ead6f1e39867afee1d42cd24
      ]
    }
  }
}

https://www.continue.dev/⁠

Connect the MCP Toolkit gateway to Continue.dev using:

​

Once connected, you can install this MCP server using:

​

Note: You should still configure the server and specify required secrets after installing it.

  1. In your global .continue folder (~/.continue on Mac/Linux, %USERPROFILE%.continue on Windows), create a a folder called mcpServers.
  2. Create a new file named mcp-python-refactoring.yaml in the mcpServers folder.
  3. Write the following contents to mcp-python-refactoring.yaml and save.
name: Docker MCP Python Refactoring Assistant
version: 1.0.1
schema: v1

mcpServers:
  - name: Python Refactoring Assistant
    command: docker
    args:
      - run
      - --rm
      - -i
      - mcp/mcp-python-refactoring@sha256:4cd4303da424f021f03e9fafc46187a08bcab212ead6f1e39867afee1d42cd24

https://www.cursor.com/downloads⁠

Connect the MCP Toolkit gateway to Cursor using:

​

Once connected, you can install this MCP server using:

​

Note: You should still configure the server and specify required secrets after installing it.

  1. Open Cursor Settings.
  2. Select the MCP Tools tab.
  3. Select the New Custom MCP button.
  4. Add mcp-python-refactoring to the mcpServers section:
{
  "mcpServers": {
    "mcp-python-refactoring": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
      - mcp/mcp-python-refactoring@sha256:4cd4303da424f021f03e9fafc46187a08bcab212ead6f1e39867afee1d42cd24
      ]
    }
  }
}

https://code.visualstudio.com/⁠

Define the MCP Toolkit gateway as a server in the MCP Visual Studio Code user settings. Learn more⁠

"mcp": {
  "servers": {
    "MCP_DOCKER": {
      "command": "docker",
      "args": [
        "mcp",
        "gateway",
        "run"
      ],
      "type": "stdio"
    }
  }
}

Once connected, you can install this MCP server using:

​

Note: You should still configure the server and specify required secrets after installing it.

https://docs.docker.com/ai/gordon/⁠

Connect the MCP Toolkit gateway to Gordon using:

​

Once connected, you can install this MCP server using:

​

Note: You should still configure the server and specify required secrets after installing it.

Manual installation

You can install the MCP server using:

​

Installation for

Related servers

© 2025 Docker, Inc. All rights reserved. | Terms of Service | Subscription Service Agreement | Privacy | Legal