Open-source MCP server gives coding agents a real Java refactoring engine, halving rename time
ContributionNo9316 · reddit · 2026-10-19
A developer open-sourced Dukehoff MCP for Java (Apache 2.0), which runs the NetBeans Java engine headless (javac-based index, refactoring engine, Jackspot rewrite rules) as an MCP server for any MCP client: Claude Code, Codex, Copilot, Cursor, and more.
Capabilities:
- findusages / findimplementations that distinguish overloads from overrides
- rename, changesignature, move, safedelete, inline in a single call, followed by a compile check reporting only new errors
- applyrule: structural search-and-replace with type checks, plus tested packs for JUnit 4→5, javax→jakarta and Java modernization
- debug: run a test, stop at a line or exception, get the stack with locals — one stateless call
- Symbols addressed by name (com.acme.Foo#bar(String)), not file positions
Measured results: renaming one overload of ClassUtils.getShortClassName in Apache Commons Lang took 46s–1:07 with raw Claude Code using grep/sed/Maven vs 18–25s with the MCP server. A refactor on NetBeans' own codebase dropped from 51 turns to 9, with 46% lower cost over the task set. The author is candid about limits: for everyday fixes on familiar code, agents grep just fine and rarely call these tools — the payoff is in multi-file refactorings.
More from coding & agent
- Index Network open-sources Social Discovery Protocol: agents negotiate fit on your behalf — carsonfarmer · 2026-10-23
- Installed a formal-verification skill: it silently installed Java, MacBook runs 10 degrees hotter — zealcaiden · 2026-10-23
- OpenAI's Decisions API hits GA: near real-time routing up to 10x faster than GPT-6 Luna — OpenAIDevs · 2026-10-23
- Ruff author warns: upgrade Node/Bun now — --use-system-ca still accepts the eMudhra cert — charliermarsh · 2026-10-23
- Proof of Agent: paste one prompt and your AI mines, grades, and self-governs — adamamcbride · 2026-10-23
- DeepLearning.AI weekly: GPT-6.1 hits 97.9% byte parity on COBOL migration — DeepLearningAI · 2026-10-23