About
An OpenRewrite recipe collection that automatically converts Spring Web REST controllers into Spring AI Model Context Protocol (MCP) server tools, updating annotations, dependencies, and configuration for seamless AI agent integration.
Capabilities
Spring Web to MCP Converter
The Spring Web to MCP Converter addresses a common friction point in modern AI‑driven development: bridging legacy Spring Web REST APIs with the Model Context Protocol (MCP). As AI assistants grow more sophisticated, they increasingly rely on standardized tool definitions to invoke external services. Traditional Spring MVC controllers expose endpoints in a way that is opaque to these assistants, requiring manual re‑implementation of each API as an MCP tool. This converter automates that migration, turning every annotated controller method into a fully documented that can be discovered and called by any MCP‑compatible AI agent.
At its core, the server performs three complementary transformations. First, it rewrites Maven files to pull in the latest Spring AI MCP server dependencies and snapshot repositories, ensuring that the target project can compile against the new tooling. Second, it scans all controller classes for Spring Web mapping annotations (, , etc.) and decorates the corresponding methods with . The annotation carries a description extracted from JavaDoc, while each method parameter is wrapped in and inherits its own documentation. Third, it registers the newly annotated tools by creating or updating a bean and injects essential MCP configuration into the application’s properties file, setting server name, version, type, and message endpoints.
The result is a seamless transition: developers can continue to use familiar Spring MVC patterns while immediately exposing those endpoints to AI assistants. The MCP server exposes each controller as a first‑class tool, complete with human‑readable descriptions and typed parameters. This eliminates the need for duplicate code or manual API wrappers, dramatically reducing maintenance overhead.
Key use cases include:
- Rapid prototyping of AI‑enabled microservices: Convert an existing REST API to MCP in minutes, allowing Claude or other assistants to call the service without custom adapters.
- Enterprise AI orchestration: Embed legacy Spring applications into an AI workflow pipeline, where the assistant can discover and invoke business logic as tools.
- Documentation‑centric development: Since the converter pulls descriptions from JavaDoc, your API documentation automatically propagates to MCP tool definitions, keeping the assistant’s knowledge up‑to‑date.
By automating dependency injection, annotation conversion, and configuration, this MCP server gives developers a powerful shortcut. It removes the manual labor of re‑implementing APIs, ensures consistency across tools, and leverages Spring AI’s mature MCP infrastructure to deliver a robust, standards‑compliant interface for any AI assistant.
Related Servers
Netdata
Real‑time infrastructure monitoring for every metric, every second.
Awesome MCP Servers
Curated list of production-ready Model Context Protocol servers
JumpServer
Browser‑based, open‑source privileged access management
OpenTofu
Infrastructure as Code for secure, efficient cloud management
FastAPI-MCP
Expose FastAPI endpoints as MCP tools with built‑in auth
Pipedream MCP Server
Event‑driven integration platform for developers
Weekly Views
Server Health
Information
Explore More Servers
Nexus MCP Bridge for VSCode
Lightweight bridge connecting Claude Desktop to VSCode via MCP
Statistics Canada API MCP Server
Access Canadian statistical data via MCP for LLMs
OpenAPI‑MCP Server
Generate MCP tools from any OpenAPI spec in Docker
Mcp Ts Template
Production‑grade TypeScript MCP server framework
Feishu MCP Server
Bridge LLMs to Feishu bots via MCP
Android MCP Server
Control Android devices via ADB with Model Context Protocol