Kotlin Sdk
The official Kotlin SDK for Model Context Protocol servers and clients. Maintained in collaboration with JetBrains
The official Kotlin SDK for Model Context Protocol servers and clients. Maintained in collaboration with JetBrains
npx -y @modelcontextprotocol/inspector
# MCP Kotlin SDK [](https://central.sonatype.com/artifact/io.modelcontextprotocol/kotlin-sdk) [](https://github.com/modelcontextprotocol/kotlin-sdk/actions/workflows/build.yml) [](http://kotlinlang.org) [](https://kotlinlang.org/docs/multiplatform.html) [](http://java.com) [](LICENSE) Kotlin Multiplatform SDK for the [Model Context Protocol](https://modelcontextprotocol.io). It enables Kotlin applications targeting JVM, Native, JS, and Wasm to implement MCP clients and servers using a standardized protocol interface. ## Table of Contents * [Overview](#overview) * [Installation](#installation) * [Artifacts](#artifacts) * [Gradle setup (JVM)](#gradle-setup-jvm) * [Multiplatform](#multiplatform) * [Ktor dependencies](#ktor-dependencies) * [Quickstart](#quickstart) * [Creating a Client](#creating-a-client) * [Creating a Server](#creating-a-server) * [Core Concepts](#core-concepts) * [MCP Primitives](#mcp-primitives) * [Capabilities](#capabilities) * [Server Capabilities](#server-capabilities) * [Client Capabilities](#client-capabilities) * [Server Features](#server-features) * [Prompts](#prompts) * [Resources](#resources) * [Tools](#tools) * [Completion](#completion) * [Logging](#logging) * [Pagination](#pagination) * [Client Features](#client-features) * [Roots](#roots) * [Sampling](#sampling) * [Transports](#transports) * [STDIO Transport](#stdio-transport) * [Streamable HTTP Transport](#streamable-http-transport) * [SSE Transport](#sse-transport) * [WebSocket Transport](#websocket-transport) * [ChannelTransport (testing)](#channeltransport-testing) * [Connecting your server](#connecting-your-server) * [Examples](#examples) * [Documentation](#documentation) * [Contributing](#contributing) * [License](#license) ## Overview The Model Context Protocol allows applications to provide context for LLMs in a standardized way, separating the concerns of providing context from the actual LLM interaction. This Kotlin SDK implements the MCP specification, making it easy to: - Build MCP **clients** that can connect to any MCP server - Create MCP **servers** that expose resources, prompts, and tools - Target **JVM, Native, JS, and Wasm** from a single codebase - Use standard transports like **stdio**, **SSE**, **Streamable HTTP**, and **WebSocket** - Handle MCP protocol messages and lifecycle events with coroutine-friendly APIs ## Installation ### Artifacts - `io.modelcontextprotocol:kotlin-sdk` – umbrella SDK (client + server APIs) - `io.modelcontextprotocol:kotlin-sdk-client` – client-only APIs - `io.modelcontextprotocol:kotlin-sdk-server` – server-only APIs ### Gradle setup (JVM) Add the Maven Central repository and the SDK dependency: ```kotlin repositories { mavenCentral() } dependencies { // See the badge above for the latest version implementation("io.modelcontextprotocol:kotlin-sdk:$mcpVersio...
Expose your FastAPI endpoints as Model Context Protocol (MCP) tools, with Auth!
Chrome MCP Server is a Chrome extension-based Model Context Protocol (MCP) server that exposes your Chrome browser funct...
Unity MCP acts as a bridge, allowing AI assistants (like Claude, Cursor) to interact directly with your Unity Editor via...
A Go implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and exte...
Build effective agents using Model Context Protocol and simple workflow patterns
A community driven registry service for Model Context Protocol (MCP) servers.