kotlin-sdk/kotlin-sdk-client/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jakub Amanowicz 43b59c9fc1
fix: SseTransport endpoint resolution (#329) (#565)
## Summary
Fix SSE endpoint resolution so absolute paths resolve against the
origin, and add tests covering absolute vs relative endpoint events.

## Motivation and Context
The SSE transport currently resolves all endpoint events against the SSE
URL’s base path. When the server sends an absolute endpoint (starting
with `/`), the client incorrectly prefixes it with the SSE path. This
change resolves absolute endpoints against the origin while keeping
relative behavior unchanged.

addresses: https://github.com/modelcontextprotocol/kotlin-sdk/issues/329

## How Has This Been Tested?
Unit tests added in `SseClientTransportTest` for absolute and relative
endpoint events.

## Breaking Changes
No.

## Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [x] Documentation update

## Checklist
- [x] I have read the [MCP
Documentation](https://modelcontextprotocol.io)
- [x] My code follows the repository's style guidelines
- [x] New and existing tests pass locally
- [x] I have added appropriate error handling
- [x] I have added or updated documentation as needed

## Additional context
The endpoint resolution logic now treats paths starting with `/` as
origin-relative. Relative paths continue to resolve against the SSE base
URL.
2026-02-26 12:00:46 +01:00
..
commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/client fix: SseTransport endpoint resolution (#329) (#565) 2026-02-26 12:00:46 +01:00
commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/client fix: SseTransport endpoint resolution (#329) (#565) 2026-02-26 12:00:46 +01:00
jvmTest refactor: Introduce AbstractClientTransport and simplify client transport lifecycle (#517) (#516) 2026-02-13 13:08:26 +02:00