# MCP Python Refactoring
[](https://opensource.org/licenses/MIT)
[](https://www.python.org/downloads/)
[](https://modelcontextprotocol.io/)
**A Model Context Protocol (MCP) server that analyzes Python code and provides guided refactoring suggestions without automatically modifying your code.**
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 |
## Installation
### Quick Start with uvx (Recommended)
```bash
# Install and run directly from GitHub
uvx --from git+https://github.com/slamer59/mcp-python-refactoring.git mcp-python-refactoring
```
### Development Installation
```bash
# Clone and setup for development
git clone https://github.com/slamer59/mcp-python-refactoring.git
cd mcp-python-refactoring
uv sync
```
### Manual Installation
```bash
# Core dependencies
uv add rope radon vulture jedi libcst mccabe mcp
# SSE support (optional)
uv add fastapi uvicorn
```
## Available MCP Tools
### Unified Server
**Single Server** (`mcp_server.py`): Both guide-only and apply-changes modes in one server
**Connection Options**:
- **stdin/stdout**: `python mcp_server.py` (default)
- **SSE (Server-Sent Events)**: `python mcp_server.py --sse [port]` (web-based)
### Tools
#### 1. `analyze_python_code`
Comprehensive analysis with optional automatic refactoring.
**Parameters:**
- `content` (required): Python file content as string
- `mode` (optional): "guide_only" (default) or "apply_changes"
- `file_path` (optional): Path to the file for context
- `line_threshold` (optional): Minimum lines for long functions (default: 20)
**Mode: guide_only** - Returns instructions only
**Mode: apply_changes** - Returns modified code
#### 2. `extract_function`
Extract specific functions with guide or apply mode.
**Parameters:**
- `content` (required): Python file content
- `mode` (optional): "guide_only" or "apply_changes"
- `function_name` (optional): Specific function to target
- `start_line`, `end_line` (for apply_changes): Exact extraction range
- `new_function_name` (for apply_changes): Name for extracted function
#### 3. `quick_analyze`
Fast analysis for immediate refactoring opportunities.
**Parameters:**
- `content` (required): Python file content
**Returns:** Quick summary of long functions and parameter issues
## Analysis Capabilities
**Code Quality Issues Detected:**
- Functions over 20 lines (extract method opportunities)
- High cyclomatic complexity (>10)
- Functions with too many parameters (>5)
- Dead/unused code (consolidated suggestions)
- Low maintainability index (<20)
**Additional Analysis Tools:**
- **Security Analysis**: Vulnerability detection and security best practices
- **Performance Analysis**: Bottleneck identification and optimization suggestions
- **Type Hints**: Missing type annotation detection
- **Documentation**: Docstring coverage and quality assessment
**Professional Tools Used:**
- **[Rope](https://github.com/python-rope/rope)**: Professional refactoring analysis
- **[Radon](https://github.com/rubik/radon)**: Code complexity metrics
- **[Vulture](https://github.com/jendrikseipp/vulture)**: Dead code detection
- **[Jedi](https://github.com/davidhalter/jedi)**: Semantic code analysis
- **[LibCST](https://github.com/Instagram/LibCST)**: Syntax tree manipulation
## Testing and Debugging
### Test with MCP Inspector
```bash
# Launch MCP Inspector
bunx @modelcontextprotocol/inspector
# In the web interface:
# Command: python
# Args: mcp_server.py
# Working Directory: /path/to/your/project
```
**Test Both Modes in Inspector:**
**Guide Mode Test:**
```json
{
"content": "def long_function():\n print('line1')\n # ... 20+ lines",
"mode": "guide_only"
}
```
**Apply Mode Test:**
```json
{
"content": "def long_function():\n print('line1')\n # ... 20+ lines",
"mode": "apply_changes"
}
```
### Test with Bun (Fastest)
```bash
# Install Bun if not available
curl -fsSL https://bun.sh/install | bash
# Install MCP SDK
bun install -g @modelcontextprotocol/sdk
# Run tests
export PATH=.venv/bin:$PATH && bun run test_unified.js
```
### Test Standalone (No MCP)
```bash
# Simple Python test
python test_tool.py
# Test with example file
python mcp_server.py examples/example_code.py
```
### Debug Server Issues
```bash
# Check dependencies
uv sync
# Verify MCP imports
python -c "import mcp; print('MCP available')"
# Test individual tools
python -c "
from src.mcp_refactoring_assistant.server import EnhancedRefactoringAnalyzer
analyzer = EnhancedRefactoringAnalyzer()
print('Analyzer working')
"
```
## Example Usage
### Educational Workflow
1. AI assistant calls `analyze_python_code` with `guide_only` mode
2. Tool returns structured suggestions with precise steps
3. Developer follows step-by-step instructions
4. Developer learns refactoring patterns through practice
### Productivity Workflow
1. AI assistant calls `analyze_python_code` with `apply_changes` mode
2. Tool returns modified code with applied refactorings
3. Developer reviews changes and applies as needed
4. Faster refactoring for experienced developers
### Sample MCP Response (Guide Mode)
```json
{
"analysis_summary": {
"total_issues_found": 2,
"medium_priority": 1,
"low_priority": 1
},
"refactoring_guidance": [
{
"issue_type": "extract_function",
"location": "Function 'process_data' lines 45-78",
"description": "Long function (34 lines) with extractable blocks",
"precise_steps": [
"SELECT lines 45-52 (validation block)",
"CREATE function: validate_input(data)",
"REPLACE with: is_valid = validate_input(data)"
]
},
{
"issue_type": "dead_code",
"location": "Multiple locations (6 items)",
"description": "6 unused items found",
"precise_steps": [
"Review all unused items listed below:",
"• Line 11: Unused import 're'",
"• Line 12: Unused import 'Optional'",
"Verify each item is truly unused",
"Remove confirmed unused code"
]
}
]
}
```
## Integration with Coding Assistants
### Claude Code/CLI
Add to your MCP configuration:
```json
{
"servers": {
"python-refactoring": {
"command": "python",
"args": ["path/to/mcp_server.py"]
}
}
}
```
### Claude Desktop
Add to `claude_desktop_config.json`:
```json
{
"mcpServers": {
"python-refactoring": {
"command": "python",
"args": ["path/to/mcp_server.py"]
}
}
}
```
### Cline (VSCode Extension)
In VSCode settings or `.vscode/settings.json`:
```json
{
"cline.mcpServers": {
"python-refactoring": {
"command": "python",
"args": ["path/to/mcp_server.py"]
}
}
}
```
### Cursor
Add to Cursor's MCP configuration:
```json
{
"mcpServers": {
"python-refactoring": {
"command": "python",
"args": ["path/to/mcp_server.py"]
}
}
}
```
### Continue (VSCode Extension)
In `~/.continue/config.json`:
```json
{
"mcpServers": [
{
"name": "python-refactoring",
"command": "python",
"args": ["path/to/mcp_server.py"]
}
]
}
```
### Windsurf
Add to Windsurf MCP configuration:
```json
{
"servers": {
"python-refactoring": {
"command": "python",
"args": ["path/to/mcp_server.py"]
}
}
}
```
### Aider
Use with MCP bridge or direct integration:
```bash
aider --mcp-server "python path/to/mcp_server.py"
```
### OpenHands (formerly OpenDevin)
In OpenHands configuration:
```yaml
mcp_servers:
python-refactoring:
command: python
args: ["path/to/mcp_server.py"]
```
### Roo-Code
Add to Roo-Code's MCP settings:
```json
{
"mcpServers": {
"python-refactoring": {
"command": "python",
"args": ["path/to/mcp_server.py"]
}
}
}
```
### Codex CLI
Add to `~/.codex/config.toml`:
```toml
[mcp_servers.python-refactoring]
command = "python"
args = ["path/to/mcp_server.py"]
```
### Terminal-based clients
For most terminal-based MCP clients:
```bash
# With uvx
client-name --mcp-server "uvx --from git+https://github.com/slamer59/mcp-python-refactoring.git mcp-python-refactoring"
# With local installation
client-name --mcp-server "python /path/to/mcp_server.py"
```
### SSE Mode (Web-based clients)
For web-based clients that support SSE connections:
1. Start the server in SSE mode:
```bash
python mcp_server.py --sse 3001
```
2. Configure your client to connect to:
```
http://localhost:3001/sse
```
### Using with mcpo (ChatGPT and others)
For clients without native MCP support:
```bash
# Install mcpo
pip install mcpo
# Bridge MCP to OpenAI-compatible API
mcpo --mcp-server "python path/to/mcp_server.py" --port 8080
```
Then configure your client to use `http://localhost:8080` as API endpoint.
### Notes
- Replace `path/to/mcp_server.py` with the actual absolute path to your server
- For uvx installation, use the full uvx command instead of local paths
- Some clients may require additional configuration or have different syntax
- Always use absolute paths to avoid configuration issues
- Test the connection with the client's MCP debugging tools if available
## How It Works
1. **Analysis**: Server analyzes Python code using multiple professional tools
2. **Detection**: Identifies specific refactoring opportunities with metrics
3. **Guidance**: Provides precise line numbers and step-by-step instructions
4. **Integration**: AI assistant interprets results and guides developer
5. **Control**: Developer maintains full control over all code changes
## User Feedback
Users report significant improvements in code quality understanding and refactoring skills when using this tool with AI assistants. The guided approach helps developers learn refactoring patterns while maintaining control over code changes.
*"Finally, a tool that teaches me refactoring instead of doing it for me"*
*"The precise line numbers make it easy to follow the suggestions"*
*"Game changer for working with legacy code"*
## Troubleshooting
**MCP Connection Issues:**
- Ensure all dependencies installed: `uv sync`
- Check Python path: `which python`
- Verify MCP import: `python -c "import mcp"`
**Analysis Not Working:**
- Test analyzer directly: `python test_tool.py`
- Check file permissions
- Verify example file exists: `ls examples/`
**Tool Responses Empty:**
- Check if code has functions to analyze (minimum complexity threshold)
- Increase line threshold for testing: `"line_threshold": 10`
- Verify file syntax is valid Python
- Ensure virtual environment is activated
**SSE Connection Issues:**
- Verify port is not in use: `netstat -an | grep 3001`
- Check firewall settings for local connections
- Ensure FastAPI and Uvicorn are installed: `uv add fastapi uvicorn`
**Performance Issues:**
- For large codebases (>100 files), consider using file-specific analysis
- Increase timeout settings in MCP client configuration
- Use `quick_analyze` for immediate feedback on specific functions
## License
MIT License - Free for personal and commercial use.
Raw data
{
"_id": null,
"home_page": null,
"name": "mcp-python-refactoring",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.13",
"maintainer_email": null,
"keywords": "ai-assistant, code-analysis, mcp, python, refactoring",
"author": null,
"author_email": "slamer59 <your.email@example.com>",
"download_url": "https://files.pythonhosted.org/packages/25/da/80fc573923e28ce1789b356c5523d6948e5e444b2a137d8a827928eb6bff/mcp_python_refactoring-0.1.0.tar.gz",
"platform": null,
"description": "# MCP Python Refactoring\n\n[](https://opensource.org/licenses/MIT)\n[](https://www.python.org/downloads/)\n[](https://modelcontextprotocol.io/)\n\n**A Model Context Protocol (MCP) server that analyzes Python code and provides guided refactoring suggestions without automatically modifying your code.**\n\nThis 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.\n\n## What This Tool Does\n\n**For AI Coding Assistants:**\n- Provides structured JSON responses with refactoring opportunities\n- Identifies long functions, high complexity code, and dead code\n- Gives precise line numbers for extract method refactoring\n- Uses professional tools for comprehensive analysis\n\n**For Developers:**\n- Get step-by-step refactoring instructions\n- Maintain full control over code changes\n- Learn refactoring patterns through guided practice\n- Improve code quality systematically\n\n## How It Differs\n\n| Approach | This Tool | Traditional Refactoring Tools |\n|----------|-----------|-------------------------------|\n| Integration | Works with any LLM/AI assistant | IDE-specific or standalone |\n| Guidance | Step-by-step instructions with line numbers | Automatic changes only |\n| Learning | Educational approach teaches patterns | No learning component |\n| Control | Developer maintains full control | Tool makes all decisions |\n\n## Installation\n\n### Quick Start with uvx (Recommended)\n\n```bash\n# Install and run directly from GitHub\nuvx --from git+https://github.com/slamer59/mcp-python-refactoring.git mcp-python-refactoring\n```\n\n### Development Installation\n\n```bash\n# Clone and setup for development\ngit clone https://github.com/slamer59/mcp-python-refactoring.git\ncd mcp-python-refactoring\nuv sync\n```\n\n### Manual Installation\n\n```bash\n# Core dependencies\nuv add rope radon vulture jedi libcst mccabe mcp\n\n# SSE support (optional)\nuv add fastapi uvicorn\n```\n\n## Available MCP Tools\n\n### Unified Server\n\n**Single Server** (`mcp_server.py`): Both guide-only and apply-changes modes in one server\n\n**Connection Options**:\n- **stdin/stdout**: `python mcp_server.py` (default)\n- **SSE (Server-Sent Events)**: `python mcp_server.py --sse [port]` (web-based)\n\n### Tools\n\n#### 1. `analyze_python_code`\nComprehensive analysis with optional automatic refactoring.\n\n**Parameters:**\n- `content` (required): Python file content as string\n- `mode` (optional): \"guide_only\" (default) or \"apply_changes\"\n- `file_path` (optional): Path to the file for context\n- `line_threshold` (optional): Minimum lines for long functions (default: 20)\n\n**Mode: guide_only** - Returns instructions only\n**Mode: apply_changes** - Returns modified code\n\n#### 2. `extract_function`\nExtract specific functions with guide or apply mode.\n\n**Parameters:**\n- `content` (required): Python file content\n- `mode` (optional): \"guide_only\" or \"apply_changes\" \n- `function_name` (optional): Specific function to target\n- `start_line`, `end_line` (for apply_changes): Exact extraction range\n- `new_function_name` (for apply_changes): Name for extracted function\n\n#### 3. `quick_analyze`\nFast analysis for immediate refactoring opportunities.\n\n**Parameters:**\n- `content` (required): Python file content\n\n**Returns:** Quick summary of long functions and parameter issues\n\n## Analysis Capabilities\n\n**Code Quality Issues Detected:**\n- Functions over 20 lines (extract method opportunities)\n- High cyclomatic complexity (>10)\n- Functions with too many parameters (>5)\n- Dead/unused code (consolidated suggestions)\n- Low maintainability index (<20)\n\n**Additional Analysis Tools:**\n- **Security Analysis**: Vulnerability detection and security best practices\n- **Performance Analysis**: Bottleneck identification and optimization suggestions\n- **Type Hints**: Missing type annotation detection\n- **Documentation**: Docstring coverage and quality assessment\n\n**Professional Tools Used:**\n- **[Rope](https://github.com/python-rope/rope)**: Professional refactoring analysis\n- **[Radon](https://github.com/rubik/radon)**: Code complexity metrics\n- **[Vulture](https://github.com/jendrikseipp/vulture)**: Dead code detection\n- **[Jedi](https://github.com/davidhalter/jedi)**: Semantic code analysis\n- **[LibCST](https://github.com/Instagram/LibCST)**: Syntax tree manipulation\n\n## Testing and Debugging\n\n### Test with MCP Inspector\n\n```bash\n# Launch MCP Inspector\nbunx @modelcontextprotocol/inspector\n\n# In the web interface:\n# Command: python\n# Args: mcp_server.py\n# Working Directory: /path/to/your/project\n```\n\n**Test Both Modes in Inspector:**\n\n**Guide Mode Test:**\n```json\n{\n \"content\": \"def long_function():\\n print('line1')\\n # ... 20+ lines\",\n \"mode\": \"guide_only\"\n}\n```\n\n**Apply Mode Test:**\n```json\n{\n \"content\": \"def long_function():\\n print('line1')\\n # ... 20+ lines\", \n \"mode\": \"apply_changes\"\n}\n```\n\n### Test with Bun (Fastest)\n\n```bash\n# Install Bun if not available\ncurl -fsSL https://bun.sh/install | bash\n\n# Install MCP SDK\nbun install -g @modelcontextprotocol/sdk\n\n# Run tests\nexport PATH=.venv/bin:$PATH && bun run test_unified.js\n```\n\n### Test Standalone (No MCP)\n\n```bash\n# Simple Python test\npython test_tool.py\n\n# Test with example file\npython mcp_server.py examples/example_code.py\n```\n\n### Debug Server Issues\n\n```bash\n# Check dependencies\nuv sync\n\n# Verify MCP imports\npython -c \"import mcp; print('MCP available')\"\n\n# Test individual tools\npython -c \"\nfrom src.mcp_refactoring_assistant.server import EnhancedRefactoringAnalyzer\nanalyzer = EnhancedRefactoringAnalyzer()\nprint('Analyzer working')\n\"\n```\n\n## Example Usage\n\n### Educational Workflow\n1. AI assistant calls `analyze_python_code` with `guide_only` mode\n2. Tool returns structured suggestions with precise steps\n3. Developer follows step-by-step instructions\n4. Developer learns refactoring patterns through practice\n\n### Productivity Workflow \n1. AI assistant calls `analyze_python_code` with `apply_changes` mode\n2. Tool returns modified code with applied refactorings\n3. Developer reviews changes and applies as needed\n4. Faster refactoring for experienced developers\n\n### Sample MCP Response (Guide Mode)\n\n```json\n{\n \"analysis_summary\": {\n \"total_issues_found\": 2,\n \"medium_priority\": 1,\n \"low_priority\": 1\n },\n \"refactoring_guidance\": [\n {\n \"issue_type\": \"extract_function\",\n \"location\": \"Function 'process_data' lines 45-78\",\n \"description\": \"Long function (34 lines) with extractable blocks\",\n \"precise_steps\": [\n \"SELECT lines 45-52 (validation block)\",\n \"CREATE function: validate_input(data)\",\n \"REPLACE with: is_valid = validate_input(data)\"\n ]\n },\n {\n \"issue_type\": \"dead_code\", \n \"location\": \"Multiple locations (6 items)\",\n \"description\": \"6 unused items found\",\n \"precise_steps\": [\n \"Review all unused items listed below:\",\n \"\u2022 Line 11: Unused import 're'\",\n \"\u2022 Line 12: Unused import 'Optional'\",\n \"Verify each item is truly unused\",\n \"Remove confirmed unused code\"\n ]\n }\n ]\n}\n```\n\n## Integration with Coding Assistants\n\n### Claude Code/CLI\nAdd to your MCP configuration:\n\n```json\n{\n \"servers\": {\n \"python-refactoring\": {\n \"command\": \"python\",\n \"args\": [\"path/to/mcp_server.py\"]\n }\n }\n}\n```\n\n### Claude Desktop\nAdd to `claude_desktop_config.json`:\n\n```json\n{\n \"mcpServers\": {\n \"python-refactoring\": {\n \"command\": \"python\",\n \"args\": [\"path/to/mcp_server.py\"]\n }\n }\n}\n```\n\n### Cline (VSCode Extension)\nIn VSCode settings or `.vscode/settings.json`:\n\n```json\n{\n \"cline.mcpServers\": {\n \"python-refactoring\": {\n \"command\": \"python\",\n \"args\": [\"path/to/mcp_server.py\"]\n }\n }\n}\n```\n\n### Cursor\nAdd to Cursor's MCP configuration:\n\n```json\n{\n \"mcpServers\": {\n \"python-refactoring\": {\n \"command\": \"python\",\n \"args\": [\"path/to/mcp_server.py\"]\n }\n }\n}\n```\n\n### Continue (VSCode Extension)\nIn `~/.continue/config.json`:\n\n```json\n{\n \"mcpServers\": [\n {\n \"name\": \"python-refactoring\",\n \"command\": \"python\",\n \"args\": [\"path/to/mcp_server.py\"]\n }\n ]\n}\n```\n\n### Windsurf\nAdd to Windsurf MCP configuration:\n\n```json\n{\n \"servers\": {\n \"python-refactoring\": {\n \"command\": \"python\",\n \"args\": [\"path/to/mcp_server.py\"]\n }\n }\n}\n```\n\n### Aider\nUse with MCP bridge or direct integration:\n\n```bash\naider --mcp-server \"python path/to/mcp_server.py\"\n```\n\n### OpenHands (formerly OpenDevin)\nIn OpenHands configuration:\n\n```yaml\nmcp_servers:\n python-refactoring:\n command: python\n args: [\"path/to/mcp_server.py\"]\n```\n\n### Roo-Code\nAdd to Roo-Code's MCP settings:\n\n```json\n{\n \"mcpServers\": {\n \"python-refactoring\": {\n \"command\": \"python\",\n \"args\": [\"path/to/mcp_server.py\"]\n }\n }\n}\n```\n\n### Codex CLI\nAdd to `~/.codex/config.toml`:\n\n```toml\n[mcp_servers.python-refactoring]\ncommand = \"python\"\nargs = [\"path/to/mcp_server.py\"]\n```\n\n### Terminal-based clients\nFor most terminal-based MCP clients:\n\n```bash\n# With uvx\nclient-name --mcp-server \"uvx --from git+https://github.com/slamer59/mcp-python-refactoring.git mcp-python-refactoring\"\n\n# With local installation \nclient-name --mcp-server \"python /path/to/mcp_server.py\"\n```\n\n### SSE Mode (Web-based clients)\nFor web-based clients that support SSE connections:\n\n1. Start the server in SSE mode:\n```bash\npython mcp_server.py --sse 3001\n```\n\n2. Configure your client to connect to:\n```\nhttp://localhost:3001/sse\n```\n\n### Using with mcpo (ChatGPT and others)\nFor clients without native MCP support:\n\n```bash\n# Install mcpo\npip install mcpo\n\n# Bridge MCP to OpenAI-compatible API\nmcpo --mcp-server \"python path/to/mcp_server.py\" --port 8080\n```\n\nThen configure your client to use `http://localhost:8080` as API endpoint.\n\n### Notes\n\n- Replace `path/to/mcp_server.py` with the actual absolute path to your server\n- For uvx installation, use the full uvx command instead of local paths\n- Some clients may require additional configuration or have different syntax\n- Always use absolute paths to avoid configuration issues\n- Test the connection with the client's MCP debugging tools if available\n\n## How It Works\n\n1. **Analysis**: Server analyzes Python code using multiple professional tools\n2. **Detection**: Identifies specific refactoring opportunities with metrics\n3. **Guidance**: Provides precise line numbers and step-by-step instructions\n4. **Integration**: AI assistant interprets results and guides developer\n5. **Control**: Developer maintains full control over all code changes\n\n## User Feedback\n\nUsers report significant improvements in code quality understanding and refactoring skills when using this tool with AI assistants. The guided approach helps developers learn refactoring patterns while maintaining control over code changes.\n\n*\"Finally, a tool that teaches me refactoring instead of doing it for me\"* \n*\"The precise line numbers make it easy to follow the suggestions\"* \n*\"Game changer for working with legacy code\"*\n\n## Troubleshooting\n\n**MCP Connection Issues:**\n- Ensure all dependencies installed: `uv sync`\n- Check Python path: `which python`\n- Verify MCP import: `python -c \"import mcp\"`\n\n**Analysis Not Working:**\n- Test analyzer directly: `python test_tool.py`\n- Check file permissions\n- Verify example file exists: `ls examples/`\n\n**Tool Responses Empty:**\n- Check if code has functions to analyze (minimum complexity threshold)\n- Increase line threshold for testing: `\"line_threshold\": 10`\n- Verify file syntax is valid Python\n- Ensure virtual environment is activated\n\n**SSE Connection Issues:**\n- Verify port is not in use: `netstat -an | grep 3001`\n- Check firewall settings for local connections\n- Ensure FastAPI and Uvicorn are installed: `uv add fastapi uvicorn`\n\n**Performance Issues:**\n- For large codebases (>100 files), consider using file-specific analysis\n- Increase timeout settings in MCP client configuration\n- Use `quick_analyze` for immediate feedback on specific functions\n\n## License\n\nMIT License - Free for personal and commercial use.",
"bugtrack_url": null,
"license": "MIT",
"summary": "MCP tool to guide Python code refactoring without automatic changes",
"version": "0.1.0",
"project_urls": {
"Homepage": "https://github.com/slamer59/mcp-python-refactoring",
"Issues": "https://github.com/slamer59/mcp-python-refactoring/issues",
"Repository": "https://github.com/slamer59/mcp-python-refactoring"
},
"split_keywords": [
"ai-assistant",
" code-analysis",
" mcp",
" python",
" refactoring"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "8936761cd5a30899c33d8e73ff1338f74af12af1a7c45d29d71d37114fc2d2f6",
"md5": "d83750ffc53fa1b42ba0917a904a4725",
"sha256": "5ca0ef4300eb520a66e83e988c0f9edf3fd177a5a37555abf2d4f9464fe29ca8"
},
"downloads": -1,
"filename": "mcp_python_refactoring-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d83750ffc53fa1b42ba0917a904a4725",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.13",
"size": 14946,
"upload_time": "2025-08-31T11:21:12",
"upload_time_iso_8601": "2025-08-31T11:21:12.182008Z",
"url": "https://files.pythonhosted.org/packages/89/36/761cd5a30899c33d8e73ff1338f74af12af1a7c45d29d71d37114fc2d2f6/mcp_python_refactoring-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "25da80fc573923e28ce1789b356c5523d6948e5e444b2a137d8a827928eb6bff",
"md5": "0130226a659c71338004c9c617e1040f",
"sha256": "d9b2bd4c68b59d657492b9663476803127f4c1267b87aab28cb93c4c2d2ceaa0"
},
"downloads": -1,
"filename": "mcp_python_refactoring-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "0130226a659c71338004c9c617e1040f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.13",
"size": 22007,
"upload_time": "2025-08-31T11:21:13",
"upload_time_iso_8601": "2025-08-31T11:21:13.818126Z",
"url": "https://files.pythonhosted.org/packages/25/da/80fc573923e28ce1789b356c5523d6948e5e444b2a137d8a827928eb6bff/mcp_python_refactoring-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-31 11:21:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "slamer59",
"github_project": "mcp-python-refactoring",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "mcp-python-refactoring"
}