File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
samples/kotlin-mcp-client
src/main/kotlin/io/modelcontextprotocol/sample/client Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ version = "0.1.0"
1414
1515val mcpVersion = " 0.3.0"
1616val slf4jVersion = " 2.0.9"
17- val anthropicVersion = " 0.7 .0"
17+ val anthropicVersion = " 0.8 .0"
1818
1919dependencies {
2020 implementation(" io.modelcontextprotocol:kotlin-sdk:$mcpVersion " )
Original file line number Diff line number Diff line change @@ -2,10 +2,9 @@ package io.modelcontextprotocol.sample.client
22
33import com.anthropic.client.okhttp.AnthropicOkHttpClient
44import com.anthropic.core.JsonValue
5- import com.anthropic.models.MessageCreateParams
6- import com.anthropic.models.MessageParam
7- import com.anthropic.models.Tool
8- import com.anthropic.models.ToolUnion
5+ import com.anthropic.models.messages.*
6+ import com.fasterxml.jackson.core.type.TypeReference
7+ import com.fasterxml.jackson.databind.ObjectMapper
98import io.modelcontextprotocol.kotlin.sdk.Implementation
109import io.modelcontextprotocol.kotlin.sdk.client.Client
1110import io.modelcontextprotocol.kotlin.sdk.client.StdioClientTransport
@@ -23,8 +22,8 @@ class MCPClient : AutoCloseable {
2322 private val mcp: Client = Client (clientInfo = Implementation (name = " mcp-client-cli" , version = " 1.0.0" ))
2423
2524 private val messageParamsBuilder: MessageCreateParams .Builder = MessageCreateParams .builder()
26- .model(" claude-3-5-sonnet-20241022 " )
27- .maxTokens(1000 )
25+ .model(Model . CLAUDE_3_5_SONNET_20241022 )
26+ .maxTokens(1024 )
2827
2928 // List of tools offered by the server
3029 private lateinit var tools: List <ToolUnion >
You can’t perform that action at this time.
0 commit comments