Spring AI MCP
Integration of AI capabilities within Spring Boot application using Spring AI framework.
Integration of AI capabilities within Spring Boot application using Spring AI framework.
This project demonstrates the integration of AI capabilities within a Spring Boot application, utilizing the Spring AI framework.
You can always run all the apps locally with Spring Maven Plugin support:
mvn spring-boot:run
Sometimes, you would have to connect the app with the AI model. It can be OpenAI or your preferred model. Before running the app you should export the API token as shown below.
export SPRING_AI_OPENAI_API_KEY=<YOUR_OPENAI_API_KEY>
The example is available in the spring-ai-mcp
directory. Here's the diagram that visualizes architecture.
@Tools
and Prompts
to other services. The example is available in the branch master. A detailed guide may be found in the following article: Using Model Context Protocol (MCP) with Spring AI