Spring Web to MCP Converter ๐
@addozhang
About Spring Web to MCP Converter ๐
Convert Spring REST API to MCP Server with OpenRewrite
Basic information
Config
No standard config provided
This server doesn't expose a parseable MCP config block in its README. See the repository for install instructions.
RepositoryTools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is Spring Web to MCP Converter?
Spring Web to MCP Converter is an OpenRewrite recipe collection that automatically converts traditional Spring Web REST APIs into Spring AI Model Context Protocol (MCP) server tools. It is designed for developers migrating Spring Boot REST controllers to expose their APIs through the MCP standard, making them accessible to AI agents.
How to use Spring Web to MCP Converter?
After building the project with mvn clean install, apply the recipes to your Spring Web project by running the Maven command twice: the first execution updates pom.xml with required repositories and dependencies, and the second performs the actual code conversion. The command is mvn org.openrewrite.maven:rewrite-maven-plugin:6.4.0:run -Drewrite.activeRecipes=RewriteWebToMCP -Drewrite.recipeArtifactCoordinates=com.atbug.rewrite:web-to-mcp:1.0-SNAPSHOT -Drewrite.exportDatatables=true.
Key features of Spring Web to MCP Converter
- Converts Spring Web annotations to
@Tooland@ToolParamannotations - Extracts JavaDoc comments as tool descriptions
- Adds Maven dependencies and repository configurations automatically
- Creates a
ToolCallbackProviderbean to register all tools - Configures MCP server properties in
application.propertiesorapplication.yml - Supports both YAML and Properties file formats
Use cases of Spring Web to MCP Converter
- Migrating an existing Spring Boot REST API to an MCP server without rewriting code
- Exposing traditional REST endpoints as AIโaccessible tools via the Model Context Protocol
- Adding MCP tool support to a Spring Boot 3.2+ application while preserving all existing REST endpoints
- Quickly prototyping MCP servers from wellโdocumented Spring Web controllers
FAQ from Spring Web to MCP Converter
What are the prerequisites for the target project?
The target project must use Spring Boot 3.2+ (3.2.0 or newer), Spring Web MVC, and Maven build tool. Java 17+ and Maven 3.6+ are required to run the converter.
How many times must the conversion command be run?
The command must be executed twice: the first run updates the POM with necessary repositories and dependencies, and the second run performs the actual code conversion of controllers to MCP tools.
Does the conversion break existing REST endpoints?
No. After conversion, the application continues to function as a traditional REST API while also acting as an MCP server. All existing endpoints remain unchanged.
Where does the converter add MCP configuration?
It adds MCP server configuration to application.properties or application.yml, setting server name, version, type, and SSE message endpoint.
How can I test the converted MCP server?
Run the converted application and use the official MCP Inspector (configured with SSE transport at http://localhost:8080/sse) to view and test all available tools.
More Other MCP servers
Unity MCP โจ
justinpbarnettUnity MCP acts as a bridge between AI assistants and your Unity Editor. Give your LLM tools to manage assets, control scenes, edit scripts, and automate tasks within Unity.
MCP Go ๐
mark3labsA Go implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools.

Sequential Thinking
modelcontextprotocolModel Context Protocol Servers
Reactive Resume
amruthpillaiA one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!
FastMCP v2 ๐
jlowin๐ The fast, Pythonic way to build MCP servers and clients.
Comments