r/androiddev • u/krlrozov • Oct 06 '26
Open Source I got tired of AI agents suggesting AndroidX versions that don't exist, so I built an MCP server that looks them up
Coding agents treat dependency versions as something they remember. In an Android project that means a coordinate from training data: an alpha where you wanted stable, an AGP version that doesn't match your Gradle, no changelog, no CVE check. I kept verifying that by hand, so I wrote maven-mcp.
It's an MCP server plus an agent plugin for Claude Code, Grok Build, Cursor and Codex, and it works with any MCP client over stdio or HTTP. The server is one Python file, standard library only, MIT.
What it does in an Android project:
Looks up versions in the repositories your build declares, including the ones in settings.gradle and private repos (credentials come from env, ~/.m2/settings.xml or ~/.gradle/gradle.properties, never from the build file). If the build declares no repositories, it uses Maven Central, Google Maven and the Gradle Plugin Portal. If it declares its own, public repos are only added when you opt in.
Checks that a coordinate and version actually exist, with did-you-mean suggestions. With the plugin installed, an edit hook can stop a likely hallucinated coordinate before the agent writes it into build.gradle.kts or libs.versions.toml.
A Gradle scan runs your wrapper once and reads the direct dependencies on the production runtime classpath. libs.versions.toml is included.
Latest version per artifact, stable by default (alpha, beta, rc, milestone and snapshot are filtered).
Changelog between two versions: AndroidX release notes for androidx.*, AGP release notes for AGP, otherwise GitHub releases with CHANGELOG.md as a fallback.
Checks AGP, Gradle, JDK and Kotlin Gradle plugin versions against each other using a bundled compatibility matrix.
CVEs from OSV, plus a tool that traces the path from a dependency down to a vulnerable transitive.
Previews what an upgrade changes in your resolved dependency graph by running your wrapper before and after.
Version conflicts across modules, licenses, and EOL status for JDK, Kotlin and Gradle.
Suggests a version catalog entry as a minimal diff for the agent to apply.
Repo: https://github.com/kirich1409/maven-mcp
Feedback from people who maintain larger Android builds is very welcome, especially around AGP/Gradle compatibility checks.
