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.*
1010import io.modelcontextprotocol.kotlin.sdk.server.Server
1111import io.modelcontextprotocol.kotlin.sdk.server.ServerOptions
1212import io.modelcontextprotocol.kotlin.sdk.server.StdioServerTransport
13- import kotlinx.coroutines.CompletableDeferred
1413import kotlinx.coroutines.Job
1514import kotlinx.coroutines.runBlocking
1615import kotlinx.io.asSink
@@ -19,8 +18,6 @@ import kotlinx.serialization.json.*
1918
2019// Main function to run the MCP server
2120fun `run mcp server` () {
22- val def = CompletableDeferred <Unit >()
23-
2421 // Base URL for the Weather API
2522 val baseUrl = " https://api.weather.gov"
2623
@@ -52,7 +49,7 @@ fun `run mcp server`() {
5249 ServerOptions (
5350 capabilities = ServerCapabilities (tools = ServerCapabilities .Tools (listChanged = true ))
5451 )
55- ) { def.complete( Unit ) }
52+ )
5653
5754 // Register a tool to fetch weather alerts by state
5855 server.addTool(
You can’t perform that action at this time.
0 commit comments