File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed
samples/weather-stdio-server/src/main/kotlin/io/modelcontextprotocol/sample/server Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ import io.modelcontextprotocol.kotlin.sdk.*
10
10
import io.modelcontextprotocol.kotlin.sdk.server.Server
11
11
import io.modelcontextprotocol.kotlin.sdk.server.ServerOptions
12
12
import io.modelcontextprotocol.kotlin.sdk.server.StdioServerTransport
13
- import kotlinx.coroutines.CompletableDeferred
14
13
import kotlinx.coroutines.Job
15
14
import kotlinx.coroutines.runBlocking
16
15
import kotlinx.io.asSink
@@ -19,8 +18,6 @@ import kotlinx.serialization.json.*
19
18
20
19
// Main function to run the MCP server
21
20
fun `run mcp server` () {
22
- val def = CompletableDeferred <Unit >()
23
-
24
21
// Base URL for the Weather API
25
22
val baseUrl = " https://api.weather.gov"
26
23
@@ -52,7 +49,7 @@ fun `run mcp server`() {
52
49
ServerOptions (
53
50
capabilities = ServerCapabilities (tools = ServerCapabilities .Tools (listChanged = true ))
54
51
)
55
- ) { def.complete( Unit ) }
52
+ )
56
53
57
54
// Register a tool to fetch weather alerts by state
58
55
server.addTool(
You can’t perform that action at this time.
0 commit comments