mcpField
A
Android Studio AI Chat Integration

Android Studio AI Chat Integration

Local
github.com/muxi1998AI & Agents21Updated 84w ago

About Android Studio AI Chat Integration

Android Studio AI Chat Integration is a setup guide for connecting Android Studio to the AI chat in Cursor through the MCP Server plugin. It is aimed at developers who want to query and modify Android projects in natural language.

Key features

  1. 01Connects Android Studio via the MCP Server plugin
  2. 02Uses @jetbrains/mcp-proxy as the proxy
  3. 03Targets a specific IDE instance by port
  4. 04Enables debug logging through LOG_ENABLED

Use cases

  1. 01Asking questions about Android project code from Cursor chat
  2. 02Requesting code changes or refactoring for Android code
  3. 03Resolving connection issues when several JetBrains IDEs run

MCP support

The setup configures a jetbrains MCP server in Cursor, with mcp-proxy connecting to the MCP Server plugin running inside Android Studio.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"android-studio": {
"command": "npx",
"args": [
"-y",
"@jetbrains/mcp-proxy"
]
}
}
}
Run commandnpx -y @jetbrains/mcp-proxy

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@jetbrains/mcp-proxy

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

Android Studio AI Chat Integration

This repository provides instructions for setting up AI chat capabilities with Android Studio, allowing developers to interact with their code and projects using natural language.

Overview

By connecting Android Studio to an AI chat interface through the MCP Server plugin, developers can:

  • Ask questions about their Android code
  • Request code modifications and refactoring
  • Get explanations of Android-specific concepts
  • Generate new code components
  • Debug issues in Android applications

Prerequisites

  • Android Studio installed on your computer
  • Cursor IDE installed (for client communication)

Installation

Step 1: Install the MCP Server Plugin for JetBrains
  1. Open Android Studio
  2. Go to Settings/Preferences → Plugins → Marketplace
  3. Search for "MCP Server"
  4. Click Install on the plugin titled "MCP Server" (plugin ID: 26071)
  5. Restart Android Studio when prompted
Step 2: Configure the Client in Cursor
  1. Open Cursor and access settings:

    • For Mac: Press Cmd+, or go to Cursor → Preferences
    • For Windows/Linux: Press Ctrl+, or go to File → Preferences
  2. Navigate to the AI settings section and enable "JetBrains Integration"

  3. Configure your settings:

    {
      "mcpServers": {
        "jetbrains": {
          "command": "npx",
          "args": ["-y", "@jetbrains/mcp-proxy"]
        }
      }
    }
    
  4. If you're running multiple IDEs and want to connect to a specific one, add:

    "env": {
      "IDE_PORT": "<port of Android Studio's built-in webserver>"
    }
    
  5. Save your settings and restart Cursor

Usage

  1. Open Android Studio and load your project
  2. Open Cursor and connect to the same project
  3. In Cursor, use the built-in chat to interact with your Android Studio project

Troubleshooting

  • Connection Issues: Ensure Android Studio is running before attempting to connect from Cursor
  • Plugin Not Found: Verify you're using a compatible version of Android Studio
  • Multiple IDEs: If you have multiple JetBrains IDEs running, specify the IDE_PORT in your configuration
  • Permission Issues: Some operations may require explicit permissions in Android Studio

Advanced Configuration

To enable logging for debugging purposes:

"env": {
  "LOG_ENABLED": "true"
}

To connect to IDE on a different address/host:

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

Resources

License

This project is licensed under the terms specified in the repository.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.