spring-boot-ai
๐ ๐ค Spring Boot AI - Evaluation Testing
claude mcp add --transport stdio rogervinas-spring-boot-ai docker run -i rogervinas/spring-boot-ai:latest \ --env JAVA_OPTS="-Xms512m -Xmx1g" \ --env SPRING_PROFILES_ACTIVE="default"
How to use
This MCP server is a Spring Boot AI example that exposes an MCP-compliant service for building AI-powered agents. It wires together a local Weather tool, a Clock tool, and a remote Booking tool via an MCP client/server setup, enabling a chat agent to reason about real-time dates, weather, and reservations. The server demonstrates how to register tools with Spring AI using @Tool and @ToolParam, expose them to an MCP-enabled agent, and combine local and remote tools (via an MCP client connection) with Retrieval Augmented Generation (RAG) for context. You can interact with the MCP server by running the container or application and using the MCP protocol to invoke the available tools from an agent that queries weather, tells the date, or books accommodations through the remote Booking tool.
How to install
Prerequisites:
- Docker installed on your system (for the recommended docker-based run)
- Optional: Java 21/OpenJDK if you prefer running the Spring Boot app directly
- Basic knowledge of MCP and Spring AI concepts
Recommended setup via Docker:
-
Pull and run the Docker image (or build locally if you prefer): npm or curl not required; use the docker command shown in the mcp_config
-
Verify the container starts and exposes the MCP server endpoint (port 8080 by default in many Spring Boot setups). You may need to adjust port mappings depending on your environment.
-
If you prefer to run locally from source, clone the repository and start the app:
# From project root
./mvnw -q spring-boot:run
# or with Gradle if configured
./gradlew bootRun
-
Ensure the remote Booking MCP server is reachable if you want to exercise the Booking tool. Configure the MCP client in application.yml (as shown in the README) to point to the remote server's URL.
-
Once running, use MCP client interactions to list tools and invoke methods such as getWeather, getClockDate, or book a reservation via the remote Booking tool.
Additional notes
Tips and common considerations:
- If you run via Docker, ensure the container has network access to the remote Booking MCP server (host networking or appropriate port mappings).
- The Weather and Clock tools are implemented locally; the Booking tool is remote and configured via MCP client settings in application.yml as described in the README.
- For RAG, ensure your vector store (e.g., PGVector) is properly configured and accessible by the Chat Server if youโre combining weather/date context with retrieved information.
- If you encounter MCP client connectivity issues, verify the SSE connection URL in your application.yml and ensure the remote server is up and reachable.
- Environment variables can be used to tweak model selection, logging verbosity, and Spring profiles during deployment.
Related MCP Servers
pluggedin-app
The Crossroads for AI Data Exchanges. A unified, self-hostable web interface for discovering, configuring, and managing Model Context Protocol (MCP) serversโbringing together AI tools, workspaces, prompts, and logs from multiple MCP sources (Claude, Cursor, etc.) under one roof.
spring-ai
From Java Dev to AI Engineer: Spring AI Fast Track
Archive-Agent
Find your files with natural language and ask questions.
LLaMa -Streamlit
AI assistant built with Streamlit, NVIDIA NIM (LLaMa 3.3:70B) / Ollama, and Model Control Protocol (MCP).
RiMCP_hybrid
Rimworld Coding RAG MCP server
adk -gemma3
Build AI Agent using Google ADK , MCP and Gemma 3 model