home / mcp / kotlin mcp server

Kotlin MCP Server

๐Ÿง  Kotlin MCP Server for Android app development using OpenAI, Gemini, or OpenRouter. Enables AI-assisted coding via Aider, Gradle build/test integration, Kotlin LSP, and Docker-based portability.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "normaltusker-kotlin-mcp-server": {
      "url": "http://localhost:8080/mcp",
      "headers": {
        "MCP_GDPR_MODE": "true",
        "MCP_HIPAA_MODE": "true",
        "MCP_MAX_RETRIES": "5",
        "MCP_SIDECAR_CMD": "[\"java\",\"-jar\",\"kotlin-sidecar.jar\"]",
        "MCP_LLM_PROVIDER": "local",
        "MCP_API_TIMEOUT_MS": "3000",
        "MCP_ENCRYPTION_KEY": "<YOUR_BASE64_KEY>",
        "MCP_RATE_LIMIT_QPS": "10",
        "MCP_BACKUP_RETENTION_DAYS": "30",
        "MCP_SYNC_INTERVAL_SECONDS": "300"
      }
    }
  }
}

You run an enterprise-grade MCP Server that gives AI agents secure, context-aware access to Kotlin-based Android projects. It provides AI-assisted code generation, analysis, and development tooling with strong security, privacy, and modular architecture so you can scale your Android workflows across teams while staying compliant.

How to use

You use an MCP client to interact with the server through either a local (stdio) process or a remote HTTP endpoint. Once connected, you can analyze your Android projects, generate code with AI assistance, scaffold architectures like MVVM, set up DI, manage rooms and databases, add security and compliance features, orchestrate API integrations, and run builds and tests across your Kotlin codebase. The tools are designed to understand your project root and to operate inside your workspace, never modifying files outside your project unless you explicitly allow it.

How to install

Prerequisites you need before installing: Python 3.8 or newer, a Python package manager (pip), Git, and an IDE with MCP support if you plan to integrate with an IDE. You also need a working Android project path you want to connect to the MCP Server.

Step 1. Clone and set up the project. Use your preferred URL to clone the MCP server repository into a local directory, then navigate into the project. Step 2. Install dependencies. Run the installation script or install dependencies manually as needed by your environment. Step 3. Install and configure the MCP server. Use the provided installer to perform a zero-configuration setup or follow the manual steps if you prefer to customize paths and settings.

Step 4. Start the server using the standard runtime command. If you are using the automatic installer, you will get a ready-to-run server command. If you run the server directly, start with the recommended Python invocation and the main server script.

Additional content

Security and privacy features are built in. You get GDPR and HIPAA compliance features, audit trails, data encryption, and privacy-by-design protections. You can enable local AI inference or connect to external LLM providers, and you can integrate with cloud storage for enterprise-grade file management.

The server is organized into modular components for AI integration, Android project management, Gradle tooling, security, testing, and utilities. This design supports scalable tool exposure with intelligent proxies and robust error handling.

Available tools

gradle_build

Build Android projects by executing Gradle tasks such as assembleDebug, assembleRelease, or test.

run_tests

Execute unit, integration, or UI tests with comprehensive reporting.

create_kotlin_file

Generate Kotlin source files with proper package declarations and structure.

create_layout_file

Create Android XML layouts with appropriate root and attributes.

analyze_project

Provide analysis of project structure, dependencies, security, and performance.

format_code

Format Kotlin code according to style guidelines.

run_lint

Run static analysis with lint tools like detekt or ktlint.

generate_docs

Generate project documentation in HTML or other formats.

create_compose_component

Generate Jetpack Compose UI components with best practices.

create_custom_view

Create custom Android views with lifecycle management.

setup_mvvm_architecture

Set up MVVM architecture including ViewModel, Repository, and UI layers.

setup_dependency_injection

Configure dependency injection with Hilt or Dagger.

setup_room_database

Create Room database with entities, DAOs, and migrations.

setup_retrofit_api

Set up Retrofit API interfaces with interceptors and error handling.

encrypt_sensitive_data

Encrypts sensitive data using enterprise encryption standards.

implement_gdpr_compliance

Implement GDPR compliance features including consent and data export.

implement_hipaa_compliance

Implement HIPAA-compliant security measures and audit logging.

setup_secure_storage

Configure encrypted persistent storage with key management.

query_llm

Query local or remote language models for code assistance.

analyze_code_with_ai

Use AI to analyze code for security, performance, and quality.

generate_code_with_ai

AI-powered code generation based on natural language input.

manage_project_files

Advanced file operations including backup and sync with encryption.

setup_cloud_sync

Configure cloud storage synchronization with encryption.

setup_external_api

Configure external API integrations with security and monitoring.

call_external_api

Make secured API calls with monitoring and retries.

generate_unit_tests

Generate unit tests for Kotlin classes.

setup_ui_testing

Configure UI testing framework with Espresso or Compose tests.

gitStatus

Get comprehensive Git status including branches and changes.

gitSmartCommit

Create conventional commit messages based on changes.

gitCreateFeatureBranch

Create feature branches with naming validations.

gitMergeWithResolution

Attempt merges with conflict resolution advice.

apiCallSecure

Make authenticated API calls with monitoring and compliance.

apiMonitorMetrics

Get real-time API usage and performance metrics.

apiValidateCompliance

Validate API usage against GDPR/HIPAA rules.

projectSearch

Fast project-wide searches with context.

todoListFromCode

Extract and organize TODO/FIXME comments.

readmeGenerateOrUpdate

Generate or update README content with tool catalog.

changelogSummarize

Summarize changelog entries into release notes.

buildAndTest

Run build pipelines and collect test results.

dependencyAudit

Audit dependencies for vulnerabilities and licenses.

securityHardening

Manage security hardening features including RBAC and rate limiting.