PA

premex-ab/phone-mcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

11 stars 5 forks Качество 72 Тренд 38MIT

A powerful, modular Android application that implements a . This application enables AI assistants to safely and securely interact with Android device capabilities through a standardized protocol.

Обзор

A powerful, modular Android application that implements a . This application enables AI assistants to safely and securely interact with Android device capabilities through a standardized protocol. ✨ - 🔌 : Runs as an Android foreground service using Ktor - 🧩 : Pluggable tool modules for different device capabilities - 🔐 : Each tool requires explicit user permission with clear disclaimers - 🔑 : Secure connections with authentication tokens - 🎛️ : Enable/disable tools at runtime with user consent - 🤝 : Third-party apps can expose MCP tools via Content Providers - : Send SMS messages (requires permission) - : Send SMS via Intent (no permission required) - : Access camera and take photos - : Read contacts list - : Access device sensors (accelerometer, gyroscope, etc.

README

Показан фрагмент оригинального README. Открыть оригинал.

Android MCP Server

A powerful, modular Android application that implements a Server-Sent Events (SSE) Model Context Protocol (MCP) server. This application enables AI assistants to safely and securely interact with Android device capabilities through a standardized protocol.

Features

✨ Core Capabilities

  • 🔌 SSE-Based MCP Server: Runs as an Android foreground service using Ktor
  • 🧩 Modular Architecture: Pluggable tool modules for different device capabilities
  • 🔐 Privacy-Focused: Each tool requires explicit user permission with clear disclaimers
  • 🔑 Bearer Token Authentication: Secure connections with authentication tokens
  • 🎛️ Dynamic Tool Management: Enable/disable tools at runtime with user consent
  • 🤝 External Tool Support: Third-party apps can expose MCP tools via Content Providers

Built-in Tools

  • 📱 SMS: Send SMS messages (requires permission)
  • 📱 SMS Intent: Send SMS via Intent (no permission required)
  • 📷 Camera: Access camera and take photos
  • 👥 Contacts: Read contacts list
  • 📡 Sensor: Access device sensors (accelerometer, gyroscope, etc.)
  • 📁 Files: Browse and read files on the device (requires permission)
  • 🎯 Ads: Display ads (example tool)
  • 🔌 External Tools: Auto-discover and integrate tools from other apps

On-device AppFunctions (experimental)

On Android 16 and newer, Phone MCP also publishes its first-party capabilities as native Android AppFunctions. Authorized on-device agents can use these functions locally without starting the MCP server or connecting with its URL and bearer token.

  • Play build: contacts, camera, location, sensor snapshots, bounded file access, and SMS drafts
  • Full build: the Play functions plus direct SMS sending
  • User control: the existing tool switches enable or disable access through both MCP and AppFunctions
  • Permissions: Android’s Contacts, Camera, Location, Storage, Notifications, and SMS permissions still apply
  • Availability: AppFunctions are experimental, and Gemini integration is currently a limited private preview; installing Phone MCP does not guarantee assistant access yet

AppFunctions use Android’s caller authorization and do not use the MCP server’s token. Open On-device assistants on Phone MCP’s home screen for an in-app explanation, or see the AppFunctions guide for the security model, example prompts, flavor differences, and ADB testing instructions.

Quick Start

Installation

  1. Download from Google Play: Available on Google Play Store
  2. Or build from source:
    git clone https://github.com/yourusername/android-mcp-server
Открыть полный README на GitHub

Установка

npx mcp-remote http://<phone-ip>:3001/sse --header Authorization: Bearer <token> --allow-http
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "phone": { "command": "npx", "args": [ "mcp-remote", "http://<phone-ip>:3001/sse", "--header", "Authorization: Bearer <token>", "--allow-http" ] } } }