Skip to main content
Glama
Android Preference Editor MCP Server

Android Preference Editor MCP Server

Android 偏好设置编辑器 MCP 服务器

概述

Android-Preference-Editor MCP 服务器是一个自然语言接口,旨在帮助代理应用程序在应用开发过程中编辑 Android 用户偏好设置。该实现基于Android Preference Editor库。该服务器与MCP(模型上下文协议)客户端无缝集成,从而在 Android 应用开发过程中实现 AI 驱动的工作流程。使用此 MCP,您可以发出如下指令:

  • “切换isVisited用户偏好设置”

  • “列出已连接的设备”

  • “设备上安装了哪些应用程序?”

  • “向我显示应用程序中的所有用户偏好设置”

  • “添加lastTimeStamp用户偏好设置,其值为自纪元以来的当前毫秒数”

Related MCP server: @wilsonbeam/openclaw-adb-mcp

工具

姓名

描述

改变偏好

更改现有偏好的值

删除偏好设置

删除现有偏好设置

添加偏好

根据给定的名称、值和类型添加新的首选项。

设备

列出已连接的 Android 设备

列表应用

列出设备上安装的应用程序

列表文件

列出应用程序的首选项文件

读取首选项

读取文件中的所有用户偏好设置

演示

切换用户偏好设置

可用工具

切换用户偏好设置

可用工具

点击此处查看更多演示截图

要求

  • Android adb安装在主机系统上。

与 Claude Desktop 集成

您可以通过在claude_desktop_config.json配置文件中添加以下内容来配置 Claude Desktop 以使用此 MCP 服务器。

{
  "mcpServers": {
    "pref-editor": {
      "command": "npx",
      "args": ["@charlesmuchene/pref-editor-mcp-server"]
    }
  }
}

故障排除

您可以通过跟踪日志文件来解决问题:

tail -f ~/Library/Logs/Claude/mcp-server-pref-editor.log

与 VS Code 集成

要将服务器与 VS Code 一起使用,您需要:

  1. 启用代理模式工具。将以下内容添加到您的settings.json中:

{
  "chat.agent.enabled": true
}
  1. 将 MCP 服务器配置添加到您的mcp.json或settings.json :

// .vscode/mcp.json
{
  "servers": {
    "pref-editor": {
      "type": "stdio",
      "command": "npx",
      "args": ["@charlesmuchene/pref-editor-mcp-server"]
    }
  }
}
// settings.json
{
  "mcp": {
    "pref-editor": {
      "type": "stdio",
      "command": "npx",
      "args": ["@charlesmuchene/pref-editor-mcp-server"]
    }
  }
}

有关更多信息,请参阅VS Code 文档。

安装

# Clone the repository
git clone https://github.com/charlesmuchene/pref-editor-mcp-server.git
cd pref-editor-mcp-server

# Install dependencies and build
npm install

测试

您可以使用MCP Inspector对此 MCP 服务器进行可视化调试。

npx @modelcontextprotocol/inspector npm run dev

执照

查看许可证

接触

如有疑问或需要支持,请通过GitHub Issues联系。

Available Tools

7 tools
add_preferenceC

Adds a new preference given the name, value and type.

Inputs: name (required), value (required), type (required), deviceId (required), +2 more.

change_preferenceC

Changes the value of an existing preference

Inputs: name (required), value (required), deviceId (required), appId (required), +1 more.

delete_preferenceC

Delete an existing preference

Inputs: name (required), deviceId (required), appId (required), filename (required).

devicesB

Lists connected Android devices

Inputs: no named parameters.

list_appsC

Lists apps installed on device

Inputs: deviceId (required).

list_filesC

Lists preference files for an app

Inputs: deviceId (required), appId (required).

read_preferencesC

Reads all user preferences in a file

Inputs: deviceId (required), appId (required), filename (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 7 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no ambiguity. Preference management tools (add, change, delete, read) target specific operations, while device/app/file listing tools serve separate discovery functions. The descriptions make it easy to differentiate between actions on preferences versus actions on devices/apps/files.

    Naming Consistency5/5

    All tools follow a consistent verb_noun naming pattern throughout. The verbs (add, change, delete, list, read) are consistently applied to their respective nouns (preference, devices, apps, files, preferences). There are no deviations in style or convention across the tool set.

    Tool Count5/5

    With 7 tools, this server is well-scoped for editing Android preferences. It covers core operations (CRUD for preferences) plus necessary discovery tools (devices, apps, files) without being overly sparse or bloated. Each tool earns its place in the workflow.

    Completeness5/5

    The tool surface provides complete coverage for the Android preference editing domain. It offers full CRUD operations for preferences (add, change, delete, read) plus the necessary discovery chain (devices → apps → files → preferences). There are no obvious gaps that would prevent an agent from performing the intended workflows.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers