mcp-server-module

Qwara-chan/mcp-server-module

3.2

If you are the rightful owner of mcp-server-module and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

This project is an AI-controlled MCP server module for Android devices, compatible with Magisk and KernelSU.

Tools
5
Resources
0
Prompts
0

AI-Controlled MCP Server Module

AI生成

项目概述

本项目是一个兼容Magisk和KernelSU的Android模块,将您的设备转换为MCP服务器,使AI系统能够通过MCP协议控制设备。支持屏幕操作、应用管理、系统信息获取等功能。

功能特点

  • 双框架支持:同时兼容Magisk和KernelSU
  • 完整MCP协议:基于JSON-RPC 2.0实现
  • 丰富控制能力
    • 屏幕截图与交互
    • 应用启动与管理
    • 系统状态监控
    • 设备控制命令执行
  • 安全设计:最小权限原则,SELinux策略限制

安装方法

Magisk/KernelSU管理器安装

  1. 下载最新发布的mcp_server_module.zip
  2. 在Magisk/KernelSU管理器中选择"模块" -> "从本地安装"
  3. 选择下载的ZIP文件
  4. 重启设备完成安装

手动安装

adb push mcp_server_module.zip /sdcard/
adb shell su -c "unzip /sdcard/mcp_server_module.zip -d /data/adb/modules/mcp_server"
adb shell su -c "/data/adb/modules/mcp_server/install.sh"

使用指南

验证安装

# 检查服务状态
adb shell ps | grep mcp_server

# 查看日志
adb logcat | grep MCP

AI客户端配置

Claude Desktop

在设置中添加自定义MCP服务器:

{
  "mcpServers": {
    "android": {
      "command": "/data/adb/modules/mcp_server/system/bin/mcp_server",
      "args": ["--stdio"]
    }
  }
}
支持的工具调用
  • device.screenshot() - 获取屏幕截图
  • device.tap(x, y) - 点击屏幕坐标
  • device.launchApp(packageName) - 启动应用
  • device.getBatteryStatus() - 获取电池状态
  • device.uploadFile(localPath, remoteUrl) - 上传本地文件到指定URL

开发与构建

本地构建

git clone https://github.com/Qwara-chan/mcp-server-module.git
cd mcp-server-module
./gradlew assembleRelease
zip -r mcp_server_module.zip module.prop service.sh system mcp README.md

GitHub Actions自动构建

本项目使用GitHub Actions自动构建,每次push或PR会触发构建流程,生成可安装的模块ZIP文件。

兼容性

  • Android版本:Android 10+
  • 架构支持:arm64-v8a, armeabi-v7a
  • Root框架
    • Magisk v23.0+
    • KernelSU v0.4.0+

许可证

Apache License 2.0

声明

本项目由AI生成,代码和文档基于公开技术资料编写,仅供学习和研究使用。