spring-ai-mcp

Implement MCP tools with Spring AI using DDD and Clean Architecture.

Updated Jan 2, 2026
One-click install
npx skills add https://github.com/reynierre/geo-retail-analytics-mcp --skill spring-ai-mcp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spring-ai-mcp
Source: https://github.com/reynierre/geo-retail-analytics-mcp/tree/main/.claude/skills/spring-ai-mcp
Command: npx skills add https://github.com/reynierre/geo-retail-analytics-mcp --skill spring-ai-mcp

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides knowledge for building MCP (Model Context Protocol) tools using Spring AI with DDD (Domain-Driven Design) and Clean Architecture. Tools are exposed to LLMs (Grok/Ollama) and delegate to Use Cases following Clean Architecture.

Core Features & Use Cases

  • Infrastructure layer exposes tools via Spring AI Tool annotations and delegates to Use Cases.
  • Application layer implements business logic in Use Cases and orchestrates domain interactions.
  • Domain layer defines models and repositories; supports clean separation of concerns.
  • Grok/Ollama integration enables LLM-driven tool invocation in development and production contexts.

Quick Start

Clone the repository, open the Spring Boot module, and run the app in development mode. Configure Grok or Ollama as the AI provider and follow the documentation to invoke a sample tool from an LLM-based interface.

Frequently Asked Questions about spring-ai-mcp

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement MCP tools with Spring AI using Clean Architecture?

Implement MCP tools with Spring AI by exposing them via infrastructure layer annotations and delegating execution to application layer Use Cases, ensuring domain models remain cleanly separated. This structure maintains strict DDD boundaries throughout your LLM tooling.

What is the Model Context Protocol used for in LLM tooling?

The Model Context Protocol in LLM tooling is used to expose structured tools and domain models to AI providers like Grok and Ollama, allowing LLMs to directly invoke application use cases through a standardized interface.

Does Spring AI work with Grok and Ollama for tool invocation?

Spring AI works with Grok and Ollama for tool invocation by integrating the providers in development and production contexts, where the infrastructure layer delegates tool calls to use cases that the configured LLM invokes.

Do I need Spring Boot and Java to build MCP-based tools for LLMs?

You need Spring Boot and a Java-based tool implementation to build MCP-based tools for LLMs using this approach, along with Spring AI starters to configure the LLM interactions and infrastructure annotations.

What's the best way to structure LLM tools in a DDD context?

The best way to structure LLM tools in a DDD context is to place tool annotations in the infrastructure layer, business logic in application use cases, and data models in the domain layer, ensuring clean separation of concerns.

How do I configure Grok or Ollama as the AI provider for Spring AI tools?

Configure Grok or Ollama as the AI provider for Spring AI tools by setting up the Spring Boot module, running the app in development mode, and following the documentation to invoke sample tools from an LLM-based interface.