The Android Preference Editor MCP Server enables natural language control of Android app preferences in real-time. This tool lets you edit, add, delete, and read preference values through simple conversational commands without manual file editing, making Android development workflows more efficient.
The server requires:
You can install and configure the server using either Docker or npx, depending on your environment.
Pull and run the Docker image:
docker run -i --rm charlesmuchene/pref-editor-mcp-server
Install and run using npx:
npx -y @charlesmuchene/pref-editor-mcp-server
To integrate with Android Studio (assuming you have an MCP-compatible client installed), update your MCP server configuration file.
For GitHub Copilot IntelliJ Plugin, edit ~/.config/github-copilot/intellij/mcp.json
:
Using Docker:
{
"servers": {
"pref-editor": {
"command": "docker",
"args": ["run", "-i", "--rm", "charlesmuchene/pref-editor-mcp-server"]
}
}
}
Using npx:
{
"servers": {
"pref-editor": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@charlesmuchene/pref-editor-mcp-server"]
}
}
}
Add this server to the Claude Desktop configuration file located at /Users/<username>/Library/Application Support/Claude/claude_desktop_config.json
:
Using Docker:
{
"mcpServers": {
"pref-editor": {
"command": "docker",
"args": ["run", "-i", "--rm", "charlesmuchene/pref-editor-mcp-server"]
}
}
}
Using npx:
{
"mcpServers": {
"pref-editor": {
"command": "npx",
"args": ["-y", "@charlesmuchene/pref-editor-mcp-server"]
}
}
}
For troubleshooting, you can view the logs:
tail -f ~/Library/Logs/Claude/mcp-server-pref-editor.log
Configure the server in VS Code using either a workspace-specific or global configuration:
In .vscode/mcp.json
:
{
"servers": {
"pref-editor": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@charlesmuchene/pref-editor-mcp-server"]
}
}
}
Or in ~/Library/Application Support/Code/User/settings.json
:
{
"mcp": {
"pref-editor": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@charlesmuchene/pref-editor-mcp-server"]
}
}
}
The server provides several tools for managing Android preferences:
Tool | Description |
---|---|
change_preference | Changes the value of an existing preference |
delete_preference | Delete an existing preference |
add_preference | Adds a new preference given the name, value, and type |
read_preferences | Reads all user preferences in a file |
devices | Lists connected Android devices |
list_apps | Lists apps installed on the device |
list_files | Lists preference files for an app |
Here are some examples of how to use the server with natural language commands:
For debugging and testing, you can use the MCP Inspector:
npx @modelcontextprotocol/inspector npm run start
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "pref-editor" '{"command":"npx","args":["-y","@charlesmuchene/pref-editor-mcp-server"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"pref-editor": {
"command": "npx",
"args": [
"-y",
"@charlesmuchene/pref-editor-mcp-server"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"pref-editor": {
"command": "npx",
"args": [
"-y",
"@charlesmuchene/pref-editor-mcp-server"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect