Overview
java-refactoring-mcp is a tool that provides semantic Java refactoring capabilities for AI coding agents. It is backed by Eclipse JDT, the same engine used by IntelliJ and Eclipse IDEs, and allows agents to perform refactorings such as rename, extract method, move class, and more. The tool ensures that changes are applied correctly across all source files by resolving bindings, avoiding text-based edits that can miss references. It supports a preview-then-apply workflow, with a dry-run option to preview changes before writing to disk. The tool can be integrated into various coding agents like Claude Code, Cursor, Windsurf, and OpenCode via the Model Context Protocol (MCP). It also offers a standalone command-line interface for scripting or CI. The project requires Java 21+ and Maven 3.8+ to build or can be downloaded as a prebuilt jar.
Pricing
Free
Detailed plans have not been confirmed in our catalog. Check the official website for current limits and billing terms.
Visit WebsitePrices and limits may change. Confirm the currency, billing period, seat minimum and usage caps on the official website.
Use Cases
- Teams use java-refactoring-mcp to rename a method project-wide, ensuring all call sites are updated correctly.
- Teams use java-refactoring-mcp to extract a method from a selection of code, with JDT computing parameters and return type.
- Teams use java-refactoring-mcp to move a class to a new package, updating all imports project-wide.
- Teams use java-refactoring-mcp to convert a class to a record, renaming accessor call sites.
- Teams use java-refactoring-mcp to inline a method across files, matching every call site exactly.
- Teams use java-refactoring-mcp to introduce a parameter object project-wide.
- Teams use java-refactoring-mcp to encapsulate a field, rewriting all read/write access sites.
Features
Semantic Java code refactoring
Rename Java code elements
Move Java code elements
Extract and inline code
Pull up and push down
Eclipse JDT backed transformations
Reviews
No reviews yet. Be the first to share your experience!