Add Kotlin Weather STDIO server sample (#50)

* Add Kotlin Weather STDIO server sample

* Update gradle build command in Readme to exclude tests
This commit is contained in:
Pavel Gorgulov 2025-03-11 09:16:28 +01:00 • committed by GitHub
commit 0a6490c7f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,35 @@
plugins {
kotlin("jvm") version "2.1.10"
kotlin("plugin.serialization") version "2.1.10"
id("com.github.johnrengelman.shadow") version "8.1.1"
application
}
application {
mainClass.set("io.modelcontextprotocol.sample.server.MainKt")
}
group = "org.example"
version = "0.1.0"
val mcpVersion = "0.3.0"
val slf4jVersion = "2.0.9"
val ktorVersion = "3.1.1"
dependencies {
implementation("io.modelcontextprotocol:kotlin-sdk:$mcpVersion")
implementation("org.slf4j:slf4j-nop:$slf4jVersion")
implementation("io.ktor:ktor-client-content-negotiation:$ktorVersion")
implementation("io.ktor:ktor-serialization-kotlinx-json:$ktorVersion")
testImplementation(kotlin("test"))
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.10.1")
}
tasks.test {
useJUnitPlatform()
}
kotlin {
jvmToolchain(17)
}