Skip to content

Commit 2586e56

Browse files
authored
Merge branch 'main' into skarpov/integration-tests
2 parents ae82a7a + b0f0759 commit 2586e56

File tree

5 files changed

+21
-23
lines changed

5 files changed

+21
-23
lines changed

buildSrc/src/main/kotlin/mcp.jreleaser.gradle.kts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jreleaser {
2222
active = Active.ALWAYS
2323
mavenCentral.create("ossrh") {
2424
active = Active.ALWAYS
25+
sign = true
2526
url = "https://central.sonatype.com/api/v1/publisher"
2627
applyMavenCentralRules = false
2728
maxRetries = 240
@@ -56,14 +57,6 @@ jreleaser {
5657
}
5758
}
5859

59-
release {
60-
github {
61-
enabled = false
62-
skipRelease = true
63-
skipTag = true
64-
}
65-
}
66-
6760
checksum {
6861
individual = false
6962
artifacts = false

buildSrc/src/main/kotlin/mcp.publishing.gradle.kts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,17 @@ publishing {
2626
}
2727
}
2828

29+
organization {
30+
name = "Anthropic"
31+
url = "https://www.anthropic.com"
32+
}
33+
2934
developers {
3035
developer {
31-
id = "Anthropic"
32-
name = "Anthropic Team"
33-
organization = "Anthropic"
34-
organizationUrl = "https://www.anthropic.com"
36+
id = "JetBrains"
37+
name = "JetBrains Team"
38+
organization = "JetBrains"
39+
organizationUrl = "https://www.jetbrains.com"
3540
}
3641
}
3742

kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/types.util.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ internal fun selectServerNotificationDeserializer(element: JsonElement): Deseria
178178
Method.Defined.NotificationsMessage.value -> LoggingMessageNotification.serializer()
179179
Method.Defined.NotificationsResourcesUpdated.value -> ResourceUpdatedNotification.serializer()
180180
Method.Defined.NotificationsResourcesListChanged.value -> ResourceListChangedNotification.serializer()
181-
Method.Defined.ToolsList.value -> ToolListChangedNotification.serializer()
182-
Method.Defined.PromptsList.value -> PromptListChangedNotification.serializer()
181+
Method.Defined.NotificationsToolsListChanged.value -> ToolListChangedNotification.serializer()
182+
Method.Defined.NotificationsPromptsListChanged.value -> PromptListChangedNotification.serializer()
183183
else -> null
184184
}
185185
}

kotlin-sdk-server/api/kotlin-sdk-server.api

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ public final class io/modelcontextprotocol/kotlin/sdk/LibVersionKt {
33
}
44

55
public final class io/modelcontextprotocol/kotlin/sdk/server/KtorServerKt {
6-
public static final fun MCP (Lio/ktor/server/application/Application;Lkotlin/jvm/functions/Function0;)V
7-
public static final fun mcp (Lio/ktor/server/application/Application;Lkotlin/jvm/functions/Function0;)V
8-
public static final fun mcp (Lio/ktor/server/routing/Routing;Ljava/lang/String;Lkotlin/jvm/functions/Function0;)V
9-
public static final fun mcp (Lio/ktor/server/routing/Routing;Lkotlin/jvm/functions/Function0;)V
6+
public static final fun MCP (Lio/ktor/server/application/Application;Lkotlin/jvm/functions/Function1;)V
7+
public static final fun mcp (Lio/ktor/server/application/Application;Lkotlin/jvm/functions/Function1;)V
8+
public static final fun mcp (Lio/ktor/server/routing/Routing;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V
9+
public static final fun mcp (Lio/ktor/server/routing/Routing;Lkotlin/jvm/functions/Function1;)V
1010
}
1111

1212
public final class io/modelcontextprotocol/kotlin/sdk/server/RegisteredPrompt {

kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/KtorServer.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import io.ktor.utils.io.KtorDsl
1919
private val logger = KotlinLogging.logger {}
2020

2121
@KtorDsl
22-
public fun Routing.mcp(path: String, block: () -> Server) {
22+
public fun Routing.mcp(path: String, block: ServerSSESession.() -> Server) {
2323
route(path) {
2424
mcp(block)
2525
}
@@ -29,7 +29,7 @@ public fun Routing.mcp(path: String, block: () -> Server) {
2929
* Configures the Ktor Application to handle Model Context Protocol (MCP) over Server-Sent Events (SSE).
3030
*/
3131
@KtorDsl
32-
public fun Routing.mcp(block: () -> Server) {
32+
public fun Routing.mcp(block: ServerSSESession.() -> Server) {
3333
val transports = ConcurrentMap<String, SseServerTransport>()
3434

3535
sse {
@@ -43,12 +43,12 @@ public fun Routing.mcp(block: () -> Server) {
4343

4444
@Suppress("FunctionName")
4545
@Deprecated("Use mcp() instead", ReplaceWith("mcp(block)"), DeprecationLevel.WARNING)
46-
public fun Application.MCP(block: () -> Server) {
46+
public fun Application.MCP(block: ServerSSESession.() -> Server) {
4747
mcp(block)
4848
}
4949

5050
@KtorDsl
51-
public fun Application.mcp(block: () -> Server) {
51+
public fun Application.mcp(block: ServerSSESession.() -> Server) {
5252
val transports = ConcurrentMap<String, SseServerTransport>()
5353

5454
install(SSE)
@@ -67,7 +67,7 @@ public fun Application.mcp(block: () -> Server) {
6767
private suspend fun ServerSSESession.mcpSseEndpoint(
6868
postEndpoint: String,
6969
transports: ConcurrentMap<String, SseServerTransport>,
70-
block: () -> Server,
70+
block: ServerSSESession.() -> Server,
7171
) {
7272
val transport = mcpSseTransport(postEndpoint, transports)
7373

0 commit comments

Comments
 (0)