Kotlin Multi-Agent Orchestrator
Enables end-to-end generation, scaffolding, testing, diagnosis, and auditing of Kotlin applications for Android, Compose Multiplatform, Ktor, and Spring Boot through a coordinated team of specialized agents.
README
Kotlin Multi-Agent Orchestrator (MCP Server & Skill)
Enterprise-grade Multi-Agent System & Model Context Protocol (MCP) Server for building production-ready Kotlin apps across Android (Jetpack Compose), Compose Multiplatform (CMP), Ktor Backend, and Spring Boot.
๐ Key Capabilities & Specialized Agent Team
| Specialized Agent | Role & Tool Name | Key Responsibilities |
|---|---|---|
| ๐งฉ Prompt Architect | decompose_kotlin_prompt |
Breaks down vague or complex user prompts into structured feature tickets (P0/P1/P2), Clean Architecture modules, and execution sprints. |
| ๐ Dependency Researcher | research_kotlin_dependencies |
Queries Maven Central, validates Kotlin 2.x K2 compiler compatibility, and generates standard gradle/libs.versions.toml Version Catalogs. |
| ๐จ UI / UX Specialist | design_kotlin_ui |
Generates modern Jetpack Compose / CMP screens with MVI Unidirectional Data Flow, Material 3 theming, animations, and @PreviewLightDark previews. |
| โ๏ธ Backend Specialist | scaffold_kotlin_backend |
Scaffolds high-throughput Ktor 3.x / Spring Boot Kotlin backend routes, services, Exposed/Room databases, and Koin DI modules. |
| ๐ฉบ Compiler & Error Doctor | diagnose_kotlin_errors |
Diagnoses Kotlin compiler errors, Gradle sync/build failures, Compose recomposition issues, and Coroutine race conditions with code diffs. |
| ๐งช QA & Test Specialist | generate_and_run_tests |
Generates Unit tests with MockK, Flow/State verification with Turbine, and Compose UI tests with createComposeRule. |
| ๐ Code Quality Auditor | audit_kotlin_codebase |
Audits Kotlin source code for memory leaks, GlobalScope anti-patterns, and Compose performance bottlenecks. |
| ๐ Master Orchestrator | orchestrate_kotlin_project |
Coordinates all specialized agents into an automated, end-to-end project generation pipeline. |
โก Performance & Design
- Zero-Latency Execution: Built with optimized TypeScript, in-memory caching, and sub-10ms response times.
- Progressive Disclosure: Built-in support for Antigravity progressive loading to keep context windows clean.
- Kotlin 2.x & K2 Ready: Out-of-the-box compatibility with the new official JetBrains Kotlin Compose Compiler plugin and modern Android Gradle Plugin standards.
๐ฆ Installation & Setup
1. Build the MCP Server
git clone https://github.com/peter14l/kotlin-agent-orchestrator.git
cd kotlin-agent-orchestrator
npm install
npm run build
npm test
2. Antigravity CLI Integration
Add the server to your Antigravity configuration (mcp_config.json or .agents/mcp.json):
{
"mcpServers": {
"kotlin-orchestrator": {
"command": "node",
"args": ["C:/Users/LOQ/kotlin-agent-orchestrator/dist/index.js"]
}
}
}
Or copy the skill to your project's .agents/skills/ directory:
mkdir -p .agents/skills/kotlin-orchestrator
cp SKILL.md .agents/skills/kotlin-orchestrator/
3. OpenCode Integration
Add this entry to your OpenCode configuration (~/.config/opencode/config.json or project opencode.json):
{
"mcp": {
"servers": {
"kotlin-orchestrator": {
"command": "node",
"args": ["C:/Users/LOQ/kotlin-agent-orchestrator/dist/index.js"],
"enabled": true
}
}
}
}
๐ ๏ธ MCP Tools Overview
1. orchestrate_kotlin_project
Runs the complete multi-agent pipeline from raw prompt to working project structure.
{
"prompt": "Build a real-time crypto portfolio tracker with offline caching and Material 3 UI",
"projectName": "CryptoPortfolio",
"targetPlatform": "android-compose",
"includeUi": true,
"includeBackend": true,
"includeTests": true
}
2. decompose_kotlin_prompt
Deconstructs large or vague requirements into technical specifications.
{
"prompt": "Build an e-commerce checkout flow with cart, discount coupons, and Stripe payment",
"projectName": "ShopCheckout",
"targetPlatform": "android-compose"
}
3. research_kotlin_dependencies
Generates standard Gradle Version Catalogs (libs.versions.toml).
{
"targetPlatform": "android-compose",
"libraries": ["coil", "room", "koin", "ktor"]
}
4. design_kotlin_ui
Generates Jetpack Compose / CMP Composable screens, ViewModels, and Previews.
{
"screenName": "CartScreen",
"targetPlatform": "android-compose",
"layoutDescription": "Cart items list with quantity controls, promo code field, and total price checkout bar."
}
5. scaffold_kotlin_backend
Scaffolds Ktor or Spring Boot Kotlin services with repositories and DI.
{
"domainName": "Order",
"backendType": "ktor",
"database": "exposed"
}
6. diagnose_kotlin_errors
Diagnoses compilation errors, Gradle issues, and runtime crashes.
{
"errorMessage": "This version (1.5.14) of the Compose Compiler requires Kotlin version 1.9.24 but you appear to be using Kotlin version 2.1.0"
}
7. generate_and_run_tests
Generates Unit, Turbine Flow, and Compose UI tests.
{
"className": "CartViewModel",
"testType": "viewmodel",
"methodsToTest": ["applyCoupon", "checkout"]
}
8. audit_kotlin_codebase
Reviews Kotlin code for performance, threading, and coroutine anti-patterns.
{
"code": "fun load() { GlobalScope.launch { Thread.sleep(1000) } }",
"fileType": "viewmodel"
}
๐งช Running Tests
npm test
All unit and integration tests execute using Node's native test runner in ~100ms.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.