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
36 lines
824 B
Kotlin
36 lines
824 B
Kotlin
plugins {
|
|
alias(libs.plugins.kotlin.jvm)
|
|
alias(libs.plugins.kotlin.serialization)
|
|
alias(libs.plugins.shadow)
|
|
application
|
|
}
|
|
|
|
application {
|
|
mainClass.set("io.modelcontextprotocol.sample.server.MainKt")
|
|
}
|
|
|
|
group = "org.example"
|
|
version = "0.1.0"
|
|
|
|
dependencies {
|
|
implementation(dependencies.platform(libs.ktor.bom))
|
|
implementation(libs.mcp.kotlin.server)
|
|
implementation(libs.ktor.client.content.negotiation)
|
|
implementation(libs.ktor.serialization.kotlinx.json)
|
|
implementation(libs.ktor.client.cio)
|
|
implementation(libs.slf4j.simple)
|
|
runtimeOnly(libs.kotlin.logging)
|
|
|
|
testImplementation(kotlin("test"))
|
|
|
|
testImplementation(libs.mcp.kotlin.client)
|
|
testImplementation(libs.kotlinx.coroutines.test)
|
|
}
|
|
|
|
tasks.test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
kotlin {
|
|
jvmToolchain(17)
|
|
}
|