rest-mcp-server
SpringBoot-MCP is a zero-configuration tool for automatically exposing Spring Boot endpoints as Model Context Protocol (MCP) tools.
SpringBoot-MCP
A zero-configuration tool for automatically exposing Spring Boot endpoints as Model Context Protocol (MCP) tools.
Features
- Direct integration - Mount an MCP server directly to your Spring Boot application with zero configuration
- Automatic discovery of all Spring REST endpoints and conversion to MCP tools
- Preserving schemas of your request and response models
Installation
Add the dependency to your Maven pom.xml
:
<dependency>
<groupId>com.github.imthath-m</groupId>
<artifactId>rest-mcp-server</artifactId>
<version>0.2.1</version>
</dependency>
Currently, SpringBoot-MCP is not available on Maven central repository. So you have to add the following respoistory in pom.xml
, to ensure JitPack serves it directly from GitHub.
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Basic Usage
After adding the dependency, you need to remove the following starter web dependency from your pom.xml
file.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
This step is required because, this package depends on spring-ai-starter-mcp-server-webflux
which already does the basic setup with a Netty server.
That's it! Your auto-generated MCP server is now available at https://localhost:8080/sse
. You can configure this and other features of the MCP server by using variables specified here.
Once you run the app, you should see the following line your console.
o.s.a.m.s.a.McpServerAutoConfiguration : Registered tools: <number of endpoints>, notification: true
FYI, The REST endpoints in your service will continue to be available in the respective paths.
Tool Naming
SpringBoot-MCP uses the method names from your REST Controllers as the MCP tool names.
Connecting to the MCP Server
Once your Spring Boot app with MCP integration is running, you can connect to it with any MCP client supporting SSE or stdio protocols.
Using SSE (e.g., with Cursor)
- Run your Spring Boot application
- In Cursor -> Settings -> MCP -> Add new MCP server, use the URL
http://localhost:8080/sse
as SSE endpoint - Cursor will discover all available tools automatically
Example cursor config file named mcp.json
.
{
"mcpServers": {
"server-name": {
"url": "http://localhost:8080/sse"
}
}
}
Development and Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Requirements
- Java 21 or higher
- Spring Boot 3.x
License
MIT License. Copyright (c) 2025. Mohammed Imthathullah.
Related MCP Servers
View all developer_tools servers →context7
by upstash
Context7 MCP provides up-to-date, version-specific documentation and code examples directly into your prompt, enhancing the capabilities of LLMs by ensuring they use the latest information.
git-mcp
by idosal
GitMCP is a free, open-source, remote Model Context Protocol (MCP) server that transforms GitHub projects into documentation hubs, enabling AI tools to access up-to-date documentation and code.
exa-mcp-server
by exa-labs
A Model Context Protocol (MCP) server allows AI assistants to use the Exa AI Search API for real-time web searches in a secure manner.
Sequential Thinking
by modelcontextprotocol
An MCP server implementation that provides a tool for dynamic and reflective problem-solving through a structured thinking process.
Everything MCP Server
by modelcontextprotocol
The Everything MCP Server is a comprehensive test server designed to demonstrate the full capabilities of the Model Context Protocol (MCP). It is not intended for production use but serves as a valuable tool for developers building MCP clients.
gateway
by centralmind
CentralMind Gateway is a tool designed to expose databases to AI agents via MCP or OpenAPI protocols, providing secure, LLM-optimized APIs.
mcpdoc
by langchain-ai
MCP LLMS-TXT Documentation Server provides a structured way to manage and retrieve LLM documentation using the Model Context Protocol.