api2mcp4j
A Spring Boot starter that turns existing REST controllers into MCP tools automatically, without adding annotations or duplicating business logic into a parallel code path.
api2mcp4j scans a Spring Boot application's existing REST controller beans and exposes their methods as MCP tools without requiring any code changes, in contrast to typical MCP integrations that need a tool annotation added to every method or a duplicated parallel implementation. Tool descriptions are generated automatically by a chain of parsers over Swagger v3, Swagger v2, Javadoc, Spring MVC, Jackson, and Spring AI metadata, with the best available description used for each method.
Coverage includes MCP tools, resources, prompts, completions, elicitation, sampling, and roots, over a recent MCP protocol wire schema with JSON-RPC routing, server-sent-event long polling, and OpenTelemetry trace propagation. Configuration selects between automatically registering every controller or only ones explicitly opted in, and which parsers to use for descriptions and parameters.
It installs as a Maven dependency into a Spring Boot project, is written in Java, and is Apache-2.0 licensed.