You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-ai-docs/src/main/antora/modules/ROOT/pages/api/mcp/mcp-client-boot-starter-docs.adoc
+25-22Lines changed: 25 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,15 +24,15 @@ The MCP Client Boot Starter provides:
24
24
</dependency>
25
25
----
26
26
27
-
The standard starter connects simultaneously to one or more MCP servers over `STDIO` (in-process), `SSE`and `Streamable Http` transports.
27
+
The standard starter connects simultaneously to one or more MCP servers over `STDIO` (in-process), `SSE`, `Streamable Http` and `Stateless Streamable Http` transports.
28
28
The SSE and Streamable-Http transports use the JDK HttpClient-based transport implementation.
29
29
Each connection to an MCP server creates a new MCP client instance.
30
30
You can choose either `SYNC` or `ASYNC` MCP clients (note: you cannot mix sync and async clients).
31
31
For production deployment, we recommend using the WebFlux-based SSE & StreamableHttp connection with the `spring-ai-starter-mcp-client-webflux`.
32
32
33
33
=== WebFlux Client
34
34
35
-
The WebFlux starter provides similar functionality to the standard starter but uses a WebFlux-based SSE and Streamable-Http transport implementation.
35
+
The WebFlux starter provides similar functionality to the standard starter but uses a WebFlux-based Streamable-Http, Stateless Streamable-Http and SSE transport implementation.
36
36
37
37
[source,xml]
38
38
----
@@ -179,27 +179,27 @@ The Claude Desktop format looks like this:
179
179
}
180
180
----
181
181
182
-
Currently, the Claude Desktop format supports only STDIO connection types.
182
+
=== Streamable Http Transport Properties
183
183
184
-
=== SSE Transport Properties
184
+
Used for connecting to Streamable-HTTP and Stateless Streamable-HTTP MCP servers.
185
185
186
-
Properties for Server-Sent Events (SSE) transport are prefixed with `spring.ai.mcp.client.sse`:
186
+
Properties for Streamable Http transport are prefixed with `spring.ai.mcp.client.streamable-http`:
187
187
188
188
[cols="3,4,3"]
189
189
|===
190
190
|Property |Description | Default Value
191
191
192
192
|`connections`
193
-
|Map of named SSE connection configurations
193
+
|Map of named Streamable Http connection configurations
194
194
|-
195
195
196
196
|`connections.[name].url`
197
-
|Base URL endpoint for SSE communication with the MCP server
197
+
|Base URL endpoint for Streamable-Http communication with the MCP server
198
198
|-
199
199
200
-
|`connections.[name].sse-endpoint`
201
-
|the sse endpoint (as url suffix) to use for the connection
202
-
|`/sse`
200
+
|`connections.[name].endpoint`
201
+
|the streamable-http endpoint (as url suffix) to use for the connection
202
+
|`/mcp`
203
203
|===
204
204
205
205
Example configuration:
@@ -209,34 +209,34 @@ spring:
209
209
ai:
210
210
mcp:
211
211
client:
212
-
sse:
212
+
streamable-http:
213
213
connections:
214
214
server1:
215
215
url: http://localhost:8080
216
216
server2:
217
217
url: http://otherserver:8081
218
-
sse-endpoint: /custom-sse
218
+
endpoint: /custom-sse
219
219
----
220
220
221
-
=== Streamable Http Transport Properties
221
+
=== SSE Transport Properties
222
222
223
-
Properties for Streamable Http transport are prefixed with `spring.ai.mcp.client.streamable-http`:
223
+
Properties for Server-Sent Events (SSE) transport are prefixed with `spring.ai.mcp.client.sse`:
224
224
225
225
[cols="3,4,3"]
226
226
|===
227
227
|Property |Description | Default Value
228
228
229
229
|`connections`
230
-
|Map of named Streamable Http connection configurations
230
+
|Map of named SSE connection configurations
231
231
|-
232
232
233
233
|`connections.[name].url`
234
-
|Base URL endpoint for Streamable-Http communication with the MCP server
234
+
|Base URL endpoint for SSE communication with the MCP server
235
235
|-
236
236
237
-
|`connections.[name].endpoint`
238
-
|the streamable-http endpoint (as url suffix) to use for the connection
239
-
|`/mcp`
237
+
|`connections.[name].sse-endpoint`
238
+
|the sse endpoint (as url suffix) to use for the connection
239
+
|`/sse`
240
240
|===
241
241
242
242
Example configuration:
@@ -246,13 +246,13 @@ spring:
246
246
ai:
247
247
mcp:
248
248
client:
249
-
streamable-http:
249
+
sse:
250
250
connections:
251
251
server1:
252
252
url: http://localhost:8080
253
253
server2:
254
254
url: http://otherserver:8081
255
-
endpoint: /custom-sse
255
+
sse-endpoint: /custom-sse
256
256
----
257
257
258
258
@@ -284,10 +284,13 @@ Servers can request the list of roots from supporting clients and receive notifi
284
284
- Resources change notifications - when the list of available server resources changes.
285
285
- Prompts change notifications - when the list of available server prompts changes.
286
286
- link:https://modelcontextprotocol.io/specification/2025-06-18/server/utilities/logging[*Logging Handlers*] - standardized way for servers to send structured log messages to clients.
287
-
287
+
- link:https://modelcontextprotocol.io/specification/2025-06-18/basic/utilities/progress[*Progress Handlers*] - standardized way for servers to send structured progress messages to clients.
288
+
288
289
Clients can control logging verbosity by setting minimum log levels
289
290
290
291
292
+
==== Client Customization Example
293
+
291
294
You can implement either `McpSyncClientCustomizer` for synchronous clients or `McpAsyncClientCustomizer` for asynchronous clients, depending on your application's needs.
0 commit comments