<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/i-turned-my-app-into-an-mcp-server-with-appfunctions-obvdzedvl" -->

---
title: I Turned My App Into an MCP Server With AppFunctions
description: AppFunctions is a new Jetpack alpha library that lets Android apps expose typed Kotlin functions to on-device AI agents via an on-device MCP server. Using the...
canonical: https://daily.dev/posts/i-turned-my-app-into-an-mcp-server-with-appfunctions-obvdzedvl
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: I Turned My App Into an MCP Server With AppFunctions | daily.dev
og:description: AppFunctions is a new Jetpack alpha library that lets Android apps expose typed Kotlin functions to on-device AI agents via an on-device MCP server. Using the...
og:url: https://daily.dev/posts/i-turned-my-app-into-an-mcp-server-with-appfunctions-obvdzedvl
og:image: https://api.daily.dev/og/posts/OBVdzeDVL.png
og:image:alt: I Turned My App Into an MCP Server With AppFunctions
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# I Turned My App Into an MCP Server With AppFunctions

**[Medium](https://daily.dev/sources/medium_js)** · 10 min read · 2 upvotes · 0 comments

## Summary

AppFunctions is a new Jetpack alpha library that lets Android apps expose typed Kotlin functions to on-device AI agents via an on-device MCP server. Using the @AppFunction annotation and KSP compiler, functions are indexed by the OS and callable by agents like Gemini without screen scraping or accessibility hacks. Key implementation details include: AppFunctionContext as the mandatory first parameter, @AppFunctionSerializable for boundary types, using typed AppFunction exceptions for agent self-correction, Hilt integration via AppFunctionConfiguration, and verifying discoverability with adb. A critical insight is that KDoc comments become the agent's prompt for tool selection, so writing intent-based descriptions with user examples dramatically improves routing accuracy. Security guidance covers exposing verbs not raw data access, validating all arguments, and avoiding destructive operations.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/@himanshugaur684/i-turned-my-app-into-an-mcp-server-with-appfunctions-00125b172260>

## Similar posts on daily.dev

- [AppFunctions: Making Your Android App Discoverable by AI Agents](https://daily.dev/posts/appfunctions-making-your-android-app-discoverable-by-ai-agents-geqm1p9pu) · ProAndroidDev · 1 upvotes · 0 comments
- [Build intelligent Android apps: Integrate into Android's intelligence system using AppFunctions](https://daily.dev/posts/build-intelligent-android-apps-integrate-into-android-s-intelligence-system-using-appfunctions-zbvvmxmje) · Android Developers Blog · 1 upvotes · 0 comments

---

Tags: [#android](https://daily.dev/tags/android), [#ai-agents](https://daily.dev/tags/ai-agents), [#kotlin](https://daily.dev/tags/kotlin), [#mcp](https://daily.dev/tags/mcp)

[View this post on daily.dev](https://daily.dev/posts/i-turned-my-app-into-an-mcp-server-with-appfunctions-obvdzedvl)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"I Turned My App Into an MCP Server With AppFunctions","url":"https://daily.dev/posts/i-turned-my-app-into-an-mcp-server-with-appfunctions-obvdzedvl","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/i-turned-my-app-into-an-mcp-server-with-appfunctions-obvdzedvl"},"datePublished":"2026-07-23T17:14:13.860Z","dateModified":"2026-07-23T20:18:34.715Z","description":"AppFunctions is a new Jetpack alpha library that lets Android apps expose typed Kotlin functions to on-device AI agents via an on-device MCP server. Using the...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/05b74919c948bb729b8353bfbe11d580?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/05b74919c948bb729b8353bfbe11d580?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Medium","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Medium","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/medium","url":"https://daily.dev/sources/medium_js"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/i-turned-my-app-into-an-mcp-server-with-appfunctions-obvdzedvl","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"android,ai-agents,kotlin,mcp","timeRequired":"PT10M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Medium","item":"https://daily.dev/sources/medium_js"},{"@type":"ListItem","position":3,"name":"I Turned My App Into an MCP Server With AppFunctions"}]}
```

