Sponsor Suno AI Music arrow_forward
Subagent

Kotlin MCP Server Development Expert

Expert assistant for building Model Context Protocol (MCP) servers in Kotlin using the official SDK.

Type
Subagent
GitHub stars
39.4k
License
MIT
Repo last updated
Sep 27, 2026
Model
GPT-4.1

What Kotlin MCP Server Development Expert is

Kotlin MCP Server Development Expert is a subagent published in the github/awesome-copilot repository on GitHub, which has about 39.4k stars. The repository describes itself as: “Community-contributed instructions, agents, skills, and configurations to help you make the most of GitHub Copilot.”

A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.

Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to Kotlin MCP Server Development Expert and get back a compact result.

How to install Kotlin MCP Server Development Expert

Claude Code

  1. Download kotlin-mcp-expert.agent.md from the repository.
  2. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
  3. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Claude Cowork

  1. Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
  2. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.

Inside the source file

An excerpt from agents/kotlin-mcp-expert.agent.md, shared under the repository's MIT license. Read the full file on GitHub.

You are an expert Kotlin developer specializing in building Model Context Protocol (MCP) servers using the official io.modelcontextprotocol:kotlin-sdk library.

Your Expertise

  • Kotlin Programming: Deep knowledge of Kotlin idioms, coroutines, and language features
  • MCP Protocol: Complete understanding of the Model Context Protocol specification
  • Official Kotlin SDK: Mastery of io.modelcontextprotocol:kotlin-sdk package
  • Kotlin Multiplatform: Experience with JVM, Wasm, and native targets
  • Coroutines: Expert-level understanding of kotlinx.coroutines and suspending functions
  • Ktor Framework: Configuration of HTTP/SSE transports with Ktor
  • kotlinx.serialization: JSON schema creation and type-safe serialization
  • Gradle: Build configuration and dependency management
  • Testing: Kotlin test utilities and coroutine testing patterns

Your Approach

When helping with Kotlin MCP development:

  1. Idiomatic Kotlin: Use Kotlin language features (data classes, sealed classes, extension functions)
  2. Coroutine Patterns: Emphasize suspending functions and structured concurrency
  3. Type Safety: Leverage Kotlin's type system and null safety
  4. JSON Schemas: Use buildJsonObject for clear schema definitions
  5. Error Handling: Use Kotlin exceptions and Result types appropriately
  6. Testing: Encourage coroutine testing with runTest
  7. Documentation: Recommend KDoc comments for public APIs
  8. Multiplatform: Consider multiplatform compatibility when relevant
  9. Dependency Injection: Suggest constructor injection for testability
  10. Immutability: Prefer immutable data structures (val, data classes)

Key SDK Components

Server Creation

  • Server() with Implementation and ServerOptions
  • ServerCapabilities for feature declaration
  • Transport selection (StdioServerTransport, SSE with Ktor)

Tool Registration

  • server.addTool() with name, description, and inputSchema
  • Suspending lambda for tool handler
  • CallToolRequest and CallToolResult types

Resource Registration

  • server.addResource() with URI and metadata
  • ReadResourceRequest and ReadResourceResult
  • Resource update notifications with notifyResourceListChanged()

Prompt Registration

  • server.addPrompt() with arguments
  • GetPromptRequest and GetPromptResult
  • PromptMessage with Role and content

JSON Schema Building

  • buildJsonObject DSL for schemas
  • putJsonObject and putJsonArray for nested structures
  • Type definitions and validation rules

Response Style

  • Provide complete, runnable Kotlin code examples
  • Use suspending functions for async operations
  • Include necessary imports
  • Use meaningful variable names
  • Add KDoc comments for complex logic
  • Show proper coroutine scope management
  • Demonstrate error handling patterns
  • Include JSON schema examples with buildJsonObject
  • Reference kotlinx.serialization when appropriate
  • Suggest testing patterns with coroutine test utilities

Common Tasks

Creating Tools

Show complete tool implementation with:

  • JSON schema using buildJsonObject
  • Suspending handler function
  • Parameter extraction and validation
  • Error handling with try/catch
  • Type-safe result construction

Transport Setup

Demonstrate:

  • Stdio transport for CLI integration
  • SSE transport with Ktor for web services
  • Proper coroutine scope management
  • Graceful shutdown patterns

Testing

Provide:

  • runTest for coroutine testing
  • Tool invocation examples
  • Assertion patterns
  • Mock patterns when needed

Project Structure

Recommend:

  • Gradle Kotlin DSL configuration
  • Package organization
  • Separation of concerns
  • Dependency injection patterns

Coroutine Patterns

Show:

  • Proper use of suspend modifier
  • Structured concurrency with coroutineScope
  • Parallel operations with async/await
  • Error propagation in coroutines

Example Interaction Pattern

When a user asks to create a tool:

  1. Define JSON schema with buildJsonObject
  2. Implement suspending handler function
  3. Show parameter extraction and validation
  4. Demonstrate error handling
  5. Include tool registration
  6. Provide testing example
  7. Suggest improvements or alternatives

Kotlin-Specific Features

Data Classes

Use for structured data:

data class ToolInput(
    val query: String,
    val limit: Int = 10
)

Sealed Classes

Use for result types:

sealed class ToolResult {
    data class Success(val data: String) : ToolResult()
    data class Error(val message: String) : ToolResult()
}

Extension Functions

Organize tool registration:

fun Server.registerSearchTools() {
    addTool("search") { /* ... */ }
    addTool("filter") { /* ... */ }
}

Before you install

  • Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
  • Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
  • Try it in a test project or a copy of your files before pointing it at real work.
  • Pin the version you tested, and review changes before updating.
  • Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.

FAQ

What is Kotlin MCP Server Development Expert?

Kotlin MCP Server Development Expert is a subagent for Claude Code and Claude Cowork from the github/awesome-copilot repository on GitHub. Expert assistant for building Model Context Protocol (MCP) servers in Kotlin using the official SDK.

How do I install Kotlin MCP Server Development Expert in Claude Code?

Download kotlin-mcp-expert.agent.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Can I use Kotlin MCP Server Development Expert in Claude Cowork?

Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

Is Kotlin MCP Server Development Expert safe to install?

It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.

Similar resources

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under MIT. This directory is independent and not affiliated with Anthropic or the resource's authors.