Commit graph

596 commits

Author SHA1 Message Date
Daniel Garnier-Moiroux
c7fef64f92 Rewrite keep-alive and session-sweeping tests with VirtualTimeScheduler
Some checks failed
Conformance Tests / Server Conformance (push) Has been cancelled
Conformance Tests / Client Conformance (push) Has been cancelled
Conformance Tests / Client Conformance-1 (push) Has been cancelled
Conformance Tests / Client Conformance-2 (push) Has been cancelled
Conformance Tests / Client Conformance-3 (push) Has been cancelled
Conformance Tests / Auth Conformance (push) Has been cancelled
Conformance Tests / Auth Conformance-1 (push) Has been cancelled
Conformance Tests / Auth Conformance-2 (push) Has been cancelled
Conformance Tests / Auth Conformance-3 (push) Has been cancelled
Conformance Tests / Auth Conformance-4 (push) Has been cancelled
Conformance Tests / Auth Conformance-5 (push) Has been cancelled
Conformance Tests / Auth Conformance-6 (push) Has been cancelled
Conformance Tests / Auth Conformance-7 (push) Has been cancelled
Conformance Tests / Auth Conformance-8 (push) Has been cancelled
Conformance Tests / Auth Conformance-9 (push) Has been cancelled
Conformance Tests / Auth Conformance-10 (push) Has been cancelled
Conformance Tests / Auth Conformance-11 (push) Has been cancelled
Conformance Tests / Auth Conformance-12 (push) Has been cancelled
Conformance Tests / Auth Conformance-13 (push) Has been cancelled
Publish Snapshot / Build branch (push) Has been cancelled
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-09-18 11:37:00 +02:00
Daniel Garnier-Moiroux
e3e0f5172a Introduce timeout for session sweeping
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-09-18 11:37:00 +02:00
Daniel Garnier-Moiroux
178fe219de Update author tags and copyright info
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-09-18 11:37:00 +02:00
Daniel Garnier-Moiroux
f77aa1afe2 Mention session-eviction in docs
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-09-18 11:37:00 +02:00
Daniel Garnier-Moiroux
caafc85575 Make session-sweeping non-blocking
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-09-18 11:37:00 +02:00
Daniel Garnier-Moiroux
9948eecbb7 Streamable HTTP server: keep alive on, 30 minutes by default
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-09-18 11:37:00 +02:00
Daniel Garnier-Moiroux
1178539050 Skip session activity tracking when sessionSweepInterval is null
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-09-18 11:37:00 +02:00
Daniel Garnier-Moiroux
65c0856518 Fix hanging disconnected client during POST
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-09-18 11:37:00 +02:00
Daniel Garnier-Moiroux
b4d7ff6428 Error pending requests on session close
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-09-18 11:37:00 +02:00
Daniel Garnier-Moiroux
50991f9b6c Remove inactive sessions with a "sweeper" mechanism
- Sessions are marked active when a client makes a request
- A session with an open stream is also considered active
- Inactive sessions are removed at a regular interval

Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-09-18 11:37:00 +02:00
Daniel Garnier-Moiroux
04bc1e8710 Close POST-related streams in McpStreamableServerSession
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-09-18 11:37:00 +02:00
Daniel Garnier-Moiroux
ca633db18c KeepAliveScheduler only pings sessions with an open stream
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-09-18 11:37:00 +02:00
Daniel Garnier-Moiroux
7961dc58af KeepAliveScheduler: align initial delay with interval
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-09-18 11:37:00 +02:00
Daniel Garnier-Moiroux
183935bf80 Fix Automatic-Module-Name without hypens
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-09-17 11:50:06 +02:00
Daniel Garnier-Moiroux
4186ca13d1 Fix stream leak when resuming streams with LAST_EVENT_ID
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-09-08 15:28:17 +02:00
Neeraj Bhatt
5be2fa0688 feat: introduce ServerHttpHeaderValidator replacing ServerTransportSecurityValidator
Same feature set as ServerTransportSecurityValidator but uses a lazy
"header accessor" function to read header values instead of extracting
all headers into a map. Matches more closely what modern frameworks and
JDK APIs do.

Fixes #870

Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-09-07 14:35:15 +02:00
Nicolas Quinquenel
2bb1481ec3
Make STDIO transport sendMessage thread-safe (#304)
Concurrent calls to `sendMessage` on the STDIO transports raced on the
unicast sink and sporadically failed with `FAIL_NON_SERIALIZED`, dropping
the message with `RuntimeException("Failed to enqueue message")`.

Switch `tryEmitNext` to `emitNext` with a `busyLooping` EmitFailureHandler
so concurrent emissions are serialized as recommended by the Reactor
maintainers. Applied on both `StdioServerTransportProvider` and
`StdioClientTransport`.

Co-authored-by: Nicolas Quinquenel <nicolas.quinquenel@sonarsource.com>
Signed-off-by: Dariusz Jędrzejczyk <dariusz.jedrzejczyk@broadcom.com>
2026-09-04 19:51:54 +02:00
Daniel Garnier-Moiroux
735a85190b Remove 2024-11-05 protocol from Streamable HTTP transport
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-09-04 18:55:37 +02:00
Daniel Garnier-Moiroux
39c225e46c Contributing: clarify PR submission
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-09-01 22:10:43 +02:00
Daniel Garnier-Moiroux
59316252c4 Fix integration tests for roots/list
There is a race condition where the GET /mcp SSE stream in Streamable
HTTP is established _after_ the server tries to send notifications. This
surfaces errors from the MCP client sending notifications and breaks
some integration tests.

We add a utility showing to ensure the stream is established before
sending server notifications.

Fixes #1114

Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-09-01 18:09:51 +02:00
Daniel Garnier-Moiroux
24fbb119a9 Use single Tomcat instance per test class
- Instead of running one Tomcat per test method, run one per test
- Improves the testing time of Servlet-based tests

Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-08-31 15:05:23 +02:00
Daniel Garnier-Moiroux
dc952a2856 Run STDIO tests with node instead of npx
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-08-31 15:05:23 +02:00
Daniel Garnier-Moiroux
2293cf70b5
Add filtering for MCP tool list (#1108)
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-08-31 10:19:49 +02:00
Daniel Garnier-Moiroux
a7bfddc361 ci: add workflow_dispatch trigger to CI workflow
Lets contributors manually run CI against a branch on their own fork
before opening a PR, without needing to open a draft PR or push an
empty commit just to get a CI run.

Fixes #1116

Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-08-28 17:36:24 +02:00
Sylwester Lachiewicz
b31841eec0 docs(core): document String structuredContent parsing in JsonSchemaValidator 2026-08-27 09:33:21 +02:00
Daniel Garnier-Moiroux
bb0ca87da5 Clarify McpTransportContext javadoc
See #1075

Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-08-26 16:08:11 +02:00
Daniel Garnier-Moiroux
e7b389f846 Update CONTRIBUTING.md with an AI agent policy
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-08-26 15:44:50 +02:00
Daniel Garnier-Moiroux
fb029c8c76 Revert "Clean up AbstractMcpClientServerIntegrationTests"
This reverts commit 439dc90d25.
Spring AI still uses the old API from these tests because they have
muliple clients.

Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-08-24 16:44:08 +02:00
Daniel Garnier-Moiroux
c4dd4715ca Implement AbstractStatelessIntegrationTests with Servlet
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-08-24 16:35:01 +02:00
Daniel Garnier-Moiroux
305e4cbd03 Update VERSIONING and CHANGELOG
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-08-19 16:00:42 +02:00
Daniel Garnier-Moiroux
cceba3f695 Next development version
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-08-19 15:27:57 +02:00
Daniel Garnier-Moiroux
c7e1cfe90e Release version 2.0.1 v2.0.1
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-08-19 15:25:35 +02:00
Daniel Garnier-Moiroux
3477fcd0cd Bound STDIO client reads
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-08-19 14:53:08 +02:00
Daniel Garnier-Moiroux
3b72eec0b8 Bound STDIO server reads
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-08-19 14:53:08 +02:00
Daniel Garnier-Moiroux
ef037dae7b Bound HTTP client reads
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-08-19 14:41:20 +02:00
Daniel Garnier-Moiroux
6a41dedaa0 Bound HTTP server reads
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-08-19 14:41:20 +02:00
Daniel Garnier-Moiroux
1fcb40430c Clarify supported lines 2.0.x, 1.1.x, 0.18.x
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-08-19 11:34:18 +02:00
Daniel Garnier-Moiroux
e75a8ee651 ignore .envrc
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-08-19 11:27:37 +02:00
Christian Tzolov
2fd159a79a Prepare SDK Tier 2 assessment submission
- Add CHANGELOG.md with release lines and history
- Refresh ROADMAP.md: 2.x stable line, 3.0.x for 2026-07-28 spec (first
  milestones Sep 2026), Tier 2 commitment, 1.x/0.x security-patches-only
- Refresh VALIDATION_RESULTS.md: 2026-08-17 run on conformance suite
  0.2.0-alpha.11 (server 73/73, auth 193/193, client 3/4 w/ sse-retry baselined)
- Bump conformance CI action pins v0.1.11 -> v0.1.16
- Update docs with missing features

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2026-08-19 11:16:44 +02:00
Iuliia Sobolevska
8ee8ccbc17
Make McpTransportContext.metadata immutable (#1076)
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-08-07 18:36:22 +02:00
nanookclaw
27b91521c0
fix: stop pagination on empty cursors (#954)
Signed-off-by: Nanook <nanookclaw@users.noreply.github.com>
Co-authored-by: Nanook <nanookclaw@users.noreply.github.com>
2026-08-07 18:25:39 +02:00
jiajingda
f5aab36a2f
Fix SSE event classification to follow spec for missing event field (#913)
Per the SSE specification (WHATWG HTML Living Standard 9.2.6), an event with no explicit event field MUST be dispatched as a message event. HttpClientStreamableHttpTransport previously used strict equality and silently dropped such frames in the reconnect/GET stream path, causing server-initiated notifications to never reach the handler. Extract classification into a package-private isMessageEvent helper and cover with parameterized unit tests.

Closes gh-885
2026-08-07 17:48:03 +02:00
Minsung Son
fd004989b9
refactor: add notification handler to stateless servers. (#835)
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
Co-authored-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-07-10 17:51:38 +02:00
Daniel Garnier-Moiroux
0557b87603
Introduce AGENTS.md (#1059)
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-07-08 15:16:28 +02:00
Mathias Geat
5d3decebd6
Fix error behavior on unregistered handlers in stateless server handler (#800)
Instead of throwing an McpError, it now returns with a JSON-RPC method not found error (-32601), aligned with the stateful implementation.

Closes #784
2026-07-08 14:42:06 +02:00
João Dinis Ferreira
dea53fd14c
Bump json-schema-validator to 2.0.4 / 3.0.6 (#1058)
Fixes #992
2026-07-08 12:06:32 +02:00
Ana-Maria Mihalceanu
30f1adf613
Update README.md (#1044) 2026-06-30 17:53:14 +02:00
Daniel Garnier-Moiroux
ff78191ebd
Close response after sending error in McpStreamableServerSession#responseStream (#1041)
Closes #1040

Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-06-26 16:06:36 +02:00
Daniel Garnier-Moiroux
f7d9a64b3c Change @ParameterizedTest -> @Test in HttpServletStatelessServerTransport
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-06-24 16:41:21 +02:00
Daniel Garnier-Moiroux
d015b4e97c Add tests for completion requests targeting missing prompt or resource
Polish gh-996

Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-06-24 16:41:10 +02:00