
Ohm Mcp
Let agents apply AST-safe Python refactorings with rollback instead of brittle search-and-replace edits.
Overview
OHM MCP is an MCP server for the Build phase that runs AST-based Python refactorings with rollback for agent-driven code changes.
What is this MCP server?
- AST-based Python refactorings designed to be safer than text patches
- Rollback support when a transform is wrong or incomplete
- Published on npm and PyPI as ohm-mcp 1.0.1 with stdio transport
- Fits agent-driven rename, extract, and structural cleanups
- Developer-tool MCP, not a linter-only reporter
- Server version 1.0.1
- Dual registry: npm and PyPI identifier ohm-mcp
- stdio MCP transport
Community signal: 2 GitHub stars.
What problem does it solve?
AI agents often break Python codebases with naive refactors that miss scope, imports, and syntax edge cases.
Who is it for?
Solo builders on Python backends who want agents to execute real refactors, not just suggest them.
Skip if: Non-Python stacks, one-line typo fixes, or teams that forbid automated structural edits.
What do I get? / Deliverables
Structural Python changes go through AST-aware tools with rollback so backend code stays shippable after agent edits.
- Applied AST-based Python refactors
- Rollback path when a transformation fails
- Cleaner module structure without manual patch churn
Recommended MCP Servers
Journey fit
Refactoring live Python backends is core Build work; the server accelerates structural changes while you are still shaping the product. Backend is the primary shelf because OHM operates on Python AST transforms for application and library code.
How it compares
AST refactoring MCP server, not a generic multi-language IDE refactor or format-on-save plugin.
Common Questions / FAQ
Who is OHM MCP for?
Developers shipping Python APIs, scripts, or services with AI agents who need dependable automated refactors.
When should I use OHM MCP?
Use it in Build when renaming modules, extracting functions, or cleaning debt and you want AST safety plus rollback.
How do I add OHM MCP to my agent?
Install ohm-mcp from npm or PyPI, add the stdio MCP server entry in your agent config, and run transforms against your Python project root.