Sponsored by Deepsite.site

Server2MCP Spring Boot Starter

Created By
TheEterna8 months ago
This is a revolutionary AI MCP plugin with excellent pluggable and encapsulated features. With just a few lines of configuration, it can easily integrate into your Spring boot web program and give it MCP capabilities,inheriting the powerful engineering capabilities of the Spring series framework
Content

Server2MCP Spring Boot Starter

简体中文

This is definitely a revolutionary idea!!!

This is a Spring Boot Starter used for automated integration of MCP (Model Control Protocol) services.

✨function characteristics

-Automatic configuration of MCP service, similar to the relationship between mybatis plus and mybatis, non-invasive, purely enhanced-Supports all native functions of MCP in JavaSdk, providing tool registration and callback mechanisms, etc-Support custom tool parsing-Users can customize the Parser without relying on chain of responsibility implementation to complete attribute parsing for unique interface annotations

👀Unfinished points

There are still many parsing extension points of Springai that have not been integrated. For example, currently only Javadoc version annotations have been completed, but the parsing architecture uses responsibility chains and templates, which are extremely easy to extend. In the future, various mainstream methods will be integrated to describe annotation parsing

🎯Quick start

Since it has not been pushed to the central repository yet, you can download the source code, perform an mvn clean install, and then make dependency references

Add Dependency

<dependency>
    <groupId>com.ai.plug</groupId>
    <artifactId>server2mcp-spring-boot-starter</artifactId>
    <version>0.0.1-SNAPSHOT</version>
</dependency>

Then add the configuration in the configuration file:

plugin.mcp.enabled=true

#If it is yml, then it is
plugin:
mcp:
enabled: true

The above is the basic configuration for starting the project, which includes all native configurations such as spring.ai.mcp.server-side, etc. By default, it will register all controllers under your startup class path as MCP interfaces. If there is a @ Depreciated annotation on the interface method or class, it will not be registered.

📚principle

It can be understood as opening up interfaces to AI, so these interfaces are the same as regular interfaces, except that they can be called through AI. Relevant knowledge documents:Model Context Protocol (MCP) :: Spring AI Reference , [Introduction - Model Context Protocol](https://docs.spring.io/spring-ai/reference/api/mcp/mcp-overview.html)And [Introduction - Model Context Protocol](https://modelcontextprotocol.io/introduction)

💕Best practices

With this framework, you no longer need to rebuild an MCP service application from scratch, nor do you need to add @ Tool annotations to highly coupled copied code, or add MCP functionality to source code. You only need to add custom @ ToolScan annotations based on a configuration class to easily complete the registration of MCP interfaces. What should you do if you encounter MCP SDK revisions? Don't worry, the core content is maintained by me, and the usage method remains unchanged

  1. You can easily build a multi-agent application by using multiple AI dialogue interfaces that you have customized, and then simply calling the corresponding MCP interface on the client side.

  2. It can quickly access AI dialogue calls for your management system, with high customization. You don't need to pay attention to any details in the AI field, just focus on your favorite areas of web and front-end, and you can achieve cool effects. Compared to this, applications like DB-GPT may seem bulky and difficult to expand

  3. It can be used in conjunction with simple MCP clients like cursor to easily complete interface debugging

🔔summarize

This framework is actually very simple, and there may be many vulnerabilities and shortcomings in the code. Please forgive me.

📄 Copyright Statement/Open Source Agreement

According to the Apache 2.0 license Published code

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
DeepChatYour AI Partner on Desktop
Amap Maps高德地图官方 MCP Server
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
CursorThe AI Code Editor
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Tavily Mcp
ChatWiseThe second fastest AI chatbot™
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
WindsurfThe new purpose-built IDE to harness magic
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Serper MCP ServerA Serper MCP Server
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Playwright McpPlaywright MCP server