remove CompletableDeferred

This commit is contained in:
devcrocod 2025-03-19 00:14:12 +01:00
commit a5dc69f699

View file

@ -1140,8 +1140,6 @@ Add a server initialization function:
```kotlin ```kotlin
// Main function to run the MCP server // Main function to run the MCP server
fun `run mcp server`() { fun `run mcp server`() {
val def = CompletableDeferred<Unit>()
// Create the MCP Server instance with a basic implementation // Create the MCP Server instance with a basic implementation
val server = Server( val server = Server(
Implementation( Implementation(
@ -1151,7 +1149,7 @@ fun `run mcp server`() {
ServerOptions( ServerOptions(
capabilities = ServerCapabilities(tools = ServerCapabilities.Tools(listChanged = true)) capabilities = ServerCapabilities(tools = ServerCapabilities.Tools(listChanged = true))
) )
) { def.complete(Unit) } )
// Create a transport using standard IO for server communication // Create a transport using standard IO for server communication
val transport = StdioServerTransport( val transport = StdioServerTransport(