kotlin-sdk/integration-test/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Pavel Gorgulov 9c0aa45e2a
fix: reject duplicate initialize requests in ServerSession (#624)
`ServerSession.handleInitialize()` now rejects duplicate `initialize`
requests with `INVALID_REQUEST` (-32600) error. `clientCapabilities` and
`clientVersion` changed from `var` to `AtomicRef`-backed `val`, with
atomic `compareAndSet(null, ...)` serving as both the guard and the
write

## How Has This Been Tested?
second `initialize` returns error, original capabilities preserved

## Breaking Changes
none

## 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)
- [ ] 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
<!-- Add any other context, implementation notes, or design decisions
-->
2026-03-27 17:16:10 +02:00
..
commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk fix: reject duplicate initialize requests in ServerSession (#624) 2026-03-27 17:16:10 +02:00
jvmTest fix: reject duplicate initialize requests in ServerSession (#624) 2026-03-27 17:16:10 +02:00