android-studio
MCP server from muxi1998/android-studio-mcp-server
claude mcp add --transport stdio muxi1998-android-studio-mcp-server npx -y @jetbrains/mcp-proxy \ --env IDE_PORT="<port of Android Studio's built-in webserver>" \ --env LOG_ENABLED="true"
How to use
This MCP server enables AI-assisted interaction with Android Studio projects via the Cursor client. By connecting Cursor to the Android Studio project, developers can ask questions about their code, request modifications or refactors, get explanations of Android-specific concepts, generate new components, and assist with debugging. The integration leverages the MCP Server plugin for JetBrains IDEs, and uses the JetBrains MCP proxy to relay natural language requests between Cursor and Android Studio. To use it, install the MCP Server plugin in Android Studio, configure Cursor with the provided mcp-config, and connect Cursor to the same project. Once connected, you can chat about your codebase, ask for code snippets, and have the assistant propose changes within your project context.
How to install
Prerequisites:
- Android Studio installed
- Cursor installed for client communication
Step 1: Install the MCP Server plugin in Android Studio
- Open Android Studio
- Go to Settings/Preferences > Plugins > Marketplace
- Search for "MCP Server" (plugin ID: 26071)
- Click Install and restart Android Studio when prompted
Step 2: Configure Cursor with the MCP server
- Open Cursor and go to settings (Mac: Cursor > Preferences, Windows/Linux: File > Preferences)
- Navigate to the AI or MCP settings and enable JetBrains Integration
- Add the MCP server configuration for the Android Studio IDE:
{
"mcpServers": {
"android-studio": {
"command": "npx",
"args": ["-y", "@jetbrains/mcp-proxy"]
}
}
}
- If you’re running multiple IDEs and want to connect to a specific one, add an environment variable:
"env": {
"IDE_PORT": "<port of Android Studio's built-in webserver>"
}
- Save settings and restart Cursor
Note: The key values above assume you’re using the JetBrains MCP proxy via npx. Adjust the IDE_PORT to the port Android Studio exposes for the built-in webserver if needed.
Additional notes
Tips and common considerations:
- Ensure Android Studio is running before attempting to connect from Cursor.
- Use the JetBrains MCP Server plugin version compatible with your Android Studio build.
- If you have multiple JetBrains IDEs open, set IDE_PORT to the specific IDE’s webserver port to avoid conflicts.
- You can enable debugging logs by adding LOG_ENABLED=true in env: "env": { "LOG_ENABLED": "true" }
- If you encounter connection issues, verify your network permissions and that the MCP proxy can reach Android Studio.
- For advanced control, you can override host or port via env vars such as HOST or IDE_PORT to connect to a non-default address.