remove CompletableDeferred
This commit is contained in:
parent
df80a0e2c7
commit
a5dc69f699
1 changed files with 1 additions and 3 deletions
|
|
@ -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(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue