rope-mcp-server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {
"tasks": {
"list": {},
"cancel": {},
"requests": {
"tools": {
"call": {}
},
"prompts": {
"get": {}
},
"resources": {
"read": {}
}
}
}
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_symbolsA | List all top-level symbols in a Python file. Args: project_path: Root directory of the Python project file_path: File path relative to project_path Returns: JSON with symbols: [{"name": "Foo", "type": "class", "line": 5, "byte_offset": 42}, ...] |
| move_symbolA | Move a class or function to another file. Updates all imports across the project automatically. Args: project_path: Root directory of the Python project source_file: Source file path relative to project_path symbol_name: Name of the class or function to move dest_file: Destination file path (created if doesn't exist) Returns: JSON with success status and list of changed files |
| move_moduleB | Move a module or package to another folder. Updates all imports across the project automatically. Args: project_path: Root directory of the Python project module_path: Path to module file or package folder (relative to project_path) dest_folder: Destination folder path (relative to project_path) Returns: JSON with success status and list of changed files |
| move_and_rename_moduleA | Move a module to a folder and optionally rename it. This is a two-step operation:
Auto-detection: If module is Includes workaround for Rope bug: Files that import from BOTH the destination package AND the module being moved are temporarily hidden during the move, then their imports are fixed manually. Example: move_and_rename_module( "views/service_contractor_extra.py", "views/service_contractor/", new_name="extra" # or None for auto-detect ) Result: views/service_contractor/extra.py Args: project_path: Root directory of the Python project module_path: Path to module file (relative to project_path) dest_folder: Destination folder path (relative to project_path) new_name: New name for the module (without .py), or None to auto-detect Returns: JSON with success status and list of changed files |
| convert_module_to_initA | Convert a module file into a package by moving it to init.py. Transforms Example:
This is the recommended way to convert a module to a package when you want to later split it into multiple files. Args: project_path: Root directory of the Python project module_path: Path to module file (relative to project_path), e.g. "app/views/foo.py" Returns: JSON with success status and new path |
| convert_module_to_packageA | Convert a module file into a package with the same name. Transforms Example:
This is a two-step process using Rope:
Args: project_path: Root directory of the Python project module_path: Path to module file (relative to project_path), e.g. "app/views/foo.py" Returns: JSON with success status and list of changed files |
| rename_symbolA | Rename a symbol including all references and imports across the project. Args: project_path: Root directory of the Python project file_path: File containing the symbol (relative to project_path) symbol_name: Current name of the symbol new_name: New name for the symbol Returns: JSON with success status and list of changed files |
| extract_methodA | Extract a code region as a new method. Args: project_path: Root directory of the Python project file_path: File path relative to project_path start_line: Start line (1-based) start_col: Start column (0-based) end_line: End line (1-based) end_col: End column (0-based) new_name: Name for the extracted method Returns: JSON with success status and list of changed files |
| inline_variableA | Inline a variable at all usage sites. Args: project_path: Root directory of the Python project file_path: File path relative to project_path variable_name: Name of the variable to inline line: Line number where variable is defined (1-based) Returns: JSON with success status and list of changed files |
| close_rope_projectA | Close a Rope project and release resources. Call this when done with refactoring to free memory. Args: project_path: Root directory of the Python project Returns: JSON with success status |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 10 tools
Each tool has a clearly distinct purpose: close project cleanup, two different module conversion strategies (to init vs to package), method extraction, variable inlining, symbol listing, module moving with optional rename, simple module moving, symbol moving, and symbol renaming. No two tools could be confused for the same operation.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., close_rope_project, convert_module_to_init, extract_method). Even multi-word verbs like move_and_rename_module are consistent, and no mixing of camelCase or other conventions occurs.
With 10 tools, the server is well-scoped for a Python refactoring assistant. Each tool addresses a specific refactoring or inspection task without unnecessary bloat or missing essential operations.
The tool set covers core refactorings (extract method, inline variable, rename symbol), module/package transformations, symbol movement, and project lifecycle (close). This provides a comprehensive surface for automated Python refactoring with no obvious dead ends.