MCP server for Kotlin and Android development with tools for refactoring, code quality analysis, Android architecture setup, security, compliance, and build/test automation.
This Kotlin MCP server has significant quality gaps. While all 15 tools are registered with names and descriptions, the descriptions are often generic or incomplete, parameter schemas lack proper type definitions and descriptions, and there are critical security and composition issues. The server implements a wide range of Kotlin development and Android-specific tools, but execution quality is inconsistent. Many tools combine multiple concerns (e.g., androidSetupArchitecture handles both MVVM/Clean AND DI framework selection), violating single-responsibility design. Parameter documentation is sparse, many parameters like 'context' are typed as 'object' with no sub-schema. Security tools (securityEncryptData, securityDecryptData, privacyRequestErasure) raise red flags: they accept 'dataRef' strings and 'context' objects without explaining what these mean or how they are validated. Error handling is absent from all tool definitions. Output schemas are not documented anywhere in the provided source. The Dockerfile and Makefile show good DevOps hygiene, but the MCP tool definitions themselves are underdeveloped.
Tools (15)
analyzeCodeQualityread onlysource verified58/100
Analyze code quality with security, performance, complexity, or comprehensive rules
Multiple tools combine unrelated concerns: androidSetupArchitecture selects both the architecture pattern (MVVM/Clean) AND the DI framework (Hilt/Koin) in a single call. This violates single-responsibility design and prevents independent composition. Should split into setupArchitecture + configureDependencyInjection.
Critical parameter descriptions are missing or vague. 'range' in refactorFunction is defined as type 'object' with no sub-schema explaining start/end line/column format. 'stateModel' in androidGenerateComposeUI is type 'object' with no structure documented. 'entities' in androidSetupDataLayer is type 'array of object' with no field definitions. LLMs cannot infer correct structure from opaque 'object' types.
Split androidSetupArchitecture into two tools: setupMVVMArchitecture/setupCleanArchitecture (or a single tool accepting architecture param) and a separate configureDependencyInjection tool. Each tool should have one responsibility.
Document all 'object' type parameters with explicit sub-schemas. For 'range' in refactorFunction, define: {startLine: integer, startColumn: integer, endLine: integer, endColumn: integer}. For 'stateModel' in androidGenerateComposeUI, provide an example structure or schema reference.
Add output schemas to every tool. Document what fields are returned, their types, and which IDs can be used to chain into subsequent tool calls. Example for refactorFunction: {success: boolean, filePath: string, newContent: string, changes: array}.
Rewrite security tool descriptions to clarify key management. Replace 'Encrypt sensitive data using AES-256-GCM' with 'Encrypt sensitive data using AES-256-GCM. Encryption keys are managed server-side via [vault/environment/HSM]. The dataRef parameter should be a file path or variable name; the tool will fetch and encrypt it without exposing the key to this call.'
Add dry-run and preview semantics to destructive tools. Modify privacyRequestErasure to include a 'dryRun: boolean' parameter (default false) that returns what WOULD be deleted without executing. Document rollback options if erasure fails partway through.
Rename androidGenerateComposeUI, androidSetupArchitecture, androidSetupDataLayer, androidSetupNetwork to drop the 'android' prefix. Instead, include 'Android' or 'Jetpack Compose' in the description. This reduces name length and lets LLMs group tools by domain via descriptions rather than name parsing.
Score history
Overall score trend
↑ 49 points across a rubric change (v1 → v2)
49/100
Scored
Grade
Overall
Spec posture
Rubric
2026-09-22
F
49
2026-07-28+
v2
2026-03-09
F
0
-
v1
formatCodewritesource verified62/100
Format Kotlin code using ktlint or spotless with configurable style rules
generateTestswritesource verified63/100
Generate comprehensive unit tests with chosen framework and coverage goals
Handle GDPR data erasure requests with comprehensive scope coverage
refactorFunctionwritesource verified63/100
Refactor Kotlin functions with AST-aware transformations including rename, extract, inline, and parameter introduction.
securityDecryptDataread onlysource verified47/100
Decrypt data with audit logging
securityEncryptDatawritesource verified47/100
Encrypt sensitive data using AES-256-GCM with proper key derivation
Security tools expose cryptographic operations without clear input validation or key management documentation. securityEncryptData accepts 'dataRef' (a string) and 'context' (an object) without explaining: What format is dataRef? Is it a file path, variable name, or database reference? How is the encryption key obtained and stored? This is dangerous, encryption keys must never be passed as parameters, yet the schema does not explain the pattern.
Destructive operations (privacyRequestErasure, applyPatch with allowCreate=true) lack confirmation/dry-run semantics. An agent could permanently erase user data or apply large patches without preview or rollback. No error recovery guidance is documented.
No output schemas documented for any tool. The rubric baseline shows 100% of A+ tools have documented return types. Agents cannot plan downstream calls or extract chaining IDs (e.g., if refactorFunction returns a file path, but the next tool needs both file and line number, the agent has no way to know what fields exist in the response).
Naming inconsistency: Tool names mix verb_noun style (refactorFunction, generateTests, securityEncryptData) with namespace prefixes (androidGenerateComposeUI, androidSetupArchitecture). The 'android' prefix is redundant, LLMs do not need the domain baked into the name if the description explains Android context. This wastes characters and makes discovery harder when many tools exist.
Parameter 'dataRef' in security tools (securityEncryptData, securityDecryptData) uses a generic name that does not indicate whether it is a file path, variable reference, or database ID. No suffix like 'dataRef_path' or 'dataRef_id' clarifies the type. Additionally, no description explains the valid format or how the reference is resolved.
No error handling or recovery guidance documented. Tools accept diverse inputs (file paths, project roots, code ranges, architecture patterns) but provide no validation constraints or recovery suggestions. E.g., refactorFunction does not document what happens if the file does not exist, the function name is not found, or the range is invalid. Pattern-based error guidance is absent.
Tool descriptions are generic. Examples: 'Apply IDE code actions like quick fixes and suggestions' (applyCodeAction) does not explain WHICH code actions are available or WHEN to use them. 'Optimize and organize Kotlin imports across files' (optimizeImports) lacks guidance on when to call it vs. formatCode. Descriptions should include 'When should the LLM call this instead of a similar tool?'
Privacy tools (privacyRequestErasure, privacyExportData) have no documented permission checks or audit logging. The rubric requires that gate destructive/sensitive tools behind permission checks and provide audit trails. These tools touch user data but provide no description of who can invoke them, what permissions are required, or how compliance is recorded.
privacyRequestErasureprivacyExportData
Add permission declarations to every tool. Document required scopes (e.g., 'write:android-project', 'read:security-config', 'admin:privacy'). This enables least-privilege agent configs and audit trails.
Add error handling examples to descriptions. For refactorFunction: 'If the file is not found, returns {success: false, error: 'File not found at <path>', suggestion: 'Check that the path is correct and the file exists in the project.'}' This guides LLMs on recovery.
Improve parameter descriptions to answer 'What format is this? What are valid values? What happens if I omit it?' For 'codeActionId' in applyCodeAction, add: 'ID of the code action (e.g., 'kt001-add-braces', 'kt002-remove-unused-import'). Call searchCodeActions() first to discover available IDs for a file.'
Document the relationship between preview parameters across tools. If multiple tools support preview (refactorFunction, applyCodeAction, optimizeImports, formatCode), clarify: 'When preview=true, the tool returns the transformed code WITHOUT applying changes to disk. Use this to validate refactorings before committing.'
For androidSetupNetwork, expand the 'endpoints' parameter schema. Currently it is 'array of object' with no required fields defined. Specify: endpoints: [{path: string, method: string (GET|POST|PUT|DELETE|PATCH), description: string, params: object}].
Add pagination guidance to tools that return lists (analyzeCodeQuality returns 'findings'). Document: 'If analysis returns >maxFindings results, the tool returns the top N by severity. Call with higher maxFindings or filter by ruleset to see additional results.'
Clarify the distinction between formatCode (ktlint/spotless style) and optimizeImports (import organization). Both modify code, add guidance like: 'Use optimizeImports to fix import statements; use formatCode to apply style rules (indentation, spacing, line breaks). Typically call optimizeImports first.'
For privacyRequestErasure and privacyExportData, document the audit trail. Example: 'This tool logs all erasure requests (subjectId, timestamp, scopes, result) to the audit log for compliance. Erasures are irreversible, no undo is available after 30 days.'
Remove hardcoded defaults that could cause silent data loss. The 'preview' parameter defaults to false across many tools, consider defaulting to true and requiring explicit preview=false to execute changes. This aligns with the 'fail safe' pattern.
Add constraints to numeric and enum parameters. For analyzeCodeQuality's 'maxFindings', add minValue=1, maxValue=1000 and document: 'Requesting >1000 findings may timeout or exhaust memory. Default is 50.'
For tools generating code (generateTests, androidGenerateComposeUI, androidSetupArchitecture), document code style assumptions. Example: 'Generated code follows Kotlin style guide conventions. If your project uses custom linting rules (detekt, ktlint), apply formatCode after generation to align.'
Add failure modes and recovery to descriptions. For applyPatch: 'If the patch cannot be applied cleanly (conflicts or context mismatch), returns {success: false, conflicts: [...]}. Resolve conflicts manually or provide a cleaner patch.'
Standardize parameter naming across similar tools. Tools with a 'targets' array (optimizeImports, formatCode, analyzeCodeQuality) should clarify: 'targets: array of file paths or directory paths. Directories are recursively scanned. If empty, scans the entire projectRoot.'
Document the relationship between mode (file/module/project) in optimizeImports. Add: 'file = optimize imports in specified files; module = optimize imports in a module and its dependencies; project = project-wide import optimization. Module and project modes may take longer.'
For securityEncryptData and securityDecryptData, explicitly forbid passing encryption keys as parameters. Add: 'Do NOT pass encryption keys as the context parameter. Keys are loaded server-side from [vault/environment]. The context parameter is for metadata (user_id, timestamp, encryption_id) only.'
Consolidate the 'preview' pattern. Define a shared pattern: 'preview: boolean (default false). When true, returns the transformed result WITHOUT applying changes. Use to validate before committing.'
For androidSetupDataLayer, clarify the difference between 'entities' array and the 'db' parameter. Add: 'db selects the database framework (currently Room only). entities array defines the data models; the tool generates entity classes, DAOs, and database setup code.'
Tie tool descriptions to user intents. Replace 'Generate comprehensive unit tests' (generateTests) with 'Generate unit tests for a Kotlin function or class. Use this after refactoring or implementing a new feature to ensure test coverage meets your goal (default 80%).'
For tools that interact with files (refactorFunction, applyPatch, formatCode, optimizeImports), document path resolution. Add: 'All file paths are relative to projectRoot (the root of the Kotlin/Android project). Absolute paths are also accepted.'
Define fallback behavior for tools that call external services (formatCode calls ktlint/spotless, analyzeCodeQuality calls detekt). Add: 'If the tool invocation fails (e.g., ktlint not installed), returns {success: false, error: 'Tool not found', suggestion: 'Install ktlint: https://ktlint.github.io/'}'