Migrate detekt to a convention plugin in `buildSrc`, switch the project
to a fully explicit YAML config (`buildUponDefaultConfig = false`), fix
the real findings that this stricter setup revealed, and remove
`@Suppress` annotations that became unnecessary after the rule changes.
## Motivation and Context
- Explicit visibility into the rule set
- Lock against detekt version upgrades
## 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)
- [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
Adds a comprehensive conformance test suite for the Kotlin MCP SDK,
covering core protocol operations, tool calls, elicitation, resources,
prompts, and 20 OAuth/auth scenarios
- Conformance server and client implementations
- OAuth/auth test scenarios: JWT, authorization code flow, client
credentials, PKCE, scope handling, cross-app access, client registration
- CI workflow
- Baseline file for tracking expected failures
- Shell script
fixes:
- #592
- #593
- #596
## Remaining known failures (tracked issues, will be fixed directly in
`main`)
- [x] `tools-call-with-logging`, `tools-call-with-progress`,
`tools-call-sampling`, `tools-call-elicitation`,
`elicitation-sep1034-defaults`- see #599,
- [x] `elicitation-sep1330-enums` - #587#600
- [x] `initialize` - #588
- [x] `tools_call`, `auth/scope-step-up`, `auth/scope-retry-limit` -
#589
- [ ] `elicitation-sep1034-client-defaults` - #414
- [x] `sse-retry` - #590
- [ ] `resources-templates-read` - #591
## Breaking Changes
from #596
- `StreamableHttpClientTransport` and
`mcpStreamableHttp`/`mcpStreamableHttpTransport`: old constructors
accepting `Duration` timeout are now `@Deprecated` — use the new
overloads with `ReconnectionOptions` instead
- `StreamableHttpClientTransport.close()` no longer calls
`terminateSession()` automatically
## Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [x] 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
---------
Co-authored-by: Konstantin Pavlov <1517853+kpavlov@users.noreply.github.com>
1. Migrate test-utils module to multiplatform, add serialization
utilities
- Migrated `test-utils` to support Kotlin Multiplatform (JVM, JS,
Native).
- Added `verifySerialization`, `verifyDeserialization`,
`verifySerializationRoundTrip` utilities to streamline and validate JSON
serialization/deserialization
2. Refactor serialization tests to use test serialization utilities
- Updated serialization tests across the project to use
`verifySerialization` and `verifyDeserialization` utilities.
- Improved consistency and ensured proper round-trip validation for JSON
deserialization.
3. Remove some detekt baseline files and suppress `LongMethod` findings
- Deleted detekt baseline XML files for test sources.
- Suppressed `LongMethod` findings in relevant tests using `@Suppress`
annotations.
- Replaced empty method implementations with explicit `// noop` comments
for clarity.
- Adjusted min test coverage threshold in `build.gradle.kts`.
## Motivation and Context
To improve serialization testing
## How Has This Been Tested?
Unit tests
## Breaking Changes
No
## Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [x] Refactoring
## Checklist
<!-- Go over all the following points, and put an `x` in all the boxes
that apply. -->
- [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
- [ ] I have added appropriate error handling
- [ ] I have added or updated documentation as needed
# feat: Add kotlin-sdk-testing module with channel-based transport
implementation
- Introduced `kotlin-sdk-testing` module for testing utilities in the
MCP Kotlin SDK.
- Implemented `ChannelTransport`, providing JSON-RPC transport via
Kotlin coroutines channels.
<!-- Provide a brief summary of your changes -->
## Motivation and Context
This ChannelTransport can be used for testing Server implementation
without using real transports.
## How Has This Been Tested?
Unit test
## Breaking Changes
No
## Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [x] Documentation update
## Checklist
<!-- Go over all the following points, and put an `x` in all the boxes
that apply. -->
- [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
# Detekt setup hardeing; address some issues
- Address some detekt findings: missing KDocs, formatting, use `check*`
& `orEmpty()``
- Remove unnecessary KDoc comments from deprecated classes in `types.kt`
- Add Detekt baseline XML files for all modules
- Enforce stricter Detekt rules by setting `failOnSeverity` from `None`
to `Error`
## Motivation and Context
Detekt is not actually failing the build on violations. This PR is
enabling Detekt to fail on errors. Baseline fines added for historical
issues. Follow-up for #501
## How Has This Been Tested?
Regressions
## Breaking Changes
No breaking changes.
## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] Refactoring
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [x] Documentation update
## Checklist
<!-- Go over all the following points, and put an `x` in all the boxes
that apply. -->
- [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
- [ ] I have added appropriate error handling
- [ ] I have added or updated documentation as needed
- generate detekt config
- enable several rules
- disable ktlint backing property check
## Motivation and Context
Centralized control of detekt rules. Using detekt 2 configuration
## How Has This Been Tested?
locally
## Breaking Changes
-
## Types of changes
- [ ] 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
- [ ] I have added appropriate error handling
- [ ] I have added or updated documentation as needed
- Add Detekt configuration (`detekt.yml`) with custom rules
- Apply Detekt plugin to all subprojects
- Configure Detekt tasks in Gradle workflow
- Update Gradle dependency versions to include Detekt plugin
## Motivation and Context
Enhance static code analysis for improved code quality.
## Breaking Changes
No
## Types of changes
- [x] CI update
- [ ] 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
<!-- Go over all the following points, and put an `x` in all the boxes
that apply. -->
- [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
- [ ] I have added appropriate error handling
- [ ] I have added or updated documentation as needed
# Refactor test utilities, fix conformance
- Add `test-utils` module to streamline test cases
- Rename module `kotlin-sdk-test` -> `integration-test`
- Move test utilities for managing processes, ports, and TypeScript
execution logic
- Make conformance tests work by specifying conformance package version
(0.1.8)
## Motivation and Context
Reuse test infrastructure code, resurrect conformance tests
## How Has This Been Tested?
CI, locally
## Breaking Changes
No
## Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [x] Tests update
## Checklist
<!-- Go over all the following points, and put an `x` in all the boxes
that apply. -->
- [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
- [ ] I have added appropriate error handling
- [ ] I have added or updated documentation as needed
Implement the last version of the mcp schema and complete restructuring
of the mcp schema implementation from a monolithic `types.kt` file into
separate files.
- #158
- #185
- #353
- #298
- #248
## Motivation and Context
The previous implementation of the mcp schema was outdated and contained
several issues. In addition, it stored all mcp types in a single large
file, which made maintenance and further development more difficult
## How Has This Been Tested?
All tests passed
## Breaking Changes
Yes. The new types are now located in a separate package. Additionally,
many types have new parameters and modified constructors
## Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [x] 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
to adopt the new structure:
**Before:**
```kotlin
import io.modelcontextprotocol.kotlin.sdk.InitializeRequest
import io.modelcontextprotocol.kotlin.sdk.Resource
```
**After:**
```kotlin
import io.modelcontextprotocol.kotlin.sdk.types.InitializeRequest
import io.modelcontextprotocol.kotlin.sdk.types.Resource
```
# #302 Update samples build workflow
- Introduce workflow to build samples independently from the main
project
- Keep building samples against the current snapshot version of the SDK.
Update composite build configuration.
- Temporarily disable "samples/kotlin-mcp-server": the multiplatform
project is broken. **It doesn't compile for me even on the main
branch**. Not working with [MCP
Instepcor](https://modelcontextprotocol.io/docs/tools/inspector),
because CORS is not configured. Deserves a separate PR to fix.
## Motivation and Context
Samples should be independently buildable
## How Has This Been Tested?
<!-- Have you tested this in a real application? Which scenarios were
tested? -->
## Breaking Changes
<!-- Will users need to update their code or configurations? -->
## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [ ] 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
- [x] Build improvement
- [x] Tests
## Checklist
<!-- Go over all the following points, and put an `x` in all the boxes
that apply. -->
- [x] I have read the [MCP
Documentation](https://modelcontextprotocol.io)
- [x] My code follows the repository's style guidelines
- [ ] New and existing tests pass locally
- [ ] I have added appropriate error handling
- [ ] I have added or updated documentation as needed
## Additional context
<!-- Add any other context, implementation notes, or design decisions
-->
Update badges in README and set version to 0.7.4-SNAPSHOT
Not updating the version of sample projects because of #302
## Motivation and Context
<!-- Why is this change needed? What problem does it solve? -->
## How Has This Been Tested?
<!-- Have you tested this in a real application? Which scenarios were
tested? -->
## Breaking Changes
<!-- Will users need to update their code or configurations? -->
## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [ ] 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
<!-- Go over all the following points, and put an `x` in all the boxes
that apply. -->
- [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
- [ ] I have added appropriate error handling
- [ ] I have added or updated documentation as needed
## Additional context
<!-- Add any other context, implementation notes, or design decisions
-->
Release 0.7.3
## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [ ] 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
<!-- Go over all the following points, and put an `x` in all the boxes
that apply. -->
- [x] I have read the [MCP
Documentation](https://modelcontextprotocol.io)
- [x] My code follows the repository's style guidelines
- [ ] New and existing tests pass locally
- [ ] I have added appropriate error handling
- [ ] I have added or updated documentation as needed
## Additional context
<!-- Add any other context, implementation notes, or design decisions
-->
- Add OpenAPI Generator to build system to automatically generate MCP
protocol data classes from the official schema.
- Configure code quality tools to exclude generated files
- Add deserialization test
## Motivation and Context
Writing classes by hand is error-prone, when json schema exists. See
#185,
Also, autogenerating model classes ensures the SDK is in sync with the
protocol and can quickly catch up with its changes (see #218)
## How Has This Been Tested?
Regression tests
## Breaking Changes
No
## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
## Checklist
<!-- Go over all the following points, and put an `x` in all the boxes
that apply. -->
- [x] I have read the [MCP
Documentation](https://modelcontextprotocol.io)
- [ ] My code follows the repository's style guidelines
- [ ] New and existing tests pass locally
- [ ] I have added appropriate error handling
- [ ] I have added or updated documentation as needed
## Additional context
<!-- Add any other context, implementation notes, or design decisions
-->
Bump version to 0.7.2-alpha2
## Motivation and Context
New prerelease version with signing fixes
## Types of changes
- [ ] 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
- [ ] I have added appropriate error handling
- [ ] I have added or updated documentation as needed
## Motivation and Context
- test new publish plugin
- add package.kt to kotlin-sdk umbrella module to resolve klib
generation errors during Maven publishing
## Breaking Changes
no
## Types of changes
- [ ] 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
- [ ] I have added appropriate error handling
- [ ] I have added or updated documentation as needed
#196 Update build configuration and workflows for enhanced local
publishing and sample builds
- Add `mavenLocal()` to repository configuration in sample projects.
- Update dependencies to distinguish between `mcp.kotlin.client` and
`mcp.kotlin.server`.
- Include `JAVA_OPTS` for optimized memory usage in GitHub workflow.
- Enhance build workflow to include local publishing and build steps for
sample projects.
- Add package-lock.json for Kotlin JS/WASM Store
- Switch to SNAPSHOT versions by default
## Motivation and Context
#196 Samples MUST be validated as part of the build
## How Has This Been Tested?
```sh
./gradlew :kotlin-sdk-core:publishToMavenLocal
./gradlew :kotlin-sdk-client:publishToMavenLocal
./gradlew :kotlin-sdk-server:publishToMavenLocal
( cd ./samples/kotlin-mcp-client && ./../../gradlew clean build )
( cd ./samples/kotlin-mcp-server && ./../../gradlew clean build )
( cd ./samples/weather-stdio-server && ./../../gradlew clean build )
```
## Breaking Changes
<!-- Will users need to update their code or configurations? -->
## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [ ] 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
<!-- Go over all the following points, and put an `x` in all the boxes
that apply. -->
- [x] I have read the [MCP
Documentation](https://modelcontextprotocol.io)
- [ ] My code follows the repository's style guidelines
- [x] New and existing tests pass locally
- [ ] I have added appropriate error handling
- [ ] I have added or updated documentation as needed
## Additional context
<!-- Add any other context, implementation notes, or design decisions
-->
Bump version to 0.7.1
## How Has This Been Tested?
Locally
## Breaking Changes
-
## Checklist
<!-- Go over all the following points, and put an `x` in all the boxes
that apply. -->
- [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
- [ ] I have added appropriate error handling
- [x] I have added or updated documentation as needed
## #252 Add module documentation and enhance Dokka configuration
## How Has This Been Tested?
`./gradlew :docs:dokkaGenerate`
## Changes
- Add workflow to build and publish API documentation with Dokka
- Introduce `.github/workflows/apidocs.yaml` to build and deploy API
docs on `main` and release events.
- Configure Gradle for Dokka builds and update project dependencies.
- Include `:docs` module in project settings.
- Introduce `Module.md` for `kotlin-sdk-server`, `kotlin-sdk-client`,
and `kotlin-sdk-core` modules.
- Update `.gitignore` to include `.idea/icon.png` and add placeholder
icon files
- Remove outdated documentation HTML files
## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [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
<!-- Go over all the following points, and put an `x` in all the boxes
that apply. -->
- [ ] I have read the [MCP
Documentation](https://modelcontextprotocol.io)
- [ ] My code follows the repository's style guidelines
- [ ] New and existing tests pass locally
- [ ] 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
-->
---------
Co-authored-by: devcrocod <devcrocod@gmail.com>
## Motivation and Context
Make sure, that code is properly tested
## How Has This Been Tested?
Run `./gradlew clean ktlintCheck build koverVerify koverLog
koverHtmlReport` on CI
## Changes
- Integrate Kover plugin for code coverage analysis
- Publish Html report
- Run `./gradlew clean ktlintCheck build koverVerify koverLog
koverHtmlReport` on CI
## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [ ] 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
- [x] Build tooling update
## Checklist
<!-- Go over all the following points, and put an `x` in all the boxes
that apply. -->
- [ ] I have read the [MCP
Documentation](https://modelcontextprotocol.io)
- [ ] My code follows the repository's style guidelines
- [x] New and existing tests pass locally
- [ ] I have added appropriate error handling
- [ ] I have added or updated documentation as needed
## Additional context
<!-- Add any other context, implementation notes, or design decisions
-->
* Modularize SDK: migrated client and server implementations to separate modules. Removed old configuration files and reorganized the source code structure
* add support native targets and update js/wasm configurations
* Refactor sample projects: add samples as composite builds, replace hardcoded dependencies with version catalog, remove obsolete gradle wrapper files
* Update .gitignore: exclude SWE agent directories (.claude/ and .junie/)
* Refine CodeQL workflow: update Kotlin build steps to target individual modules separately instead of building all at once
* Update CI workflows configuration for debugging
* Update .github/workflows/gradle-publish.yml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Refine Gradle and CI workflows for improved variable usage and error handling
* Add validation for OSSRH credentials in Gradle publish workflow
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Refactor handlers and collections to use atomic references: use persistent collections for thread safety
* refactor remove and add public tools/roots/prompts for server
---------
Co-authored-by: Leonid Stashevsky <e5l@users.noreply.github.com>
* add wasm and ios targets
* add yarn.lock file to gitignore
* clean up code
* fix typo in method name
* add wasm server example
* update jrelease publishing for klibs
* update gradle-publish workflow to use macos runner
* update README to reflect multiplatform support and clarify server setup for JVM and WASM
* remove the old main file from the kotlin-mcp-server example
* update api dump
* Refactor `build.gradle.kts`
* clean up imports and remove unnecessary charset specification in tests
* add JS target configuration and update API dump
* update kotlin version to 2.1.20
* change atomics from atomicfu to kotlin.concurrent
* refactor to use the writechannel
* cancel job and close channel
* Migrate to Kotlin multiplatform
* Fix publication
* Switch to using `alias` for the AtomicFu plugin
---------
Co-authored-by: Alexander Sysoev <Alexander.Sysoev@jetbrains.com>