Commit 2be29c7
committed
feat: Propagate Context to eager connect via McpClientSession
In order to allow the initial connection to have contextual information
in the reactive chain, the McpClientSession should be able to transform
the McpClientTransport#connect result, e.g. to attach Context items.
This change introduces a new constructor for sessions that makes it
possible.
Signed-off-by: Dariusz Jędrzejczyk <dariusz.jedrzejczyk@broadcom.com>1 parent 9ebff0c commit 2be29c7
File tree
2 files changed
+29
-10
lines changed- mcp/src/main/java/io/modelcontextprotocol
- client
- spec
2 files changed
+29
-10
lines changedLines changed: 8 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
| |||
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
271 | | - | |
272 | | - | |
| 271 | + | |
| 272 | + | |
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
404 | | - | |
405 | | - | |
406 | | - | |
| 404 | + | |
| 405 | + | |
407 | 406 | | |
408 | 407 | | |
409 | 408 | | |
| |||
493 | 492 | | |
494 | 493 | | |
495 | 494 | | |
496 | | - | |
| 495 | + | |
497 | 496 | | |
498 | 497 | | |
499 | 498 | | |
500 | 499 | | |
501 | 500 | | |
502 | 501 | | |
503 | | - | |
| 502 | + | |
504 | 503 | | |
505 | 504 | | |
506 | 505 | | |
| |||
Lines changed: 21 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
99 | 101 | | |
100 | 102 | | |
101 | 103 | | |
| 104 | + | |
| 105 | + | |
102 | 106 | | |
| 107 | + | |
103 | 108 | | |
104 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
105 | 125 | | |
106 | 126 | | |
107 | 127 | | |
| |||
113 | 133 | | |
114 | 134 | | |
115 | 135 | | |
116 | | - | |
| 136 | + | |
117 | 137 | | |
118 | 138 | | |
119 | 139 | | |
| |||
0 commit comments