CM

cazriel/mcp-server

Developer tools

This page was translated automatically. Technical details may differ from the original. View the original

20 stars 6 forks Quality 62 Trend 14

Android MCP server exposing device tools over HTTP.

Overview

A local Model Context Protocol (MCP) server running on Android phones. Exposes phone capabilities to MCP clients such as Claude Desktop and Cursor via the Streamable HTTP protocol: file operations, system management, device information, application management, script execution, communication interaction, network requests, utilities, and more. This project implements MCP, running on controlled Android devices; MCP clients run on a PC or another device and communicate via local area or intranet penetration. - : Implements Streamable HTTP transmission (POST/mcp, JSON-RPC 2.0), and is compatible with SSE (GET /sse). - : Automatically generates 16-bit tokens, supports switching; Any LAN client can connect when not enabled. - : Restricts file operation roots via system folder selector (SAF) to prevent unauthorized access. - : Allows remote MCP service (Streamable HTTP) tools to be pulled locally and merged into a single endpoint. - : Based on the bore.pub protocol, exposes local ports to the public network with one click. - : Optional floating window quick switch server; Supports auto-boot on boot. - : Integrates Shizuku, executes commands like am, pm with shell privileges on authorized devices. - :Based on QuickJS (ES2020), provides mcp_javascript tools for script execution automation. - :FOREGROUND_SERVICE_TYPE_DATA_SYNC and optional WakeLock ensure long-term background operation. The application uses the Android front-end service (McpServerService) to hold McpHttpServer and listens for HTTP requests on the local port. After receiving a JSON-RPC message compliant with the MCP specification, McpHandler distributes it to ToolKit, then routes it to the handler functions of each ToolDefinition, and returns the result in JSON or SSE format. JSON-RPC methods implemented by the server include initialize, notifications/initialized, ping, tools/list, tools/call, resources/list, prompts/list, and more. When the server starts, ToolKit.init registers the following built-in tools.

Overview (machine translated)

A local Model Context Protocol (MCP) server running on Android phones. Exposes phone capabilities to MCP clients such as Claude Desktop and Cursor via the Streamable HTTP protocol: file operations, system management, device information, application management, script execution, communication interaction, network requests, utilities, and more.

[! IMPORTANT] This project implements the MCP server, running on controlled Android devices; The MCP client runs on a PC or another device and communicates with it via local area network or intranet penetration.


Table of Contents

  • Core features
  • Working principle
  • Tool list
  • Client access
  • Permission Description
  • Acknowledgments
  • License

Core Features

  • Standard MCP protocol: Supports Streamable HTTP transport (POST /mcp, JSON-RPC 2.0), and is compatible with SSE (GET /sse).
  • Optional Bearer Authentication: Automatically generates 16-bit tokens, supports switching; When not enabled, any LAN client can connect.
  • Workspace Sandbox: Uses the System Folder Selector (SAF) to define the root directory of file operations to prevent unauthorized access.
  • Bridge Remote MCP: Allows remote MCP service (Streamable HTTP) tools to be pulled locally and merged into a single endpoint.
  • Intranet Penetration: Based on the bore.pub protocol, expose local ports to the public network with one click.
  • Floating Window Control: Optional floating window quick on/off server; Supports automatic startup on startup.
  • Privileged commands: Integrates Shizuku to execute commands such as am, pm with shell privileges on authorized devices.
  • Built-in JavaScript engine: Based on QuickJS (ES2020), provides mcp_javascript tool for script execution automation.
  • Front-end Service Retention: FOREGROUND_SERVICE_TYPE_DATA_SYNC and optional WakeLock to ensure long-term background operation.

Working Principle

The application holds McpHttpServer via the Android front-end service (McpServerService), listening for HTTP requests on the local port. After receiving a JSON-RPC message compliant with the MCP specification, McpHandler distributes it to ToolKit, then routes it to each ToolDefinition handler, and returns the result in JSON or SSE format.

HTTP Endpoints

Method Path Description

This page was translated automatically. Technical details may differ from the original.

Install

This server does not publish a one-line install command.

Open the repository installation guide New to MCP? Start with the mcpskill.org guide →

Configuration

{ "mcpServers": { "android-device": { "type": "streamableHttp", "url": "http://192.168.1.10:1145/mcp" } } }