add client sample (#55)

* add mcp Client example

* Add sample links for weather-stdio-server and kotlin-mcp-client to main readme
This commit is contained in:
Pavel Gorgulov 2025-03-18 18:49:04 +01:00 • committed by GitHub
commit 58f2bbab0c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,31 @@
plugins {
kotlin("jvm") version "2.1.10"
application
id("com.github.johnrengelman.shadow") version "8.1.1"
}
application {
mainClass.set("io.modelcontextprotocol.sample.client.MainKt")
}
group = "org.example"
version = "0.1.0"
val mcpVersion = "0.3.0"
val slf4jVersion = "2.0.9"
val anthropicVersion = "0.8.0"
dependencies {
implementation("io.modelcontextprotocol:kotlin-sdk:$mcpVersion")
implementation("org.slf4j:slf4j-nop:$slf4jVersion")
implementation("com.anthropic:anthropic-java:$anthropicVersion")
}
tasks.test {
useJUnitPlatform()
}
kotlin {
jvmToolchain(17)
}