Ohm MCP Server

AST-based Python refactoring MCP server with safe automated refactorings and rollback

Local serverstdioPython

What is the Ohm MCP Server?

AST-based Python refactoring MCP server with safe automated refactorings and rollback

The short version

Works with GitHub Copilot, Cursor IDE, Cline, and any MCP-compatible AI assistant.

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
analyze_codebaseComprehensive code analysis
propose_function_refactorFunction-level refactor planning
explain_refactoringExplain refactoring patterns
create_refactor_patchGenerate unified diff patches
analyze_architectureDetect God Objects, SOLID violations
suggest_design_patternsRecommend patterns (Strategy, Factory, Observer)
analyze_tight_couplingFind coupling issues
suggest_di_refactorGenerate DI code
extract_method_astExtract code into function
suggest_extractable_methodsFind extractable blocks
detect_dead_codeFind unused code
refactor_importsUpdate imports project-wide
refactor_single_file_importsRefactor imports in one file
analyze_wildcard_importsFind wildcard imports

How to install the Ohm MCP Server

claude mcp add ohm --env PYTHONUNBUFFERED=your-value -- npx -y ohm-mcp

Configuration

VariableDescriptionRequired
PYTHONUNBUFFEREDConfiguration value read at startup.Optional

Example prompts to try

  • “Use Ohm to analyze codebase.”
  • “Use Ohm to propose function refactor.”
  • “Use Ohm to explain refactoring.”

Frequently asked questions

AST-based Python refactoring MCP server with safe automated refactorings and rollback Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.