Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import kotlin.concurrent.atomics.AtomicBoolean
import kotlin.concurrent.atomics.ExperimentalAtomicApi
import kotlin.time.Duration

@Deprecated("Use SseClientTransport instead", ReplaceWith("SseClientTransport"), DeprecationLevel.WARNING)
@Deprecated("Use SseClientTransport instead", ReplaceWith("SseClientTransport"), DeprecationLevel.ERROR)
public typealias SSEClientTransport = SseClientTransport

/**
Expand Down
1 change: 0 additions & 1 deletion kotlin-sdk-server/api/kotlin-sdk-server.api
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
public final class io/modelcontextprotocol/kotlin/sdk/server/KtorServerKt {
public static final fun MCP (Lio/ktor/server/application/Application;Lkotlin/jvm/functions/Function1;)V
public static final fun mcp (Lio/ktor/server/application/Application;Lkotlin/jvm/functions/Function1;)V
public static final fun mcp (Lio/ktor/server/routing/Routing;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V
public static final fun mcp (Lio/ktor/server/routing/Routing;Lkotlin/jvm/functions/Function1;)V
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,6 @@ public fun Routing.mcp(block: ServerSSESession.() -> Server) {
}
}

@Suppress("FunctionName")
@Deprecated("Use mcp() instead", ReplaceWith("mcp(block)"), DeprecationLevel.ERROR)
public fun Application.MCP(block: ServerSSESession.() -> Server) {
mcp(block)
}

@KtorDsl
public fun Application.mcp(block: ServerSSESession.() -> Server) {
install(SSE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import kotlin.uuid.Uuid

internal const val SESSION_ID_PARAM = "sessionId"

@Deprecated("Use SseServerTransport instead", ReplaceWith("SseServerTransport"), DeprecationLevel.WARNING)
@Deprecated("Use SseServerTransport instead", ReplaceWith("SseServerTransport"), DeprecationLevel.ERROR)
public typealias SSEServerTransport = SseServerTransport

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ fun runSseMcpServerWithPlainConfiguration(port: Int, wait: Boolean = true) {
routing {
sse("/sse") {
val transport = SseServerTransport("/message", this)
val serverSession = server.connect(transport)
val serverSession = server.createSession(transport)
serverSessions[transport.sessionId] = serverSession

serverSession.onClose {
Expand Down Expand Up @@ -197,7 +197,7 @@ fun runMcpServerUsingStdio() {
)

runBlocking {
server.connect(transport)
server.createSession(transport)
val done = Job()
server.onClose {
done.complete()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ fun runMcpServer() {
)

runBlocking {
val session = server.connect(transport)
val session = server.createSession(transport)
val done = Job()
session.onClose {
done.complete()
Expand Down
Loading