| Filename | Latest commit message | Latest commit date |
|---|---|---|
Bumps `coroutines` from 1.10.2 to 1.11.0. Updates `org.jetbrains.kotlinx:kotlinx-coroutines-core` from 1.10.2 to 1.11.0 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/Kotlin/kotlinx.coroutines/releases">org.jetbrains.kotlinx:kotlinx-coroutines-core's releases</a>.</em></p> <blockquote> <h2>1.11.0</h2> <h3>Various</h3> <ul> <li>Kotlin was updated to 2.2.20 (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4545">#4545</a>).</li> <li>Improved the published jar files (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/3842">#3842</a>, <a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4599">#4599</a>).</li> <li>Various documentation improvements, including complete rewrites of structured concurrency and error handling-related KDoc (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4433">#4433</a>, <a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4596">#4596</a>).</li> </ul> <h3>Breaking changes and deprecations</h3> <ul> <li>Moved <code>Promise</code>-related functions from JS and Wasm/JS to the new <code>web</code> target. On Wasm/JS, this is a breaking change. Before the change, <code>Promise</code> on Wasm/JS could work with arbitrary Kotlin types, but now, only <code>JsAny</code> subtypes are accepted (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4563">#4563</a>).</li> <li>Changed handling of coroutine exceptions that can't be propagated on JS and Wasm/JS. B efore, exceptions were logged, but now, they are reported to the JS runtime (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4451">#4451</a>, <a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4631">#4631</a>).</li> <li>Deprecated using <code>CoroutineDispatcher</code> as the coroutine context key; now, <code>ContinuationInterceptor</code> has to be used instead (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4333">#4333</a>).</li> <li>Advanced the deprecation levels on <code>kotlinx-coroutines-test</code> APIs (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4604">#4604</a>).</li> <li>Added lint functions that mark passing a <code>Job</code> to coroutine builders as deprecated (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4435">#4435</a>).</li> </ul> <h3>Bug fixes and improvements</h3> <ul> <li>Added a <code>callsInPlace(EXACTLY_ONCE)</code> contract to <code>runBlocking</code> in code shared between JVM and Native (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4368">#4368</a>).</li> <li>Added a <code>callsInPlace(EXACTLY_ONCE)</code> contract to <code>suspendCancellableCoroutine</code> (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4574">#4574</a>).</li> <li>Fixed <code>flowOn</code> incorrectly handling <code>ThreadContextElement</code> updates (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4403">#4403</a>).</li> <li>Fixed exceptions in user-supplied <code>Thread.UncaughtExceptionHandler</code> instances causing the internal coroutines machinery to fail (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4516">#4516</a>).</li> <li>Fixed <code>CoroutineDispatcher.asScheduler</code> in the RxJava integration not cancelling outstanding work when a <code>Worker</code> gets cancelled, which led to memory leaks in some scenarios (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4615">#4615</a>).</li> <li>Fixed <code>SharedFlow</code> entering an invalid state when a subscriber and an emitter are cancelled simultaneously (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4583">#4583</a>).</li> <li>Fixed an R8 optimization leading to <code>shareIn</code>/<code>stateIn</code> coroutines getting garbage-collected (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4646">#4646</a>). Thanks, <a href="https://github.com/solevic"><code>@solevic</code></a>!</li> </ul> <h3>Small additions</h3> <ul> <li>Added <code>CompletableDeferred.asDeferred</code> for obtaining a read-only <code>Deferred</code> view (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4408">#4408</a>).</li> <li>Added <code>SharedFlow.asFlow</code> for obtaining a <code>Flow</code> view with hidden hot flow semantics (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4530">#4530</a>). Thanks, <a href="https://github.com/g000sha256"><code>@g000sha256</code></a>!</li> <li>Added a <code>StateFlow.collectLatest</code> overload returning <code>Nothing</code> to assist with finding unreachable code (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4454">#4454</a>).</li> <li>Added <code>ReceiveChannel.consumeTo</code> for consuming a <code>ReceiveChannel</code> into a <code>MutableCollection</code> (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4520">#4520</a>).</li> <li>Added a <code>StateFlow<T>.onSubscription</code> overload returning a <code>StateFlow<T></code>, similar to <code>SharedFlow<T>.onSubscription</code> returning <code>SharedFlow<T></code> (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4275">#4275</a>). Thanks, <a href="https://github.com/xit0c"><code>@xit0c</code></a>!</li> <li>Added terminal <code>Flow</code> operators for collecting a <code>Flow</code> to a <code>Map</code> (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/1541">#1541</a>).</li> </ul> <h3>Changelog relative to version 1.11.0</h3> <p>No changes, only the version is increased.</p> <h2>1.11.0-rc02</h2> <p>Restored binary compatibility with 1.10.2 and older versions on Wasm/JS for usages of <code>Promise</code>-related functions (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4661">#4661</a>).</p> <h2>1.11.0-rc01</h2> <h3>Various</h3> <ul> <li>Kotlin was updated to 2.2.20 (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4545">#4545</a>).</li> <li>Improved the published jar files (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/3842">#3842</a>, <a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4599">#4599</a>).</li> <li>Various documentation improvements, including complete rewrites of structured concurrency and error handling-related KDoc (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4433">#4433</a>, <a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4596">#4596</a>).</li> </ul> <h3>Breaking changes and deprecations</h3> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md">org.jetbrains.kotlinx:kotlinx-coroutines-core's changelog</a>.</em></p> <blockquote> <h2>Version 1.11.0</h2> <h3>Various</h3> <ul> <li>Kotlin was updated to 2.2.20 (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4545">#4545</a>).</li> <li>Improved the published jar files (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/3842">#3842</a>, <a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4599">#4599</a>).</li> <li>Various documentation improvements, including complete rewrites of structured concurrency and error handling-related KDoc (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4433">#4433</a>, <a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4596">#4596</a>).</li> </ul> <h3>Breaking changes and deprecations</h3> <ul> <li>Moved <code>Promise</code>-related functions from JS and Wasm/JS to the new <code>web</code> target. On Wasm/JS, this is a breaking change. Before the change, <code>Promise</code> on Wasm/JS could work with arbitrary Kotlin types, but now, only <code>JsAny</code> subtypes are accepted (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4563">#4563</a>).</li> <li>Changed handling of coroutine exceptions that can't be propagated on JS and Wasm/JS. Before, exceptions were logged, but now, they are reported to the JS runtime (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4451">#4451</a>, <a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4631">#4631</a>).</li> <li>Deprecated using <code>CoroutineDispatcher</code> as the coroutine context key; now, <code>ContinuationInterceptor</code> has to be used instead (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4333">#4333</a>).</li> <li>Advanced the deprecation levels on <code>kotlinx-coroutines-test</code> APIs (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4604">#4604</a>).</li> <li>Added lint functions that mark passing a <code>Job</code> to coroutine builders as deprecated (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4435">#4435</a>).</li> </ul> <h3>Bug fixes and improvements</h3> <ul> <li>Added a <code>callsInPlace(EXACTLY_ONCE)</code> contract to <code>runBlocking</code> in code shared between JVM and Native (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4368">#4368</a>).</li> <li>Added a <code>callsInPlace(EXACTLY_ONCE)</code> contract to <code>suspendCancellableCoroutine</code> (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4574">#4574</a>).</li> <li>Fixed <code>flowOn</code> incorrectly handling <code>ThreadContextElement</code> updates (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4403">#4403</a>).</li> <li>Fixed exceptions in user-supplied <code>Thread.UncaughtExceptionHandler</code> instances causing the internal coroutines machinery to fail (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4516">#4516</a>).</li> <li>Fixed <code>CoroutineDispatcher.asScheduler</code> in the RxJava integration not cancelling outstanding work when a <code>Worker</code> gets cancelled, which led to memory leaks in some scenarios (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4615">#4615</a>).</li> <li>Fixed <code>SharedFlow</code> entering an invalid state when a subscriber and an emitter are cancelled simultaneously (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4583">#4583</a>).</li> <li>Fixed an R8 optimization leading to <code>shareIn</code>/<code>stateIn</code> coroutines getting garbage-collected (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4646">#4646</a>). Thanks, <a href="https://github.com/solevic"><code>@solevic</code></a>!</li> </ul> <h3>Small additions</h3> <ul> <li>Added <code>CompletableDeferred.asDeferred</code> for obtaining a read-only <code>Deferred</code> view (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4408">#4408</a>).</li> <li>Added <code>SharedFlow.asFlow</code> for obtaining a <code>Flow</code> view with hidden hot flow semantics (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4530">#4530</a>). Thanks, <a href="https://github.com/g000sha256"><code>@g000sha256</code></a>!</li> <li>Added a <code>StateFlow.collectLatest</code> overload returning <code>Nothing</code> to assist with finding unreachable code (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4454">#4454</a>).</li> <li>Added <code>ReceiveChannel.consumeTo</code> for consuming a <code>ReceiveChannel</code> into a <code>MutableCollection</code> (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4520">#4520</a>).</li> <li>Added a <code>StateFlow<T>.onSubscription</code> overload returning a <code>StateFlow<T></code>, similar to <code>SharedFlow<T>.onSubscription</code> returning <code>SharedFlow<T></code> (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4275">#4275</a>). Thanks, <a href="https://github.com/xit0c"><code>@xit0c</code></a>!</li> <li>Added terminal <code>Flow</code> operators for collecting a <code>Flow</code> to a <code>Map</code> (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/1541">#1541</a>).</li> </ul> <h3>Changelog relative to version 1.11.0</h3> <p>No changes, only the version is increased.</p> <h2>Version 1.11.0-rc02</h2> <p>Restored binary compatibility with 1.10.2 and older versions on Wasm/JS for usages of <code>Promise</code>-related functions (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4661">#4661</a>).</p> <h2>Version 1.11.0-rc01</h2> <h3>Various</h3> <ul> <li>Kotlin was updated to 2.2.20 (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4545">#4545</a>).</li> <li>Improved the published jar files (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/3842">#3842</a>, <a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4599">#4599</a>).</li> <li>Various documentation improvements, including complete rewrites of structured concurrency and error handling-related KDoc (<a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4433">#4433</a>, <a href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4596">#4596</a>).</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
| .. | ||
| gradle | ||
| src | ||
| build.gradle.kts | ||
| Dockerfile | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| README.md | ||
| settings.gradle.kts | ||
Kotlinlang MCP Server
A Streamable HTTP MCP server that exposes the official
Kotlin documentation to LLM clients — full-text search via
Algolia plus page retrieval in markdown through kotlinlang.org's
_llms endpoints.
Overview
This sample demonstrates an MCP server that wraps a real external documentation source. It uses the recommended Streamable HTTP transport, supports multiple concurrent client sessions, and caches responses in memory to reduce upstream load. The server is intentionally read-only — it exposes two tools, no prompts, no resources.
Prerequisites
- JDK 21+
- Algolia credentials for
kotlinlang.org(exported as environment variables, see Configuration)
Build & Run
export ALGOLIA_APP_ID=...
export ALGOLIA_API_KEY=...
export ALGOLIA_INDEX_NAME=...
./gradlew run
The server starts on http://localhost:8080/mcp by default.
Connect with the MCP Inspector:
npx @modelcontextprotocol/inspector
In the Inspector UI, select Streamable HTTP transport and enter http://localhost:8080/mcp.
MCP Capabilities
Tools
| Name | Description |
|---|---|
search_kotlinlang |
Full-text search across Kotlin documentation. Returns up to 5 results filtered to /docs/ pages. Responses cached for 10 minutes. |
get_kotlinlang_page |
Fetches a documentation page as markdown via kotlinlang.org's _llms endpoint. Accepts a path relative to /docs/. Cached for 1 hour. |
Example paths accepted by get_kotlinlang_page: coroutines-overview,
multiplatform/compose-multiplatform-and-jetpack-compose. Leading/trailing slashes and an optional
.html suffix are normalized before resolution.
Configuration
| Variable | Required | Default | Description |
|---|---|---|---|
ALGOLIA_APP_ID |
yes | — | Algolia application ID |
ALGOLIA_API_KEY |
yes | — | Algolia search API key |
ALGOLIA_INDEX_NAME |
yes | — | Algolia index name |
SERVER_PORT |
no | 8080 |
HTTP server port |
SERVER_HOST |
no | 0.0.0.0 |
HTTP server bind address |
The server does not provide fallback values for ALGOLIA_*. Startup fails if any of those
variables are missing.
Docker
Multi-stage build with Alpine-based images. Runs as a non-root user.
docker build -t kotlinlang-mcp-server .
docker run \
-p 8080:8080 \
-e ALGOLIA_APP_ID=... \
-e ALGOLIA_API_KEY=... \
-e ALGOLIA_INDEX_NAME=... \
kotlinlang-mcp-server
Connecting an MCP client
Any MCP client that supports Streamable HTTP transport can connect:
{
"mcpServers": {
"kotlinlang": {
"url": "http://localhost:8080/mcp"
}
}
}
Limitations
This sample is intended for demonstration only. Before production use, consider:
- In-memory cache only — cached data is lost on server restart.
- No authentication or authorization — run behind a trusted proxy or restrict network access.
- No rate limiting on outgoing requests to Algolia and kotlinlang.org.
- Permissive CORS (
anyHost()) — restrict to specific origins for any non-local deployment. - Streamable HTTP only — no STDIO transport for local-only usage.
- Tools only — no MCP resources or prompts are exposed.