Skip to content

Kotlin support#2

Open
Kevinrob wants to merge 3 commits into
ThinkyMiner:mainfrom
qoqa:feat/kotlin-support
Open

Kotlin support#2
Kevinrob wants to merge 3 commits into
ThinkyMiner:mainfrom
qoqa:feat/kotlin-support

Conversation

@Kevinrob
Copy link
Copy Markdown

@Kevinrob Kevinrob commented May 21, 2026

Summary

This PR adds support for the Kotlin programming language and Kotlin Script (.kts) to the codetree MCP server. It enables structured code understanding, call graph analysis, and complexity metrics for Kotlin projects, which is particularly useful for Android and Gradle-based environments.

Changes

  • Dependency: Added tree-sitter-kotlin to pyproject.toml.
  • Plugin Implementation: Created KotlinPlugin in src/codetree/languages/kotlin.py with support for:
    • Skeleton extraction (Classes, Objects, Interfaces, and Functions).
    • Symbol source retrieval.
    • Call graph analysis (detecting function/method invocations).
    • Cyclomatic complexity calculation.
    • Local variable and parameter extraction.
  • Registry: Registered .kt and .kts extensions to use the new KotlinPlugin.
  • Documentation: Updated README.md, AGENTS.md, and docs/LANDING_PAGE.md to include Kotlin in the list of supported languages.
  • Project Maintenance: Added uv.lock to .gitignore

Test plan

  • Ran pytest — all tests pass (including 33 new Kotlin-specific tests)
  • Added new tests for changed behavior (Basic and Comprehensive test suites for Kotlin)
  • Tested with a real MCP client (Successfully indexed a large Android project with ~19MB graph database)

Related issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant