Skip to content

Commit 1e0dad9

Browse files
committed
Update the MCP getting started tutorial
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
1 parent 182e2ba commit 1e0dad9

File tree

1 file changed

+23
-36
lines changed

1 file changed

+23
-36
lines changed

spring-ai-docs/src/main/antora/modules/ROOT/pages/guides/getting-started-mcp.adoc

Lines changed: 23 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
The Model Context Protocol (MCP) standardizes how AI applications interact with external tools and resources.
44

5-
Spring joined the MCP ecosystem early as a key contributor, helping to develop and maintain the link:https://github.com/modelcontextprotocol/java-sdk[official MCP Java SDK] that serves as the foundation for Java-based MCP implementations. Building on this contribution, Spring AI provides comprehensive MCP support through Boot Starters and annotations, making it easy to build both MCP servers and clients.
5+
Spring joined the MCP ecosystem early as a key contributor, helping to develop and maintain the link:https://github.com/modelcontextprotocol/java-sdk[official MCP Java SDK] that serves as the foundation for Java-based MCP implementations.
6+
Building on this contribution, Spring AI provides MCP support through Boot Starters and annotations, making it easy to build both MCP servers and clients.
67

78
== Introduction Video
89

@@ -16,7 +17,8 @@ Start here for an introductory overview of the Model Context Protocol, explainin
1617

1718
**💻 Complete Source Code:** link:https://github.com/tzolov/spring-ai-mcp-blogpost[MCP Weather Example Repository]
1819

19-
The tutorial provides comprehensive coverage of MCP development with Spring AI, including production-ready examples, advanced features, and deployment patterns. All code examples below are taken from this tutorial.
20+
The tutorial covers the essentials of MCP development with Spring AI, including advanced features, and deployment patterns.
21+
All code examples below are taken from this tutorial.
2022

2123
== Quick Start
2224

@@ -69,7 +71,16 @@ public CommandLineRunner demo(ChatClient chatClient, ToolCallbackProvider mcpToo
6971
}
7072
----
7173

72-
Configure the client connection:
74+
Add the dependency and configure:
75+
76+
[source,xml]
77+
----
78+
<dependency>
79+
<groupId>org.springframework.ai</groupId>
80+
<artifactId>spring-ai-starter-mcp-client</artifactId>
81+
</dependency>
82+
----
83+
7384

7485
[source,yaml]
7586
----
@@ -89,55 +100,41 @@ spring:
89100

90101
**link:https://www.youtube.com/watch?v=hmEVUtulHTI[Spring AI Model Context Protocol (MCP) Integration - YouTube]**
91102

92-
A comprehensive video walkthrough of Spring AI's MCP integration, covering both server and client implementations.
103+
A video walkthrough of Spring AI's MCP integration, covering both server and client implementations.
93104

94105
== Additional Examples Repository
95106

96107
Beyond the tutorial examples, the link:https://github.com/spring-projects/spring-ai-examples/tree/main/model-context-protocol[Spring AI Examples] repository contains numerous MCP implementations.
97108

98109
=== Recommended Starting Points
99110

100-
*Annotation-based examples* (recommended for best developer experience):
111+
*Annotation-based examples*
101112

102-
* link:https://github.com/spring-projects/spring-ai-examples/tree/main/model-context-protocol/mcp-annotations-server[MCP Annotations Server] - Comprehensive annotation patterns
103-
* link:https://github.com/spring-projects/spring-ai-examples/tree/main/model-context-protocol/mcp-annotations/mcp-annotations-server[Complete Annotations Example] - All annotation features
104-
* link:https://github.com/spring-projects/spring-ai-examples/tree/main/model-context-protocol/sampling/annotations/mcp-sampling-server-annotations[Sampling with Annotations] - Advanced bidirectional AI
113+
* link:https://github.com/spring-projects/spring-ai-examples/tree/main/model-context-protocol/mcp-annotations/[Complete Annotations Example] - All annotation features (Client & Server)
114+
* link:https://github.com/spring-projects/spring-ai-examples/tree/main/model-context-protocol/sampling/annotations/[Sampling with Annotations] - Advanced bidirectional AI (Client & Server)
115+
* link:https://github.com/tzolov/spring-ai-mcp-blogpost[MCP Weather Tutorial] - Full tutorial source code (Client & Server)
105116

106117
=== By Use Case
107118

108119
**Weather Services:**
120+
109121
* link:https://github.com/spring-projects/spring-ai-examples/tree/main/model-context-protocol/weather/starter-webflux-server[WebFlux Weather Server]
110122
* link:https://github.com/spring-projects/spring-ai-examples/tree/main/model-context-protocol/weather/starter-webmvc-oauth2-server[OAuth2 Secured Weather Server]
111123

112124
**Data Integration:**
125+
113126
* link:https://github.com/spring-projects/spring-ai-examples/tree/main/model-context-protocol/sqlite/chatbot[SQLite AI Chatbot]
114127
* link:https://github.com/spring-projects/spring-ai-examples/tree/main/model-context-protocol/filesystem[Filesystem Access Server]
115128

116129
**Web Integration:**
130+
117131
* link:https://github.com/spring-projects/spring-ai-examples/tree/main/model-context-protocol/web-search/brave-chatbot[Brave Search Chatbot]
118132

119133
**Client Examples:**
134+
120135
* link:https://github.com/spring-projects/spring-ai-examples/tree/main/model-context-protocol/client-starter/starter-default-client[Basic MCP Client]
121136
* link:https://github.com/spring-projects/spring-ai-examples/tree/main/model-context-protocol/mcp-annotations/mcp-annotations-client[Annotations Client]
122137

123-
== Key Concepts
124-
125-
**MCP Servers** expose capabilities (tools, resources, prompts) to AI applications.
126-
**MCP Clients** connect AI applications to MCP servers.
127-
128-
**Transport Options:**
129-
* *STDIO* - Desktop applications, IDE integrations
130-
* *Streamable-HTTP* - Production deployments, microservices
131-
* *SSE* - Real-time web applications
132-
* *Stateless* - Serverless environments
133-
134-
**Why Annotations?**
135-
* Declarative approach - focus on business logic
136-
* Automatic JSON schema generation
137-
* Type-safe parameter handling
138-
* Spring Boot auto-configuration
139-
* Minimal boilerplate code
140-
141138
== Community Resources
142139

143140
* link:https://github.com/spring-ai-community/awesome-spring-ai[Awesome Spring AI] - Community examples and resources
@@ -151,13 +148,3 @@ Beyond the tutorial examples, the link:https://github.com/spring-projects/spring
151148
* xref:api/mcp/mcp-annotations-overview.adoc[MCP Annotations Guide]
152149
* xref:api/mcp/mcp-server-boot-starter-docs.adoc[Server Boot Starters]
153150
* xref:api/mcp/mcp-client-boot-starter-docs.adoc[Client Boot Starters]
154-
155-
== Next Steps
156-
157-
1. Read the complete blog tutorial linked above
158-
2. Clone and explore the tutorial source code repository
159-
3. Watch the video tutorial for a visual walkthrough
160-
4. Try the annotation-based examples
161-
5. Explore the additional examples repository
162-
6. Read the reference documentation for advanced features
163-
7. Join the community and share your implementations

0 commit comments

Comments
 (0)