What is Server2MCP Spring Boot Starter?
Server2MCP Spring Boot Starter automatically scans existing Spring Boot @RestController and @Service beans and exposes them as MCP (Model Context Protocol) tools with minimal configuration. It combines parsers from Swagger/OpenAPI, Javadoc, Spring MVC metadata, Jackson, and Spring AI to turn REST APIs into AI-callable tools without rewriting business logic. It is designed for developers who want to add MCP support to existing Spring Boot projects with zero-to-low code changes.
How to use Server2MCP Spring Boot Starter?
Add the dependency (build from source — not yet on Maven Central), enable it in application.yml with plugin.mcp.enabled: true, configure parser order and scan scope, and optionally set up Javadoc parsing by packaging source files. Start your application; the MCP endpoint is ready at /mcp by default and can be tested with any MCP client like Cursor or Continue.
Key features of Server2MCP Spring Boot Starter
- Non-intrusive — no need to change existing business code
- Auto-discovery — scans controllers and services to register methods as MCP tools
- Multi-parser support — combines descriptions from Swagger, Javadoc, Spring MVC, and more
- Custom annotations —
@ToolScan, @ResourceScan, @PromptScan for fine-grained control
- Isolated MCP tool system — uses its own
McpTool annotation independent of Spring AI
- Full MCP SDK compatibility — supports callbacks, resources, and prompts
Use cases of Server2MCP Spring Boot Starter
- Expose internal management system APIs to AI agents quickly
- Build multi-agent systems by turning microservices into MCP tools
- Prototype AI features on top of production REST services
- Avoid duplicating logic between REST and MCP endpoints
コメント