Commit graph

356 commits

Author SHA1 Message Date
Konstantin Pavlov
5ad049240b chore: bump project version to 0.10.0 in gradle.properties 0.10.0 2026-03-26 19:18:24 +02:00
Konstantin Pavlov
bd4cf0c948
docs: add missing KDoc comments for public functions, properties, and classes (#621) 2026-03-26 18:25:13 +02:00
Konstantin Pavlov
c77ebe0c00
refactor(core): Fix Kotlin language and api version to 2.1 in build config (#620)
## Fix Kotlin language and api version to 2.1

- Remove language constructs not supported in Kotlin 2.1

<!-- Provide a brief summary of your changes -->

## Motivation and Context
To ensure binary compatibility

## How Has This Been Tested?
Regression tests

## 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 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
-->
2026-03-26 17:36:01 +02:00
Pavel Gorgulov
cd91eed35d
chore: simplify and clean up CI workflows (#617)
- Remove redundant Gradle flags, env vars, and unused settings across
all workflows
- Minimize GitHub Actions permissions to least-privilege
- Drop Windows build matrix (JVM tests covered by Linux)
- Simplify CodeQL workflow (remove matrix, unused permissions, stale
triggers)
- Clean up gradle.properties (remove unused KMP settings)

## How Has This Been Tested?
<!-- Have you tested this in a real application? Which scenarios were
tested? -->

## 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

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-26 13:45:58 +01:00
Pavel Gorgulov
435698a611
refactor(integration-test): modernize ts tests, update versions, rename SSE -> HTTP (#618)
- add tsconfig
- fix tsignore
- rename sse -> http
- clean up code

## How Has This Been Tested?
all tests passed

## 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
2026-03-26 13:19:10 +01:00
Pavel Gorgulov
558399039c
chore: deprecation cycle (#615)
Remove all deprecation with error level

## Motivation and Context
next minor release

## How Has This Been Tested?
-

## Breaking Changes
Removing it is a binary-incompatible change

## 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
- [x] I have added appropriate error handling
- [x] I have added or updated documentation as needed
2026-03-26 11:41:58 +01:00
dependabot[bot]
55afb63c27
chore(deps): bump gradle-wrapper from 9.3.1 to 9.4.1 (#614)
Bumps [gradle-wrapper](https://github.com/gradle/gradle) from 9.3.1 to
9.4.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/gradle/gradle/releases">gradle-wrapper's
releases</a>.</em></p>
<blockquote>
<h2>9.4.1</h2>
<p>The Gradle team is excited to announce Gradle 9.4.1.</p>
<p>Here are the highlights of this release:</p>
<ul>
<li>Java 26 support</li>
<li>Non-class-based JVM tests</li>
<li>Enhanced console progress bar</li>
</ul>
<p><a href="https://docs.gradle.org/9.4.1/release-notes.html">Read the
Release Notes</a></p>
<p>We would like to thank the following community members for their
contributions to this release of Gradle:
<a href="https://github.com/akankshaa-00">akankshaa-00</a>,
<a href="https://github.com/kelemen">Attila Kelemen</a>,
<a href="https://github.com/Vampire">Björn Kautler</a>,
<a href="https://github.com/dblood">dblood</a>,
<a href="https://github.com/drieks">Dennis Rieks</a>,
<a href="https://github.com/duvvuvenkataramana">duvvuvenkataramana</a>,
<a href="https://github.com/wakingrufus">John Burns</a>,
<a href="https://github.com/Julianw03">Julian</a>,
<a href="https://github.com/kevinstembridge">kevinstembridge</a>,
<a href="https://github.com/NielsDoucet">Niels Doucet</a>,
<a href="https://github.com/hfhbd">Philip Wedemann</a>,
<a href="https://github.com/ploober">ploober</a>,
<a href="https://github.com/rhernandez35">Richard Hernandez</a>,
<a href="https://github.com/rpalcolea">Roberto Perez Alcolea</a>,
<a href="https://github.com/slovdahl">Sebastian Lövdahl</a>,
<a href="https://github.com/stephan2405">stephan2405</a>,
<a href="https://github.com/slandelle">Stephane Landelle</a>,
<a href="https://github.com/usv240">Ujwal Suresh Vanjare</a>,
<a href="https://github.com/urdak">Victor Merkulov</a>,
<a href="https://github.com/Pankraz76">Vincent Potuček</a>,
<a href="https://github.com/vlsi">Vladimir Sitnikov</a>.</p>
<h2>Upgrade instructions</h2>
<p>Switch your build to use Gradle 9.4.1 by updating your wrapper:</p>
<pre><code>./gradlew wrapper --gradle-version=9.4.1 &amp;&amp; ./gradlew
wrapper
</code></pre>
<p>See the Gradle <a
href="https://docs.gradle.org/9.4.1/userguide/upgrading_version_9.html">9.x
upgrade guide</a> to learn about deprecations, breaking changes and
other considerations when upgrading.</p>
<p>For Java, Groovy, Kotlin and Android compatibility, see the <a
href="https://docs.gradle.org/9.4.1/userguide/compatibility.html">full
compatibility notes</a>.</p>
<h2>Reporting problems</h2>
<p>If you find a problem with this release, please file a bug on <a
href="https://github.com/gradle/gradle/issues">GitHub Issues</a>
adhering to our issue guidelines.
If you're not sure you're encountering a bug, please use the <a
href="https://discuss.gradle.org/c/help-discuss">forum</a>.</p>
<p>We hope you will build happiness with Gradle, and we look forward to
your feedback via <a href="https://twitter.com/gradle">Twitter</a> or on
<a href="https://github.com/gradle">GitHub</a>.</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="2d63270175"><code>2d63270</code></a>
Ignore test (<a
href="https://redirect.github.com/gradle/gradle/issues/37180">#37180</a>)</li>
<li><a
href="4c15906d6a"><code>4c15906</code></a>
Ignore test</li>
<li><a
href="9759ac1dec"><code>9759ac1</code></a>
Make console/SIGINT test deterministic (<a
href="https://redirect.github.com/gradle/gradle/issues/37178">#37178</a>)</li>
<li><a
href="aaf6ed46ed"><code>aaf6ed4</code></a>
Make console/SIGINT test deterministic</li>
<li><a
href="47cb78328a"><code>47cb783</code></a>
Fix OSC 9;4 progress bar not cleared on SIGINT (<a
href="https://redirect.github.com/gradle/gradle/issues/37038">#37038</a>)</li>
<li><a
href="ef03f1d41b"><code>ef03f1d</code></a>
Fix order-dependent assertion in
CrossBuildScriptCachingIntegrationSpec</li>
<li><a
href="fd26fd36d6"><code>fd26fd3</code></a>
Fix OSC 9;4 taskbar progress bar not cleared on build end or SIGINT</li>
<li><a
href="0a84d67519"><code>0a84d67</code></a>
Release notes for 9.4.1 (<a
href="https://redirect.github.com/gradle/gradle/issues/37148">#37148</a>)</li>
<li><a
href="e569c31320"><code>e569c31</code></a>
cleanup</li>
<li><a
href="9f227defc2"><code>9f227de</code></a>
cleanup</li>
<li>Additional commits viewable in <a
href="https://github.com/gradle/gradle/compare/v9.3.1...v9.4.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=gradle-wrapper&package-manager=gradle&previous-version=9.3.1&new-version=9.4.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-23 13:18:41 +02:00
Pavel Gorgulov
fd3a8583b8
feat: add tasks models (#566)
## Motivation and Context


closes #421 
#406 

## How Has This Been Tested?
Unit tests

## Breaking Changes
NaN

## 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

## 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
2026-03-20 18:07:32 +01:00
Pavel Gorgulov
62e4e50c67
docs: update AGENTS.md (#612)
Improve AGENTS.md

## Motivation and Context
The previous AGENTS.md contained many elements contradicting [best
practices](https://code.claude.com/docs/en/best-practices).

AGENTS.md/CLAUDE.md is loaded into the context on every request, so a
~300+ line file is too large and fills the context window.
> Keep it concise. For each line, ask: “Would removing this cause Claude
to make mistakes?” If not, cut it. Bloated CLAUDE.md files cause Claude
to ignore your actual instructions!

> Most best practices are based on one constraint: Claude’s context
window fills up fast, and performance degrades as it fills.

> The over-specified CLAUDE.md. If your CLAUDE.md is too long, Claude
ignores half of it because important rules get lost in the noise.

Since the file is loaded on every request, it should be general-purpose
rather than targeting specific use cases.

> CLAUDE.md is loaded every session, so only include things that apply
broadly.

AI coding agents are used not only for writing tests and
implementations.

- AGENTS.md should not contain behavioral instructions, especially like
`Tests first, always.`. This causes the agent to trigger test runs even
when not required, increasing request time and token consumption
significantly due to large test outputs. For example, on a simple
codebase question, the agent ran the full test suite and I waited over
10 minutes for a response.
- `Uphold SOLID principles` — self-evident rules, explaining what SOLID
stands for is redundant since AI coding agents are already trained on
this knowledge.
> Exclude: "Standard language conventions Claude already knows"

> Exclude: "Self-evident practices like 'write clean code'"

- Mentioning specific MCP servers (jetbrains, intellij-index) can
mislead the agent if they are not installed in the environment.
Additionally, [Anthropic
recommends](https://resources.anthropic.com/hubfs/The-Complete-Guide-to-Building-Skill-for-Claude.pdf)
mentioning the use of MCP in skills.
- The large Kotest patterns block targets a specific use case and is
unnecessary for other agent interactions. Moreover, the agent already
looks at neighboring test classes and can learn patterns from existing
tests
- The large Module documentation block covers a very rare use case.
- The KDoc block — the agent can derive this information from the
codebase, this should be a skill instead

These and other changes follow the best practices.

## 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
https://code.claude.com/docs/en/best-practices

https://resources.anthropic.com/hubfs/The-Complete-Guide-to-Building-Skill-for-Claude.pdf
https://agents.md/#examples
2026-03-20 15:01:58 +01:00
Konstantin Pavlov
ee6561c185
feat: #502 resource templates with basic template matcher (#606) 2026-03-19 12:30:22 +02:00
Pavel Gorgulov
2542c9cae1
feat: add mcp documentation skill for spec-aware development (#609)
Add a Claude Code skill (`.claude/skills/mcp-docs/`) that provides live
MCP documentation and specification context

## Motivation and Context
The modelcontextprotocol.io site provides both an [MCP
server](https://modelcontextprotocol.io/mcp) and an
[llms.txt](https://modelcontextprotocol.io/llms.txt) index for
machine-readable access to the documentation. This skill leverages both
to give Claude live access to the current spec during development.

## How Has This Been Tested?
The skill was evaluated on 3 realistic scenarios (implementation, code
review, spec question) comparing with-skill vs without-skill baseline:
- **Pass rate**: 100% vs 67% — skill consistently cites spec sources and
uses RFC 2119 language
- **Token efficiency**: 41% fewer tokens on average (44k vs 75k) — goes
directly to spec instead of reverse-engineering from codebase
- **Accuracy**: with-skill discovered URL mode elicitation (new in spec
2025-11-25) that baseline missed entirely
- **Description triggering**: optimized through 5 iterations of
automated trigger evaluation against 20 test prompts

## Breaking Changes
None

## 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)
- [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
2026-03-18 17:53:26 +01:00
Pavel Gorgulov
c136ad9bbe
docs: context7 config file (#605)
## Motivation and Context
- removed unnecessary badges from readme
- add context7 json file

## 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

## 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
- [ ] I have added or updated documentation as needed

## Additional context
<!-- Add any other context, implementation notes, or design decisions
-->
2026-03-18 00:34:50 +01:00
Pavel Gorgulov
921b1fd30e
docs: update client and server samples (#598)
Updated the client and server examples for further use in the following
guides: https://modelcontextprotocol.io/docs/develop/build-server and
https://modelcontextprotocol.io/docs/develop/build-client

## How Has This Been Tested?
claude desktop, cli

## Breaking Changes
NaN

## 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)
- [x] Example, 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
2026-03-13 10:23:51 +01:00
Konstantin Pavlov
4ecd95218a
fix(conformance): correct SEP-1330 enum schemas in test_elicitation_sep1330_enums (#600)
## Correct SEP-1330 enum schemas in test_elicitation_sep1330_enums

**NB! This PR contains changes from #599 and should be rebased and
merged after #599 is merged.**

Update conformance test according to [test
requirements](https://github.com/modelcontextprotocol/conformance/blob/main/src/scenarios/server/elicitation-enums.ts#L14C1-L35C9).

- Fix legacyEnum: was using `oneOf` with const/title pairs; now
correctly uses `enum` + `enumNames` arrays per LegacyEnumSchema spec
- Fix titledMulti: items were using `oneOf` with extra `type:"string"`;
now correctly uses `anyOf` per TitledMultiSelectEnumSchema spec
- Fix return text format to match expected "Elicitation completed:
action=..., content=..."
- Remove _elicitation-sep1330-enums_ from conformance baseline (test now
passes)

## How Has This Been Tested?

```shell
./conformance-test/run-conformance.sh server
```

## 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)
- [ ] 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

---------

Co-authored-by: devcrocod <devcrocod@gmail.com>
2026-03-12 17:25:14 +02:00
Konstantin Pavlov
736efe9dc0
fix(server): notifications not delivered over Streamable HTTP (#587) (#599)
## Changes

- fix(server): keep SSE connection open until explicitly cancelled
- conformance: add logging to test_tool_with_logging and update
troubleshooting documentation
- chore(conformance): remove 5 passing server tests from conformance
baselines:
    - tools-call-with-logging
    - tools-call-with-progress
    - tools-call-sampling
    - tools-call-elicitation
    - elicitation-sep1034-defaults

## Motivation and Context

Two bugs in StreamableHttpServerTransport caused server-to-client
notifications (e.g. notifications/message during tool calls) to be
silently dropped.
   
**Bug 1 — GET SSE stream closed immediately**
`handleGetRequest` rejected GET requests with 405 when
`enableJsonResponse = true` (which `mcpStreamableHttp` always sets).
Since the Ktor `sse {}` handler commits response headers before the body
runs, the reject failed silently and the function returned, causing Ktor
to close the SSE stream. There was also no `awaitCancellation()` to keep
the connection alive.
**Bug 2 — Notifications discarded in JSON mode**

In `send()`, notifications with a relatedRequestId entered the
POST-stream path but hit `if (!isTerminated) return` without being
forwarded anywhere.
   
**Fix**
- Remove the enableJsonResponse guard from handleGetRequest. The GET SSE
stream is an always-required notification channel, orthogonal to how
POST responses are delivered.
- Add `awaitCancellation()` to keep the GET SSE connection open until
the client disconnects or the transport closes.
- In `send()`, route notifications with a relatedRequestId to the
standalone GET SSE stream when `enableJsonResponse = true`.

## How Has This Been Tested?

Verified against the MCP conformance test suite — the
ToolsCallWithLogging scenario now passes. ngrep confirms the `GET /mcp`
stream stays open and `notifications/message` events arrive before the
`tools/call` response.


## 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: -->
- [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
<!-- 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

Fixes #587
Requires #585 to be merged first.

---------

Co-authored-by: devcrocod <devcrocod@gmail.com>
2026-03-12 16:52:27 +02:00
Pavel Gorgulov
e88b34170c
feat!: add mcp conformance test infra (#585); add SSE reconnection with retry support (#596) (#585)
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>
2026-03-12 15:44:59 +02:00
Pavel Gorgulov
338f94804f
feat: add tool execution properties to Tool (#567)
closes #543 

## How Has This Been Tested?
unit

## Breaking Changes
binary compatibility in the Tool class

## 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

## 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

---------

Co-authored-by: Konstantin Pavlov <1517853+kpavlov@users.noreply.github.com>
2026-03-10 20:05:44 +01:00
Pavel Gorgulov
0b39f57cff
docs: streamable server sample (#595)
- add a simple streamable http server example with auth
- update readme: replace quickstart example from sse server to
streamable server
- add readme files for samples, simple-streamable-server, notebooks

closes #170 

## How Has This Been Tested?
knit and inspector

## Breaking Changes
NaN

## 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)
- [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
- [ ] I have added appropriate error handling
- [x] I have added or updated documentation as needed
2026-03-10 12:45:21 +01:00
Jakub Amanowicz
5b58814613
feat: bump version to 0.9.0 (#576) 0.9.0
bumps version to 0.9.0
2026-03-05 14:24:07 +02:00
Konstantin Pavlov
1454229ad9
test: add serialization tests and guidelines for handling null and omitted fields (#583) 2026-03-04 18:59:07 +02:00
Konstantin Pavlov
3e7ea39bf7
chore: relax Detekt rules for tests (#582)
- Updated `detekt.yml` to exclude test folders from
`EmptyFunctionBlock`, `LargeClass`, and `LongMethod` checks.
- Cleanup detekt-baseline files.
- Simplified `.idea/detekt.xml`.

## Motivation and Context
To reduce linter noise and reduce tension

## How Has This Been Tested?
`./gradlew detekt`

## Breaking Changes
No

## Types of changes
- [x] Build tool/ci 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

#567
2026-03-03 23:46:32 +02:00
Konstantin Pavlov
a38818018a
fix!(server): #575 Rethrow CancellationException in StdioServerTransport, fix ReadBuffer (#571)
## Rethrow CancellationException in StdioServerTransport, fix ReadBuffer

### Changes
1. StdioServerTransport
- Replace generic `Throwable` catches with specific
`CancellationException` and `Exception` for clarity and correctness.
**breaking change** `Throwable` is not handled any more!
    - Refactor launching jobs to separate methods
- Introduce `READ_BUFFER_SIZE` constant to replace inline buffer size
literals.
- Add suppress annotations for clearer intent and constructor
documentation for better usability.
    - Extend StdioServerTransportTest

2. ReadBuffer

Previously, readMessage() returned null after consuming an unparseable
line even when more complete lines existed in the buffer. This caused
valid messages following a bad line in the same chunk to be silently
dropped until the next chunk arrived (or forever, in tests).
    
Fix the loop so null means only "no complete line available", not
"encountered a parse failure". Blank/whitespace-only lines are now
silently skipped via isBlank() rather than forwarded to the deserializer
and logged as errors.
    
    Refactor the method into three focused helpers:
     - readMessage() — outer loop over lines
- readLine() — consume the next newline-delimited line from the buffer
     - tryRecover()  — attempt deserialization from the first '{' onward

3. Add utility method `runIntegrationTest` for integration testing
(`runBlocking` + `withTimeout`). Use it in StdioServerTransportTest

4. Store processing Job reference and `calcelAndJoin()` it on close.
Partially addressing #574

## Motivation and Context

See #575, #564, #242 

## How Has This Been Tested?
Unit test added

## Breaking Changes

Semantic change: `Throwable` and CancellationException are not handled
any more!

## 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
<!-- 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
-->
2026-03-03 16:10:25 +02:00
Konstantin Pavlov
9eabb54cb5
refactor: refactor Streamable HTTP ktor extensions (#562) (#568) 2026-03-03 08:51:37 +02:00
Konstantin Pavlov
66d31d32a9
ci: update Codecov configuration for test and coverage upload (#580)
ci: update Codecov configuration for test and coverage upload

- Unified usage of `codecov/codecov-action@v5` for both test results and
coverage upload.
- Added `CODECOV_TOKEN` and `report_type` parameters for improved
configuration.

## Motivation and Context

Actually, CODECOV_TOKEN is required, even though the CodeCov banner
previously said the project can upload without a token.

## How Has This Been Tested?
CI

## Breaking Changes
No

## Types of changes

- [x] CI fix 

## 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
2026-03-02 18:00:11 +02:00
dependabot[bot]
eb94f14132
chore(deps): bump dev.mokksy:mokksy from 0.6.2 to 0.8.0 (#557)
Bumps [dev.mokksy:mokksy](https://github.com/mokksy/ai-mocks) from 0.6.2
to 0.8.0.

- Update dependency and migrate to new API

---------

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Konstantin Pavlov <1517853+kpavlov@users.noreply.github.com>
2026-03-02 16:41:14 +02:00
Konstantin Pavlov
c36881282f
ci: add Codecov coverage upload and XML report generation (#579)
## Add Codecov coverage upload and XML report generation

- Add `koverXmlReport` to Gradle tasks in Ubuntu workflow
- Configure Codecov action to upload coverage reports

Reports will be available on
https://app.codecov.io/gh/modelcontextprotocol/kotlin-sdk

## Motivation and Context
To provide better test coverage visibility

## How Has This Been Tested?
CI

## Breaking Changes
No

## Types of changes
- [x] CI 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
-->
2026-03-02 16:19:53 +02:00
Konstantin Pavlov
45fcc17a23
doc: update API reference URL in README.md (#578)
Update link in readme.md

## Motivation and Context

Kotlin SDK has moved from
https://modelcontextprotocol.github.io/kotlin-sdk/ to
https://kotlin.sdk.modelcontextprotocol.io/

-
[Announcement](https://discord.com/channels/1358869848138059966/1399986970851282954/1476078438266830931)
- DNS change PR: https://github.com/modelcontextprotocol/dns/pull/5

## Breaking Changes
No

## Types of changes

- [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)
- [ ] 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
2026-03-02 15:47:05 +02:00
dependabot[bot]
e124262982 chore(deps): bump actions/download-artifact from 7 to 8
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 7 to 8.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v7...v8)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-02 10:47:21 +02:00
dependabot[bot]
8a9922be79 chore(deps): bump actions/upload-artifact from 6 to 7
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-02 10:46:46 +02:00
Konstantin Pavlov
ec53adc317
feat: introduce StreamableHttpServerTransport.Configuration (#560)
## Introduce Configuration class for StreamableHttpServerTransport

Replace the six-parameter flat constructor of
`StreamableHttpServerTransport` with a typed `Configuration` class. This
improves API ergonomics, enables structural equality and copy(), and
provides a stable extension point for future options without further
breaking the constructor signature.

### Changes:

- Add `Configuration` as a public class nested directly on
`StreamableHttpServerTransport`, with `enableJsonResponse` as the first
parameter (most commonly set)
  - Change the primary constructor to accept `Configuration`.
- Rename `retryIntervalMillis: Long?` to `retryInterval: Duration?` in
Configuration, aligning with Kotlin's type-safe time API
  - Deprecate the old flat constructor with a compatibility bridge
  - Update KotlinTestBase integration test to use the new constructor
- Enable test
AbstractResourceIntegrationTest.testSubscribeAndUnsubscribe() since #249
is closed

## Motivation and Context

The current StreamableHttpServerTransport API cannot be easily extended:
adding more parameters would be a breaking change. But this is already
needed for #521.
This PR is a prerequisite for #535

## How Has This Been Tested?
Regression tests

## Breaking Changes
No. Current StreamableHttpServerTransport constructor was deprecated

## 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)
- [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
2026-02-26 13:21:49 +02:00
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
Konstantin Pavlov
27b419c446
test: Add basic authentication integration tests for SSE transport (#561) 2026-02-26 09:04:26 +02:00
Ryan Nett
4a08959121
feat! Add context to server call handlers (#515)
## Motivation and Context

Adds a `ClientConnection` context receiver to server call handlers,
which provides access to the client communication channel. This is
necessary to allow tools to send notifications, logging, elicitations,
etc.

Supersedes https://github.com/modelcontextprotocol/kotlin-sdk/pull/144,
discussed in
https://github.com/modelcontextprotocol/kotlin-sdk/issues/295.

## How Has This Been Tested?

With the added integration test.

## Breaking Changes

It breaks binary compatibility and breaks source compatibility for tool
handlers that already use `this`.

If you care a lot about maintaining compatibility, I could add some
overloads to ease the transition. But the new methods would likely need
to be named differently for resolution.

Future compatibility should be easier to maintain - `Context` is an
interface (with experimental opt-in subclassing), so new fields can be
added without breaking compatibility. Different types could also be
introduced for different handles without breaking compatibility, as long
as they extend `ClientConnection`.

## 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)
- [x] 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
- [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
-->

---------

Co-authored-by: Konstantin Pavlov <1517853+kpavlov@users.noreply.github.com>
2026-02-23 16:30:15 +02:00
Anastasiia Zarechneva
947d03dd44
Streamable HTTP transport tests follow-up (#559)
<!-- Provide a brief summary of your changes -->

## Motivation and Context
<!-- Why is this change needed? What problem does it solve? -->
Replace `withTimeout` with `eventually` in test assertions and improve
readability in exception handling

## 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? -->
None

## 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] Test 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
-->
2026-02-23 14:03:39 +01:00
Anastasiia Zarechneva
fe97b442f6
Some more Streamable HTTP client/server transport tests (#551) 2026-02-20 17:48:06 +02:00
Den Delimarsky
14139b6485
Update SECURITY.md to use GitHub Security Advisories (#536)
Replaces Anthropic HackerOne VDP references with standard GitHub
Security Advisory process.
2026-02-18 23:03:42 +02:00
dependabot[bot]
15559e690d
chore(deps): bump ajv from 8.17.1 to 8.18.0 in /integration-test/src/jvmTest/typescript in the npm_and_yarn group across 1 directory (#533)
Bumps the npm_and_yarn group with 1 update in the
/integration-test/src/jvmTest/typescript directory:
[ajv](https://github.com/ajv-validator/ajv).

Updates `ajv` from 8.17.1 to 8.18.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/ajv-validator/ajv/releases">ajv's
releases</a>.</em></p>
<blockquote>
<h2>v8.18.0</h2>
<h2>What's Changed</h2>
<ul>
<li>feat: allow tree-shaking by adding <code>&quot;sideEffects&quot;:
false</code> to <code>package.json</code> by <a
href="https://github.com/josdejong"><code>@​josdejong</code></a> in <a
href="https://redirect.github.com/ajv-validator/ajv/pull/2480">ajv-validator/ajv#2480</a></li>
<li>fix: <a
href="https://redirect.github.com/ajv-validator/ajv/issues/2482">#2482</a>
Infinity and NaN serialise to null by <a
href="https://github.com/jasoniangreen"><code>@​jasoniangreen</code></a>
in <a
href="https://redirect.github.com/ajv-validator/ajv/pull/2487">ajv-validator/ajv#2487</a></li>
<li>fix: small grammatical error in managing-schemas.md by <a
href="https://github.com/monteiro-renato"><code>@​monteiro-renato</code></a>
in <a
href="https://redirect.github.com/ajv-validator/ajv/pull/2508">ajv-validator/ajv#2508</a></li>
<li>fix: typos in schema-language.md by <a
href="https://github.com/monteiro-renato"><code>@​monteiro-renato</code></a>
in <a
href="https://redirect.github.com/ajv-validator/ajv/pull/2507">ajv-validator/ajv#2507</a></li>
<li>fix(pattern): use configured RegExp engine with $data keyword to
mitigate ReDoS attacks (CVE-2025-69873) by <a
href="https://github.com/epoberezkin"><code>@​epoberezkin</code></a> in
<a
href="https://redirect.github.com/ajv-validator/ajv/pull/2586">ajv-validator/ajv#2586</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/josdejong"><code>@​josdejong</code></a>
made their first contribution in <a
href="https://redirect.github.com/ajv-validator/ajv/pull/2480">ajv-validator/ajv#2480</a></li>
<li><a
href="https://github.com/monteiro-renato"><code>@​monteiro-renato</code></a>
made their first contribution in <a
href="https://redirect.github.com/ajv-validator/ajv/pull/2508">ajv-validator/ajv#2508</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/ajv-validator/ajv/compare/v8.17.1...v8.18.0">https://github.com/ajv-validator/ajv/compare/v8.17.1...v8.18.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="142ce84b80"><code>142ce84</code></a>
8.18.0</li>
<li><a
href="720a23fa45"><code>720a23f</code></a>
fix(pattern): use configured RegExp engine with $data keyword to
mitigate ReD...</li>
<li><a
href="82735a1582"><code>82735a1</code></a>
fix: typos in schema-language.md (<a
href="https://redirect.github.com/ajv-validator/ajv/issues/2507">#2507</a>)</li>
<li><a
href="b17ec32cd9"><code>b17ec32</code></a>
fix: small grammatical error in managing-schemas.md (<a
href="https://redirect.github.com/ajv-validator/ajv/issues/2508">#2508</a>)</li>
<li><a
href="69568d0856"><code>69568d0</code></a>
fix: <a
href="https://redirect.github.com/ajv-validator/ajv/issues/2482">#2482</a>
Infinity and NaN serialise to null (<a
href="https://redirect.github.com/ajv-validator/ajv/issues/2487">#2487</a>)</li>
<li><a
href="f06766f33e"><code>f06766f</code></a>
feat: allow tree-shaking by adding ``&quot;sideEffects&quot;:
false<code>to</code>package.json` ...</li>
<li>See full diff in <a
href="https://github.com/ajv-validator/ajv/compare/v8.17.1...v8.18.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ajv&package-manager=npm_and_yarn&previous-version=8.17.1&new-version=8.18.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/modelcontextprotocol/kotlin-sdk/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-18 18:32:33 +02:00
Konstantin Pavlov
bb79e200c4
fix!: Migrate Ktor extension functions from Routing to Route (#237) (#531)
# Migrate Ktor extension functions from `Routing` to `Route` (#237)

- Replaced `Routing` with `Route` in MCP-related functions for better
composability in nested contexts.
- Updated tests to verify compatibility with nested routes and subpaths.
- Deprecated legacy signatures and removed redundant overloads.

## How Has This Been Tested?
Unit test

## Breaking Changes
`Routing.mcp(...) `extension was replaced with `Route.mcp(...)`

## Types of changes

- [X] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [x] 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
Based on #314 by @IainHull but that PR is too outdated.
2026-02-18 16:43:37 +02:00
Konstantin Pavlov
b2878ed406
test: add DSL builder tests for Request, Capabilities, and Content types (#529)
# Add DSL builder tests for Request, Capabilities, and Content types

- Introduced unit tests for `RequestDslTest`, `CapabilitiesDslTest`, and
`ContentDslTest` to validate DSL builder functionality.
- Covered edge cases, nested properties, custom fields, and overwrite
behavior for requests, capabilities, and content creation.
- Update AGENTS.md

## Motivation and Context

for confidence


## Breaking Changes
No


## Types of changes

- [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
- [x] New and existing tests pass locally
- [ ] I have added appropriate error handling
- [ ] I have added or updated documentation as needed
2026-02-17 14:21:43 +02:00
Konstantin Pavlov
efed85ae06
fix(test): add timeout to prevent indefinite blocking in StdioClientTransportTest (#514) (#528)
- Introduced `withTimeout` to avoid indefinite hangs during test
execution (#514)

## Motivation and Context
Workaround for #514 in tests

## How Has This Been Tested?
Integration test updated, CI

## Breaking Changes
No

## Types of changes
- [x] Test fix

## 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
#514
2026-02-17 12:16:32 +02:00
Konstantin Pavlov
367618d109
refactor: Refactor serialization tests (#527)
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
2026-02-17 12:16:02 +02:00
Ilia Brovarnik
1b255a2baf
Add $defs to ToolSchema and tests (#526)
Add $defs support in ToolSchema and update tests.

Motivation and Context
Fix parsing when tool schemas include $defs.

How Has This Been Tested?

`./gradlew :kotlin-sdk-core:jvmTest --tests
"io.modelcontextprotocol.kotlin.sdk.types.ToolsTest"`

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)
- [ ] Documentation update

Checklist
- [x] I have read the MCP Documentation
- [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
N/A
2026-02-16 23:42:35 +02:00
Konstantin Pavlov
212cbfa325
feat: Add kotlin-sdk-testing module with channel-based transport implementation (#505)
# 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
2026-02-16 14:10:56 +02:00
dependabot[bot]
f9d491e4fa
Bump gradle-wrapper from 9.3.0 to 9.3.1 (#523)
Bumps gradle-wrapper from 9.3.0 to 9.3.1.


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=gradle-wrapper&package-manager=gradle&previous-version=9.3.0&new-version=9.3.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Konstantin Pavlov <1517853+kpavlov@users.noreply.github.com>
2026-02-16 10:31:59 +02:00
dependabot[bot]
2a04916c5f
Bump org.jetbrains.kotlinx.kover from 0.9.4 to 0.9.7 (#525)
Bumps
[org.jetbrains.kotlinx.kover](https://github.com/Kotlin/kotlinx-kover)
from 0.9.4 to 0.9.7.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/Kotlin/kotlinx-kover/releases">org.jetbrains.kotlinx.kover's
releases</a>.</em></p>
<blockquote>
<h2>0.9.7</h2>
<h2>Kover Gradle Plugin</h2>
<h3>Bugfixes</h3>
<ul>
<li><a
href="https://redirect.github.com/Kotlin/kotlinx-kover/issues/747"><code>[#747](https://github.com/Kotlin/kotlinx-kover/issues/747)</code></a>
Fixed a recurring issue in support of Android KMP libraries</li>
</ul>
<h2>0.9.6</h2>
<h2>Kover Gradle Plugin</h2>
<h3>Bugfixes</h3>
<ul>
<li><a
href="https://redirect.github.com/Kotlin/kotlinx-kover/issues/792"><code>[#792](https://github.com/Kotlin/kotlinx-kover/issues/792)</code></a>
Fixed support of Android 9 with hilt</li>
</ul>
<h2>0.9.5</h2>
<h2>Kover Gradle Plugin</h2>
<h3>Bugfixes</h3>
<ul>
<li><a
href="https://redirect.github.com/Kotlin/kotlinx-kover/issues/784"><code>[#784](https://github.com/Kotlin/kotlinx-kover/issues/784)</code></a>
Fixed support of build variants in Android Gradle Plugin 9.0.0</li>
<li><a
href="https://redirect.github.com/Kotlin/kotlinx-kover/issues/785"><code>[#785](https://github.com/Kotlin/kotlinx-kover/issues/785)</code></a>
Fixed support of test task dependencies in Android Gradle Plugin
9.0.0</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/Kotlin/kotlinx-kover/blob/main/CHANGELOG.md">org.jetbrains.kotlinx.kover's
changelog</a>.</em></p>
<blockquote>
<h1>0.9.7 / 2026-02-10</h1>
<h2>Kover Gradle Plugin</h2>
<h3>Bugfixes</h3>
<ul>
<li><a
href="https://redirect.github.com/Kotlin/kotlinx-kover/issues/747"><code>[#747](https://github.com/Kotlin/kotlinx-kover/issues/747)</code></a>
Fixed a recurring issue in support of Android KMP libraries</li>
</ul>
<h1>0.9.6 / 2026-02-04</h1>
<h2>Kover Gradle Plugin</h2>
<h3>Bugfixes</h3>
<ul>
<li><a
href="https://redirect.github.com/Kotlin/kotlinx-kover/issues/792"><code>[#792](https://github.com/Kotlin/kotlinx-kover/issues/792)</code></a>
Fixed support of Android 9 with hilt</li>
</ul>
<h1>0.9.5 / 2026-01-30</h1>
<h2>Kover Gradle Plugin</h2>
<h3>Bugfixes</h3>
<ul>
<li><a
href="https://redirect.github.com/Kotlin/kotlinx-kover/issues/784"><code>[#784](https://github.com/Kotlin/kotlinx-kover/issues/784)</code></a>
Fixed support of build variants in Android Gradle Plugin 9.0.0</li>
<li><a
href="https://redirect.github.com/Kotlin/kotlinx-kover/issues/785"><code>[#785](https://github.com/Kotlin/kotlinx-kover/issues/785)</code></a>
Fixed support of test task dependencies in Android Gradle Plugin
9.0.0</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="a9c6741bf9"><code>a9c6741</code></a>
Release 0.9.7</li>
<li><a
href="824138dd13"><code>824138d</code></a>
Fixed support of Android KMP libraries</li>
<li><a
href="3683ae251f"><code>3683ae2</code></a>
Fixed documentation generation in GitHub actions</li>
<li><a
href="3be0e15fa0"><code>3be0e15</code></a>
Release 0.9.6</li>
<li><a
href="2429f3b5b7"><code>2429f3b</code></a>
Fixed support of Android 9 with hilt</li>
<li><a
href="e92e37b05c"><code>e92e37b</code></a>
Release 0.9.5</li>
<li><a
href="d24bd82b96"><code>d24bd82</code></a>
Added full support of Android Gradle plugin 9.0.0</li>
<li>See full diff in <a
href="https://github.com/Kotlin/kotlinx-kover/compare/v0.9.4...v0.9.7">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.jetbrains.kotlinx.kover&package-manager=gradle&previous-version=0.9.4&new-version=0.9.7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-16 10:01:22 +02:00
dependabot[bot]
25aa9dd551
Bump io.mockk:mockk from 1.14.7 to 1.14.9 (#524) 2026-02-16 09:44:56 +02:00
Konstantin Pavlov
ed9ad83290
refactor: Harden detekt setup, address some issues (#507)
# 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
2026-02-13 22:17:27 +02:00
dependabot[bot]
4501f14b56
Bump dev.detekt from 2.0.0-alpha.1 to 2.0.0-alpha.2 (#512) 2026-02-13 21:19:06 +02:00
dependabot[bot]
f79d378697
Bump org.jetbrains.kotlinx:atomicfu-gradle-plugin from 0.29.0 to 0.31.0 (#513) 2026-02-13 18:40:40 +02:00
Konstantin Pavlov
0ca0061b4b
Add DeepWiki badge to README
Added badge for DeepWiki to README.
2026-02-13 15:24:43 +02:00