kotlin-mcp-server-generator
What it does
This agent creates a complete Kotlin server project for using the Model Context Protocol (MCP). It sets up the project structure, adds necessary libraries, and prepares the server to run.
When to use it
- βWhen you want to create a new MCP server in Kotlin.
- βWhen you need a base project with all the structure ready.
- βTo quickly start developing an MCP server.
Skill link
https://github.com/github/awesome-copilot/blob/main/skills/kotlin-mcp-server-generator/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βCreate a Kotlin MCP server project named 'my-server'.β
5 new skills a week. 1 minute to read.
How it works
It uses Gradle to manage the project, adds libraries like Ktor and the official MCP SDK. It also includes basic tools, error handling, and tests.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Kotlin MCP Server Project Generator
Generate a complete, production-ready Model Context Protocol (MCP) server project in Kotlin.
Project Requirements
You will create a Kotlin MCP server with:
- Project Structure: Gradle-based Kotlin project layout
- Dependencies: Official MCP SDK, Ktor, and kotlinx libraries
- Server Setup: Configured MCP server with transports
- Tools: At least 2-3 useful tools with typed inputs/outputs
- Error Handling: Proper exception handling and validation
- Documentation: README with setup and usage instructions
- Testing: Basic test structure with coroutines
Template Structure
myserver/
βββ build.gradle.kts
βββ settings.gradle.kts
βββ gradle.properties
βββ src/
β βββ main/
β β βββ kotlin/
β β βββ com/example/myserver/
β β βββ Main.kt
β β βββ Server.kt
β β βββ config/
β β β βββ Config.kt
β β βββ tools/
β β βββ Tool1.kt
β β βββ Tool2.kt
β βββ test/
β βββ kotlin/
β βββ com/example/myserver/
β βββ ServerTest.kt
βββ README.md
build.gradle.kts Template
plugins {
kotlin("jvm") version "2.1.0"
kotlin("plugin.serialization") version "2.1.0"
application
}
group = "com.example"
version = "1.0.0"
repositories {
mavenCentral()
}
dependencies {
implementation("io.modelcontextprotocol:kotlin-sdk:0.7.2")
// Ktor for transports
implementation("io.ktor:ktor-server-netty:3.0.0")
implementation("io.ktor:ktor-client-cio:3.0.0")
// Serialization
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3")
// Coroutines
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0")
// Logging
implementation("io.github.oshai:kotlin-logging-jvm:7.0.0")
implementation("ch.qos.logback:logback-classic:1.5.12")
// Testing
testImplementation(kotlin("test"))
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.9.0")
}
application {
mainClass.set("com.example.myserver.MainKt")
}
tasks.test {
useJUnitPlatform()
}
kotlin {
jvmToolchain(17)
}
settings.gradle.kts Template
rootProject.name = "{{PROJECT_NAME}}"
Main.kt Template
package com.example.myserver
import io.modelcontextprotocol.kotlin.sdk.server.StdioServerTransport
import kotlinx.coroutines.runBlocking
import io.github.oshai.kotlinlogging.KotlinLogging
private val logger = KotlinLogging.logger {}
fun main() = runBlocking {
logger.info { "Starting MCP server..." }
val config = loadConfig()
val server = createServer(config)
// Use stdio transport
val transport = StdioServerTransport()
logger.info { "Server '${config.name}' v${config.version} ready" }
server.connect(transport)
}
Server.kt Template
package com.example.myserver
import io.modelcontextprotocol.kotlin.sdk.server.Server
import io.modelcontextprotocol.kotlin.sdk.server.ServerOptions
import io.modelcontextprotocol.kotlin.sdk.Implementation
import io.modelcontextprotocol.kotlin.sdk.ServerCapabilities
import com.example.myserver.tools.registerTools
fun createServer(config: Config): Server {
val server = Server(
serverInfo = Implementation(
name = config.name,
version = config.version
),
options = ServerOptions(
capabilities = ServerCapabilities(
tools = ServerCapabilities.Tools(),
resources = ServerCapabilities.Resources(
subscribe = true,
listChanged = true
),
prompts = ServerCapabilities.Prompts(listChanged = true)
)
)
) {
config.description
}
// Register all tools
server.registerTools()
return server
}
Config.kt Template
package com.example.myserver.config
import kotlinx.serialization.Serializable
@Serializable
data class Config(
val name: String = "{{PROJECT_NAME}}",
val version: String = "1.0.0",
val description: String = "{{PROJECT_DESCRIPTION}}"
)
fun loadConfig(): Config {
return Config(
name = System.getenv("SERVER_NAME") ?: "{{PROJECT_NAME}}",
version = System.getenv("VERSION") ?: "1.0.0",
description = System.getenv("DESCRIPTION") ?: "{{PROJECT_DESCRIPTION}}"
)
β¦
FAQ
What is the Model Context Protocol (MCP)?
It's a protocol for communication between different parts of a system, allowing them to exchange information and call each other's functionalities in a standardized way.
What are Ktor and Kotlinx?
Ktor is a framework for building web applications and services in Kotlin. Kotlinx are additional libraries for Kotlin, such as those for serialization (to convert data to and from text) and coroutines (for handling asynchronous tasks).
What are 'tools' in this context?
These are specific functions that your MCP server can offer to be called by other systems. This generator already includes a template for you to add your own tools.
Details
Original description by the author
Generate a complete Kotlin MCP server project with proper structure, dependencies, and implementation using the official io.modelcontextprotocol:kotlin-sdk library.
repo: github/awesome-copilot
Popularity
- GitHub stars
- 40k
- Ranking position
- #7264
- License
- MIT
- Updated
- 10/15/2026
Comments
- β¦
More skills from this repository
acquire-codebase-knowledge
40kHelps your agent understand and document an existing code project. It's useful for onboarding new people or getting an overview of the architecture.
acreadiness-assess
40kEnables your agent to assess a project's readiness for AI and generate a report. It's useful for understanding how well a project is prepared to use AI tools.
acreadiness-generate-instructions
40kHelps your agent create instructions for AI tools based on an assessment. It's useful for improving how AI interacts with code and closing identified gaps.
acreadiness-policy
40kEnables your agent to help define or apply policies for AI project assessment. It's useful for standardizing how projects are evaluated and ensuring compliance.
Similar skills
api-connector-builder
280kHas your agent build new API connections following the existing pattern. Use when you need to add one more integration without creating a new way of doing things.
api-design
280kHelps your agent design REST APIs following best practices. It's useful for defining how APIs communicate, how errors are shown, and how to organize data.
backend-patterns
280kHelps your agent with server-side architecture patterns and database optimization. It's useful for building or reviewing code that runs on the server.