AppFunctions Is Android's On-Device MCP, Letting Gemini Call Your App's Code Directly
AppFunctions turns every Android app into a local tool server for on-device AI. Apps that skip it will be invisible to Gemini in voice scenarios, while those that integrate gain a zero-tap user path that reuses existing code rather than demanding a new backend.
AppFunctions is a Jetpack library, KSP compiler, and OS-level registry that standardizes how Android apps expose their capabilities to AI agents like Gemini. It mirrors the Model Context Protocol (MCP) but runs locally on the device, reusing the app's existing state, database, and business logic instead of requiring a separate backend. A developer annotates functions with @AppFunction, writes KDoc that doubles as the AI's prompt, and registers a service; Gemini can then invoke those functions directly in response to voice commands.
The protocol sidesteps the latency, privacy, and integration overhead of cloud-based tool-calling. Because it hooks into the app's own process, an agent calling addExpense() hits the same Room database and repository layer the UI uses. The trade-off is that KDoc quality directly determines call accuracy, and all functions default to the UI thread, so IO work must be explicitly dispatched.
Google positions this as the fourth major distribution paradigm shift on Android, following push notifications, deep links, and widgets. Apps that don't expose AppFunctions become invisible to Gemini in voice-driven workflows, making integration a competitive requirement rather than an experiment.
AppFunctions inverts the cloud MCP model: instead of rebuilding backend logic on a server, the agent calls into the app's existing Room database, DI graph, and repository layer directly.
KDoc becomes a runtime AI prompt, which forces a documentation discipline that most Android teams have never practiced—comments now have a direct production impact on call accuracy.
The UI-thread default is a sharp edge that will catch early adopters; it reflects the fact that AppFunctionService is just an Android Service, not a coroutine-aware context.
Google is drawing a hard line between single-turn tool calls (AppFunctions) and multi-step agentic workflows (A2UI/ADK), which suggests a two-tier architecture for AI-driven apps.
The competitive dynamic mirrors past platform shifts: apps that ignored push notifications or deep links lost distribution; apps that ignore AppFunctions risk becoming invisible to the primary voice interface.