From 985c3a5c11bcb86ae4bdb14cdc7e25eecb91621e Mon Sep 17 00:00:00 2001 From: Aditya Datta Date: Tue, 25 Aug 2026 11:27:32 +0530 Subject: [PATCH] docs: add Kotlin quick start --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index f40e42a..694df65 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,10 @@ Most MCP test tooling runs *against* your server from the outside — the offici testImplementation 'io.github.senor14:mcp-java-testkit:0.5.1' ``` +```kotlin +testImplementation("io.github.senor14:mcp-java-testkit:0.5.1") +``` + > Pre-1.0: minor releases may still evolve the API. ## Quick start @@ -61,6 +65,21 @@ class MyServerConformanceTest { } ``` +Kotlin tests use the same JUnit 5 extension: + +```kotlin +@McpServerTest(command = ["java", "-jar", "build/libs/my-mcp-server.jar"]) +class MyServerConformanceTest { + @Test + fun `server conforms to the protocol`(client: McpTestClient) { + McpAssertions.assertThat(client) + .initializesSuccessfully() + .hasTools() + .toolSchemasAreValid() + } +} +``` + Works with any MCP server reachable over **stdio or Streamable HTTP** — including servers written in other languages. A Spring Boot MCP server gets first-class support via the `spring:` URL scheme, which discovers the random test port from the Spring context automatically: ```java