rrezartprebreza/spring-boot-skills / skills/spring-boot-4/mcp-server
mcp-server
VerifiedUse when exposing Spring Boot 4 application capabilities through Model Context Protocol tools, resources, or prompts. Covers Spring AI 2.0 MCP annotations, transport selection, schemas, errors, security, and the standalone MCP Java SDK 2.x.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 5.0 KB |
| agents/openai.yaml | config | 186 B |
| examples/OrderMcpTools.java | other | 1.4 KB |
| examples/bad-order-tools.java | other | 232 B |
| examples/good-order-tools.java | other | 356 B |
| templates/mcp.json | config | 494 B |
examples/OrderMcpTools.java
View on GitHubpackage com.example.mcp;
import java.time.Instant;
import java.util.List;
import java.util.UUID;
import org.springframework.ai.mcp.annotation.McpTool;
import org.springframework.ai.mcp.annotation.McpToolParam;
import org.springframework.stereotype.Component;
@Component
public final class OrderMcpTools {
private final OrderService orderService;
public OrderMcpTools(OrderService orderService) {
this.orderService = orderService;
}
@McpTool(
name = "get_order",
description = "Get an order by UUID with line items, status, and creation time",
generateOutputSchema = true,
annotations = @McpTool.McpAnnotations(
readOnlyHint = true,
destructiveHint = false,
idempotentHint = true))
public OrderResponse getOrder(
@McpToolParam(description = "Order UUID", required = true) String orderId) {
return OrderResponse.from(orderService.findById(UUID.fromString(orderId)));
}
}
interface OrderService {
Order findById(UUID id);
}
record Order(UUID id, String status, List<String> lineItems, Instant createdAt) { }
record OrderResponse(UUID id, String status, List<String> lineItems, Instant createdAt) {
static OrderResponse from(Order order) {
return new OrderResponse(order.id(), order.status(), List.copyOf(order.lineItems()), order.createdAt());
}
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |