youssefelshiaty/java-spring-custom-mcp-server
If you are the rightful owner of java-spring-custom-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Model Context Protocol (MCP) server provides a standardized interface for AI model interactions and context management, implemented using Spring Boot and the Spring AI MCP Server starter.
MCP Server Implementation
This project implements a Model Context Protocol (MCP) server using Spring Boot and the Spring AI MCP Server starter. The MCP server provides a standardized interface for AI model interactions and context management.
Demo
https://drive.google.com/file/d/1EA_XxwYwrsdalgKlhfwQPGHGxXfn9wI5/view?usp=drive_link
Overview
The MCP server is built using:
- Java 21
- Spring Boot 3.5.0
- Spring AI MCP Server Starter 1.0.0 : https://docs.spring.io/spring-ai/reference/api/mcp/mcp-server-boot-starter-docs.html
Prerequisites
- Java 21 or higher
- Gradle 8.x or higher
- Docker (optional, for containerized deployment)
Project Structure
src/
āāā main/
ā āāā java/ # Java source files
ā āāā resources/ # Configuration files
āāā test/ # Test files
Dependencies
spring-ai-starter-mcp-server
: Core MCP server implementationspring-web
: Spring Web framework to use something like rest clientspring-boot-starter-test
: Testing framework
Configuration
The server can be configured through application.properties
or application.yml
files in the src/main/resources
directory.
API Documentation
The MCP server implements the Model Context Protocol, providing endpoints for:
- Model context management
- AI model interactions
- Context persistence and retrieval