Registry / devops / jdk-migration-mcp

jdk-migration-mcp

JSON →
library0.3.27jsnpmunverified

Model Context Protocol (MCP) server that orchestrates Java JDK 6/8 to 21 migrations with human-in-the-loop approval gates. Version 0.3.27 targets Node.js >= 20 and works with Maven/Gradle Java projects. It scans code for JDK 21 incompatibilities (e.g., javax→jakarta, removed APIs), generates a 6-phase migration plan, and requires manual approval at each gate before applying changes via OpenRewrite. Key differentiators: MCP-native integration with Claude Code, phased approach with rollback via Git, and HTML audit report generation.

npm install jdk-migration-mcp
INSTALL
IMPORT
SIG · JDK-MIGRATION-MCP
J
jdk-migration-mcp
devopsjavascriptv0.3.27
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default (server)
import jdkMigrationMcp from 'jdk-migration-mcp'
const mcp = require('jdk-migration-mcp')
ESM-only package; CommonJS require will fail. Use dynamic import or set type: module.
discover_project
import { discover_project } from 'jdk-migration-mcp'
import { discoverProject } from 'jdk-migration-mcp'
Tool names use snake_case, matching the MCP tool definition. Do not camelCase.
approve_gate
import { approve_gate } from 'jdk-migration-mcp'
import { approveGate } from 'jdk-migration-mcp'
All tool names are snake_case.

Configure the MCP server in Claude Code settings, then use the SDK to discover a Java project for migration.

// Add to ~/.claude/settings.json: { "mcpServers": { "jdk-migration": { "command": "npx", "args": ["-y", "jdk-migration-mcp"] } } } // Or run directly with Node.js: import { discover_project } from 'jdk-migration-mcp'; async function main() { const result = await discover_project({ projectPath: '/path/to/java/project' }); console.log(result); } main();
Debug
Known issues
breakingPackage is ESM-only and does not support CommonJS require(). Using require() will throw MODULE_NOT_FOUND or ERR_REQUIRE_ESM.
fix
Use import syntax or dynamic import(). Set 'type': 'module' in package.json or use .mjs extension.
affects: >=0.1.0
gotchaTool names are snake_case (e.g., 'approve_gate'), not camelCase. Incorrect casing will result in tool not found errors.
fix
Use exact snake_case names as documented in the MCP tool list.
affects: >=0.1.0
gotchaRequires Git in PATH and a Git-initialized project. Running on a non-Git repo will cause failures during rollback.
fix
Ensure your project is a Git repository before using rollback features.
affects: >=0.1.0
gotchaOpenRewrite recipes are executed locally; ensure Java and Maven/Gradle are installed and available in PATH.
fix
Install JDK 11+ and Maven or Gradle, and verify they are on the system PATH.
affects: >=0.1.0
deprecatedPhase 5 'Final Validation & Cutover' is marked as high automation but may still require manual testing outside the tool.
fix
Plan for manual testing and CI pipeline validation after migration.
affects: >=0.1.0
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/jdk-migration-mcp from not supported.
Using CommonJS require() on this ESM-only package.
fix
Use import or dynamic import instead. Set 'type': 'module' in your package.json.
TypeError: discoverProject is not a function
Trying to import a tool using camelCase name instead of snake_case.
fix
Use the correct snake_case name: discover_project.
Error: Git is not available in PATH. Please install Git and ensure it's accessible.
Git not installed or not on PATH. Required for rollback and phase tracking.
fix
Install Git and add it to your system PATH.
Error: No Maven or Gradle build file found. Supported only Maven or Gradle projects.
The project is not a Maven or Gradle Java project, or the tool is run from the wrong directory.
fix
Ensure your Java project uses Maven (pom.xml) or Gradle (build.gradle) and run discovery from the project root.
Upgrade
Version history
0.3.27latest on npm
Audit
Dependencies
@modelcontextprotocol/sdkrequiredMCP server foundation
openrewriterequiredAutomated Java refactoring recipes
Agent activity
12 hits · last 30 days
node
10
Bingbot
1
Resources
jdk-migration-mcp — npm install jdk-migration-mcp · libregistry