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