Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ jobs:
working-directory: ./samples/kotlin-mcp-client
run: ./gradlew --no-daemon clean build -Pmcp.kotlin.overrideVersion=0.0.1-SNAPSHOT

# - name: Build Kotlin-MCP-Server Sample
# working-directory: ./samples/kotlin-mcp-server
# run: ./gradlew --no-daemon clean build -Pmcp.kotlin.overrideVersion=0.0.1-SNAPSHOT
- name: Build Kotlin-MCP-Server Sample
working-directory: ./samples/kotlin-mcp-server
run: ./gradlew --no-daemon clean build -Pmcp.kotlin.overrideVersion=0.0.1-SNAPSHOT

- name: Build Weather-Stdio-Server Sample
working-directory: ./samples/weather-stdio-server
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
matrix:
sample:
- kotlin-mcp-client
# - kotlin-mcp-server
- kotlin-mcp-server
- weather-stdio-server

name: Build Sample
Expand Down
32 changes: 17 additions & 15 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ kover = "0.9.3"
netty = "4.2.7.Final"
mavenPublish = "0.34.0"
binaryCompatibilityValidatorPlugin = "0.18.1"
openapi-generator = "7.17.0"

# libraries version
serialization = "1.9.0"
Expand All @@ -23,45 +24,46 @@ mokksy = "0.6.1"

[libraries]
# Plugins
dokka-gradle = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "dokka" }
kotlin-gradle = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
kotlin-serialization = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin" }
kotlinx-atomicfu-gradle = { module = "org.jetbrains.kotlinx:atomicfu-gradle-plugin", version.ref = "atomicfu" }
dokka-gradle = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "dokka" }
maven-publish = { module = "com.vanniktech:gradle-maven-publish-plugin", version.ref = "mavenPublish" }

# Kotlinx libraries
kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "serialization" }
kotlin-logging = { group = "io.github.oshai", name = "kotlin-logging", version.ref = "logging" }
kotlinx-collections-immutable = { group = "org.jetbrains.kotlinx", name = "kotlinx-collections-immutable", version.ref = "collections-immutable" }
kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "coroutines" }
kotlinx-coroutines-core-wasm = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core-wasm-js", version.ref = "coroutines" }
kotlinx-io-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-io-core", version.ref = "kotlinx-io" }
kotlinx-collections-immutable = { group = "org.jetbrains.kotlinx", name = "kotlinx-collections-immutable", version.ref = "collections-immutable" }
kotlin-logging = { group = "io.github.oshai", name = "kotlin-logging", version.ref = "logging" }
kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "serialization" }

# Ktor
ktor-bom = { group = "io.ktor", name = "ktor-bom", version.ref = "ktor" }
ktor-client-core = { group = "io.ktor", name = "ktor-client-core", version.ref = "ktor" }
ktor-client-logging = { group = "io.ktor", name = "ktor-client-logging"}
ktor-client-apache5 = { group = "io.ktor", name = "ktor-client-apache5" }
ktor-server-sse = { group = "io.ktor", name = "ktor-server-sse", version.ref = "ktor" }
ktor-server-websockets = { group = "io.ktor", name = "ktor-server-websockets", version.ref = "ktor" }
ktor-server-core = { group = "io.ktor", name = "ktor-server-core", version.ref = "ktor" }
ktor-client-core = { group = "io.ktor", name = "ktor-client-core" }
ktor-client-logging = { group = "io.ktor", name = "ktor-client-logging" }
ktor-server-core = { group = "io.ktor", name = "ktor-server-core" }
ktor-server-sse = { group = "io.ktor", name = "ktor-server-sse" }
ktor-server-websockets = { group = "io.ktor", name = "ktor-server-websockets" }

# Testing
awaitility = { group = "org.awaitility", name = "awaitility-kotlin", version.ref = "awaitility" }
kotest-assertions-core = { group = "io.kotest", name = "kotest-assertions-core", version.ref = "kotest" }
kotest-assertions-json = { group = "io.kotest", name = "kotest-assertions-json", version.ref = "kotest" }
kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "coroutines" }
ktor-client-mock = { group = "io.ktor", name = "ktor-client-mock", version.ref = "ktor" }
ktor-server-test-host = { group = "io.ktor", name = "ktor-server-test-host", version.ref = "ktor" }
ktor-client-mock = { group = "io.ktor", name = "ktor-client-mock" }
ktor-server-test-host = { group = "io.ktor", name = "ktor-server-test-host" }
mokksy = { group = "dev.mokksy", name = "mokksy", version.ref = "mokksy" }
slf4j-simple = { group = "org.slf4j", name = "slf4j-simple", version.ref = "slf4j" }
netty-bom = { group = "io.netty", name = "netty-bom", version.ref = "netty" }
slf4j-simple = { group = "org.slf4j", name = "slf4j-simple", version.ref = "slf4j" }

# Samples
ktor-client-cio = { group = "io.ktor", name = "ktor-client-cio", version.ref = "ktor" }
ktor-server-cio = { group = "io.ktor", name = "ktor-server-cio", version.ref = "ktor" }
ktor-client-cio = { group = "io.ktor", name = "ktor-client-cio" }
ktor-server-cio = { group = "io.ktor", name = "ktor-server-cio" }

[plugins]
kotlinx-binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "binaryCompatibilityValidatorPlugin" }
ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint" }
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint" }
openapi-generator = { id = "org.openapi.generator", version.ref = "openapi-generator" }
2 changes: 1 addition & 1 deletion kotlin-sdk-client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ kotlin {
sourceSets {
commonMain {
dependencies {
implementation(dependencies.platform(libs.ktor.bom))
api(project(":kotlin-sdk-core"))
api(libs.ktor.client.core)
implementation(libs.kotlin.logging)
Expand All @@ -41,7 +42,6 @@ kotlin {
commonTest {
dependencies {
implementation(kotlin("test"))
implementation(dependencies.platform(libs.ktor.bom))
implementation(libs.ktor.client.mock)
implementation(libs.ktor.server.websockets)
implementation(libs.kotlinx.coroutines.test)
Expand Down
3 changes: 2 additions & 1 deletion kotlin-sdk-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
id("mcp.publishing")
id("mcp.dokka")
alias(libs.plugins.kotlinx.binary.compatibility.validator)
id("org.openapi.generator") version "7.17.0"
alias(libs.plugins.openapi.generator)
}

/*
Expand Down Expand Up @@ -110,6 +110,7 @@ kotlin {
commonMain {
kotlin.srcDir(generateLibVersion)
dependencies {
implementation(dependencies.platform(libs.ktor.bom))
api(libs.kotlinx.serialization.json)
api(libs.kotlinx.coroutines.core)
api(libs.kotlinx.io.core)
Expand Down
1 change: 1 addition & 0 deletions kotlin-sdk-server/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ kotlin {
sourceSets {
commonMain {
dependencies {
implementation(dependencies.platform(libs.ktor.bom))
api(project(":kotlin-sdk-core"))
api(libs.ktor.server.core)
api(libs.ktor.server.sse)
Expand Down
1 change: 1 addition & 0 deletions kotlin-sdk-test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ kotlin {
sourceSets {
commonTest {
dependencies {
implementation(dependencies.platform(libs.ktor.bom))
implementation(project(":kotlin-sdk"))
implementation(kotlin("test"))
implementation(libs.kotest.assertions.json)
Expand Down
1 change: 1 addition & 0 deletions kotlin-sdk/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ kotlin {
sourceSets {
commonMain {
dependencies {
implementation(dependencies.platform(libs.ktor.bom))
api(project(":kotlin-sdk-core"))
api(project(":kotlin-sdk-client"))
api(project(":kotlin-sdk-server"))
Expand Down
1 change: 1 addition & 0 deletions samples/kotlin-mcp-client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ group = "org.example"
version = "0.1.0"

dependencies {
implementation(dependencies.platform(libs.ktor.bom))
implementation(libs.mcp.kotlin.client)
implementation(libs.ktor.client.cio)
implementation(libs.anthropic.java)
Expand Down
3 changes: 2 additions & 1 deletion samples/kotlin-mcp-client/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ slf4j = "2.0.17"

[libraries]
anthropic-java = { group = "com.anthropic", name = "anthropic-java", version.ref = "anthropic" }
ktor-client-cio = { group = "io.ktor", name = "ktor-client-cio", version.ref = "ktor" }
ktor-bom = { group = "io.ktor", name = "ktor-bom", version.ref = "ktor" }
ktor-client-cio = { group = "io.ktor", name = "ktor-client-cio" }
mcp-kotlin-client = { group = "io.modelcontextprotocol", name = "kotlin-sdk-client", version.ref = "mcp-kotlin" }
slf4j-simple = { group = "org.slf4j", name = "slf4j-simple", version.ref = "slf4j" }

Expand Down
1 change: 1 addition & 0 deletions samples/kotlin-mcp-server/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ application {
}

dependencies {
implementation(dependencies.platform(libs.ktor.bom))
implementation(libs.mcp.kotlin.server)
implementation(libs.ktor.server.cio)
implementation(libs.slf4j.simple)
Expand Down
3 changes: 2 additions & 1 deletion samples/kotlin-mcp-server/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ slf4j = "2.0.17"
serialization = "1.9.0"

[libraries]
ktor-server-cio = { group = "io.ktor", name = "ktor-server-cio", version.ref = "ktor" }
ktor-bom = { group = "io.ktor", name = "ktor-bom", version.ref = "ktor" }
ktor-server-cio = { group = "io.ktor", name = "ktor-server-cio" }
mcp-kotlin-server = { group = "io.modelcontextprotocol", name = "kotlin-sdk-server", version.ref = "mcp-kotlin" }
slf4j-simple = { group = "org.slf4j", name = "slf4j-simple", version.ref = "slf4j" }

Expand Down
1 change: 1 addition & 0 deletions samples/weather-stdio-server/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ group = "org.example"
version = "0.1.0"

dependencies {
implementation(dependencies.platform(libs.ktor.bom))
implementation(libs.ktor.client.content.negotiation)
implementation(libs.ktor.serialization.kotlinx.json)
implementation(libs.mcp.kotlin.server)
Expand Down
7 changes: 4 additions & 3 deletions samples/weather-stdio-server/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ slf4j = "2.0.17"
kotlin-logging = { group = "io.github.oshai", name = "kotlin-logging-jvm", version.ref = "logging" }
kotlinx-collections-immutable = { group = "org.jetbrains.kotlinx", name = "kotlinx-collections-immutable-jvm", version.ref = "collections-immutable" }
kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "coroutines" }
ktor-client-cio = { group = "io.ktor", name = "ktor-client-cio", version.ref = "ktor" }
ktor-client-content-negotiation = { group = "io.ktor", name = "ktor-client-content-negotiation", version.ref = "ktor" }
ktor-serialization-kotlinx-json = { group = "io.ktor", name = "ktor-serialization-kotlinx-json-jvm", version.ref = "ktor" }
ktor-bom = { group = "io.ktor", name = "ktor-bom", version.ref = "ktor" }
ktor-client-cio = { group = "io.ktor", name = "ktor-client-cio" }
ktor-client-content-negotiation = { group = "io.ktor", name = "ktor-client-content-negotiation" }
ktor-serialization-kotlinx-json = { group = "io.ktor", name = "ktor-serialization-kotlinx-json-jvm" }
ktor-server-cio = { group = "io.ktor", name = "ktor-server-cio", version.ref = "ktor" }
mcp-kotlin-client = { group = "io.modelcontextprotocol", name = "kotlin-sdk-client", version.ref = "mcp-kotlin" }
mcp-kotlin-server = { group = "io.modelcontextprotocol", name = "kotlin-sdk-server", version.ref = "mcp-kotlin" }
Expand Down
Loading