Skip to main content
Glama

Rope MCP

by brukhabtu
MIT License

Rope MCP

A Model Context Protocol (MCP) server with companion CLI that exposes Python Rope refactoring library capabilities to Claude Code and command-line users.

Features

  • Dual Interface: Both MCP server for Claude Code integration and CLI for direct use
  • Safe Refactoring: Symbol renaming and method extraction with built-in safety checks
  • Code Analysis: Symbol definition finding, reference tracking, and object information
  • Backup System: Automatic file backups with easy restore capabilities
  • Shared Core: Identical functionality across MCP and CLI interfaces

Quick Start

Installation

# Install from PyPI (when released) pip install rope-mcp # Or install from source git clone https://github.com/brukhabtu/rope-mcp.git cd rope-mcp pip install -e .

CLI Usage

# Initialize project rope-mcp init-project # Analyze a symbol rope-mcp analyze-symbol --file src/utils.py --line 23 --column 4 # Rename a symbol (with preview) rope-mcp rename-symbol --file src/utils.py --line 23 --column 4 --new-name "better_name" --dry-run rope-mcp rename-symbol --file src/utils.py --line 23 --column 4 --new-name "better_name" # Extract method rope-mcp extract-method --file src/utils.py --start-line 45 --end-line 67 --method-name "validate_input"

Claude Code Integration

Add to your Claude Code MCP configuration:

{ "mcpServers": { "rope": { "command": "rope-mcp-server", "args": [], "env": {} } } }

Documentation

Development Status

🚧 In Development - See PROJECT_PLAN.md for roadmap and current status.

Contributing

See the Implementation Roadmap for development phases and contributing guidelines.

License

MIT License - see LICENSE for details.

-
security - not tested
A
license - permissive license
-
quality - not tested

A Model Context Protocol server that exposes Python Rope refactoring capabilities to Claude Code, enabling safe symbol renaming, method extraction, code analysis, and more.

  1. Features
    1. Quick Start
      1. Installation
      2. CLI Usage
      3. Claude Code Integration
    2. Documentation
      1. Development Status
        1. Contributing
          1. License

            Related MCP Servers

            • -
              security
              A
              license
              -
              quality
              A Python-based server that implements the Model Context Protocol to interface with Claude Desktop as an MCP client, supporting interaction through efficient memory management.
              Last updated -
              1
              Python
              MIT License
            • -
              security
              A
              license
              -
              quality
              A Model Context Protocol server that extracts and analyzes Python code structures, focusing on import/export relationships between files to help LLMs understand code context.
              Last updated -
              4
              Python
              MIT License
            • -
              security
              F
              license
              -
              quality
              A Model Context Protocol server that enables AI assistants like Claude to perform Python development tasks through file operations, code analysis, project management, and safe code execution.
              Last updated -
              1
              Python
              • Linux
              • Apple
            • A
              security
              A
              license
              A
              quality
              An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.
              Last updated -
              8
              86
              JavaScript
              MIT License

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/brukhabtu/rope-mcp'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server