home / mcp / android studio ai chat mcp server

Android Studio AI Chat MCP Server

Provides an MCP-powered AI chat bridge connecting Android Studio to a conversational proxy for code questions, edits, and debugging.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "muxi1998-android-studio-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@jetbrains/mcp-proxy"
      ],
      "env": {
        "HOST": "localhost",
        "IDE_PORT": "<port of Android Studio's built-in webserver>",
        "LOG_ENABLED": "true"
      }
    }
  }
}

You can connect Android Studio to an AI chat interface through the MCP Server, enabling natural‑language conversations about your code, on‑the‑fly refactors, explanations of Android concepts, and debugging assistance. This server runs as a local or remote MCP endpoint and a compatible client can interact with it to drive code changes and insights directly from your IDE workflow.

How to use

Open Android Studio and your project, then start Cursor to connect to the same project. In Cursor, enable the JetBrains integration and ensure the MCP server is running. Use Cursor’s built‑in chat to ask questions about your code, request refactors, generate new components, or get explanations and debugging help. The server acts as the bridge between your IDE and the AI chat interface, translating natural language requests into actions within Android Studio.

How to install

Prerequisites you need installed on your computer are in place to run the MCP server and connect with Android Studio. You will prepare the MCP client and then configure the server entry point.

Step 1. Install the MCP Server plugin for JetBrains.

Open Android Studio
Go to Settings/Preferences → Plugins → Marketplace
Search for "MCP Server"
Click Install on the plugin titled "MCP Server" (plugin ID: 26071)
Restart Android Studio when prompted

Step 2. Configure the client in Cursor.

Open Cursor and access settings:
- For Mac: Cmd+, or Cursor → Preferences
- For Windows/Linux: Ctrl+, or File → Preferences
Navigate to the AI settings and enable "JetBrains Integration"

Step 3. Set up the MCP server configuration in Cursor.

{
  "mcpServers": {
    "jetbrains": {
      "command": "npx",
      "args": ["-y", "@jetbrains/mcp-proxy"]
    }
  }
}

Step 4. If you run multiple IDEs, connect to a specific one by providing the IDE port in the environment for Cursor.

"env": {
  "IDE_PORT": "<port of Android Studio's built-in webserver>"
}

Step 5. Save your settings and restart Cursor.

Configuration and environment

You can enable additional logging and specify the host for the IDE’s built‑in webserver to tailor the connection and debugging output.

"env": {
  "LOG_ENABLED": "true"
}
```
```
"env": {
  "HOST": "<host/address of IDE's built-in webserver>"
}

Troubleshooting

Common issues and solutions include: ensure Android Studio is running before Cursor connects, verify compatibility with your Android Studio version, if you have multiple JetBrains IDEs running, specify the IDE_PORT, and grant necessary permissions in Android Studio for the MCP operations.

Security and notes

Only expose the MCP server to trusted environments. When running with debugging enabled, monitor logs to detect unexpected commands and ensure that sensitive project data is not leaked to external services.

Advanced usage and examples

Use the built‑in chat to ask for concrete code changes, ask for explanations of Android concepts, request new components, or trigger debugging steps. The integration is designed to keep you in your IDE while delivering AI‑assisted code insights and modifications.

Available tools

JetBrains MCP Proxy

Provides the proxy service that connects Cursor with Android Studio through the MCP protocol, enabling AI chat interactions within the IDE.

Android Studio Connector

Enables conversational AI actions to be mapped to Android Studio operations such as code edits, component generation, and debugging steps.

AI Chat Actions

Supports asking questions about code, requesting modifications, and generating new code components through natural language.

Android Studio AI Chat MCP Server - muxi1998/android-studio-mcp-server