spring-ai-mcp-server-patterns

Solid

Provides Spring Boot MCP server patterns that create Model Context Protocol servers with Spring AI by defining tool handlers, exposing resources, configuring prompt templates, and setting up transports for AI function calling and tool calling. Use when building MCP servers to extend AI capabilities with Spring's official AI framework, implementing AI tools, custom function calling, or MCP client integration.

AI & Automation 263 stars 31 forks Updated 1 weeks ago MIT

Install

View on GitHub

Quality Score: 89/100

Stars 20%
81
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Spring AI MCP Server Implementation Patterns Implements MCP servers with Spring AI for AI function calling, tool handlers, and MCP transport configuration. ## Overview Production-ready MCP server patterns: `@Tool` functions, `@PromptTemplate` resources, and stdio/HTTP/SSE transports with Spring AI security. ## When to Use MCP servers, Spring AI function calling, AI tools, tool calling, custom tool handlers, Spring Boot MCP, resource endpoints, or MCP transport configuration. ## Quick Reference ### Core Annotations | Annotation | Target | Purpose | |-----------|--------|---------| | `@EnableMcpServer` | Class | Enable MCP server auto-configuration | | `@Tool(description)` | Method | Declare AI-callable tool | | `@ToolParam(value)` | Parameter | Document tool parameter for AI | | `@PromptTemplate(name)` | Method | Declare reusable prompt template | | `@PromptParam(value)` | Parameter | Document prompt parameter | ### Transport Types | Transport | Use Case | Config | |-----------|----------|--------| | `stdio` | Local process / Claude Desktop | Default | | `http` | Remote HTTP clients | `port`, `path` | | `sse` | Real-time streaming clients | `port`, `path` | ### Key Dependencies ```xml <!-- Maven --> <dependency> <groupId>org.springframework.ai</groupId> <artifactId>spring-ai-mcp-server</artifactId> <version>1.0.0</version> </dependency> <dependency> <groupId>org.springframework.ai</groupId> <artifactId>spring-ai-starter-model-openai</artifactI...

Details

Author
giuseppe-trisciuoglio
Repository
giuseppe-trisciuoglio/developer-kit
Created
7 months ago
Last Updated
1 weeks ago
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category