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:
parent
7d2e993b96
commit
58f2bbab0c
1 changed files with 697 additions and 0 deletions
31
samples/kotlin-mcp-client/build.gradle.kts
Normal file
31
samples/kotlin-mcp-client/build.gradle.kts
Normal 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)
|
||||
}
|
||||
Loading…
Reference in a new issue