Commit 0b96f4c
refactor: restructure MCP server auto-configuraitons, adding streamable-http support
- Extract MCP server functionality into specialized modules:
* STDIO/SSE servers (existing functionality)
* Streamable-HTTP servers with change notifications
* Stateless servers for simplified deployments
- Add new auto-configuration modules:
* spring-ai-autoconfigure-mcp-streamable-server-common
* spring-ai-autoconfigure-mcp-streamable-server-webflux/webmvc
* spring-ai-autoconfigure-mcp-stateless-server-common
* spring-ai-autoconfigure-mcp-stateless-server-webflux/webmvc
* Add server-specific property prefixes for different server types
- Extract ToolCallbackConverter into separate auto-configuration
with conditional enablement via tool-callback-converter property
- Enhance transport providers with builder patterns and new features:
* Keep-alive interval support for connection health
* Add keep-alive-interval and other transport-specific options
- Add comprehensive integration tests for all server types
- Update documentation to reflect new architecture and server options
Signed-off-by: Christian Tzolov <[email protected]>1 parent b9cc239 commit 0b96f4c
File tree
60 files changed
+7586
-490
lines changed- auto-configurations/mcp
- spring-ai-autoconfigure-mcp-client-common/src/main/java/org/springframework/ai/mcp/client/common/autoconfigure
- properties
- spring-ai-autoconfigure-mcp-server
- src
- main
- java/org/springframework/ai/mcp/server/autoconfigure
- resources/META-INF/spring
- test/java/org/springframework/ai/mcp/server/autoconfigure
- spring-ai-autoconfigure-mcp-stateless-server-common
- src
- main
- java/org/springframework/ai/mcp/server/stateless/autoconfigure
- resources/META-INF/spring
- test/java/org/springframework/ai/mcp/server/stateless/autoconfigure
- spring-ai-autoconfigure-mcp-stateless-server-webflux
- src
- main
- java/org/springframework/ai/mcp/server/stateless/webflux/autoconfigure
- resources/META-INF/spring
- test/java/org/springframework/ai/mcp/server/stateless/webflux/autoconfigure
- spring-ai-autoconfigure-mcp-stateless-server-webmvc
- src
- main
- java/org/springframework/ai/mcp/server/stateless/webmvc/autoconfigure
- resources/META-INF/spring
- test/java/org/springframework/ai/mcp/server/stateless/webmvc/autoconfigure
- spring-ai-autoconfigure-mcp-streamable-server-common
- src
- main
- java/org/springframework/ai/mcp/server/streamable/autoconfigure
- resources/META-INF/spring
- test/java/org/springframework/ai/mcp/server/streamable/autoconfigure
- spring-ai-autoconfigure-mcp-streamable-server-webflux
- src
- main
- java/org/springframework/ai/mcp/server/streamable/webflux/autoconfigure
- resources/META-INF/spring
- test/java/org/springframework/ai/mcp/server/streamable/webflux/autoconfigure
- spring-ai-autoconfigure-mcp-streamable-server-webmvc
- src
- main
- java/org/springframework/ai/mcp/server/streamable/webmvc/autoconfigure
- resources/META-INF/spring
- test/java/org/springframework/ai/mcp/server/streamable/webmvc/autoconfigure
- mcp/common/src/main/java/org/springframework/ai/mcp
- spring-ai-bom
- spring-ai-docs/src/main/antora/modules/ROOT
- pages/api/mcp
- spring-ai-spring-boot-starters
- spring-ai-starter-mcp-server-stateless-webflux
- spring-ai-starter-mcp-server-stateless-webmvc
- spring-ai-starter-mcp-server-streamable-webflux
- spring-ai-starter-mcp-server-streamable-webmvc
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
60 files changed
+7586
-490
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
108 | | - | |
109 | 107 | | |
110 | 108 | | |
111 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
71 | 90 | | |
72 | 91 | | |
73 | 92 | | |
| |||
Lines changed: 18 additions & 113 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
24 | 37 | | |
25 | 38 | | |
26 | 39 | | |
27 | 40 | | |
28 | 41 | | |
29 | 42 | | |
30 | | - | |
31 | 43 | | |
32 | 44 | | |
33 | 45 | | |
| |||
44 | 56 | | |
45 | 57 | | |
46 | 58 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | 59 | | |
65 | 60 | | |
66 | 61 | | |
| |||
110 | 105 | | |
111 | 106 | | |
112 | 107 | | |
113 | | - | |
| 108 | + | |
| 109 | + | |
114 | 110 | | |
115 | 111 | | |
116 | 112 | | |
| |||
131 | 127 | | |
132 | 128 | | |
133 | 129 | | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | 130 | | |
173 | 131 | | |
174 | 132 | | |
| |||
179 | 137 | | |
180 | 138 | | |
181 | 139 | | |
182 | | - | |
| 140 | + | |
183 | 141 | | |
184 | 142 | | |
185 | 143 | | |
| |||
195 | 153 | | |
196 | 154 | | |
197 | 155 | | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | 156 | | |
208 | 157 | | |
209 | 158 | | |
| |||
268 | 217 | | |
269 | 218 | | |
270 | 219 | | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | 220 | | |
307 | 221 | | |
308 | 222 | | |
| |||
311 | 225 | | |
312 | 226 | | |
313 | 227 | | |
314 | | - | |
315 | | - | |
| 228 | + | |
316 | 229 | | |
317 | 230 | | |
318 | 231 | | |
| |||
324 | 237 | | |
325 | 238 | | |
326 | 239 | | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | 240 | | |
336 | 241 | | |
337 | 242 | | |
| |||
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
143 | 148 | | |
144 | 149 | | |
145 | 150 | | |
| |||
281 | 286 | | |
282 | 287 | | |
283 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
284 | 297 | | |
285 | 298 | | |
286 | 299 | | |
| |||
Lines changed: 14 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| |||
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
| 81 | + | |
79 | 82 | | |
80 | | - | |
81 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
82 | 91 | | |
83 | 92 | | |
84 | | - | |
| 93 | + | |
| 94 | + | |
85 | 95 | | |
86 | 96 | | |
87 | 97 | | |
| |||
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
74 | 75 | | |
75 | | - | |
76 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
77 | 84 | | |
78 | 85 | | |
79 | 86 | | |
| |||
0 commit comments