MA

muxi1998/android-studio-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

21 stars 3 forks 质量 47 趋势 0

该仓库提供了如何设置Android Studio的AI聊天功能,使开发者能够使用自然语言与代码和项目互动。

概览

该仓库提供了如何设置Android Studio的AI聊天功能,使开发者能够使用自然语言与代码和项目互动。 通过通过MCP服务器插件将Android Studio连接到AI聊天界面,开发者可以:- 提出关于Android代码的问题 - 请求代码修改和重构 - 获取Android专属概念的解释 - 生成新的代码组件 - 调试Android应用中的问题 - 安装在您的电脑上的Android Studio- 安装了光标IDE(用于客户端通信) 1. 打开Android Studio 2。进入→ → 3.搜索“MCP Server” 4.点击名为“MCP Server”的插件(插件ID:26071) 5.提示时重启Android Studio。 1. 打开光标并进入设置:- Mac:按Cmd+,或选择→ - Windows/Linux:按Ctrl+,或选择→ 2. 进入AI设置部分并启用“JetBrains集成” 4.

概述(AI 翻译)

该仓库提供了如何设置Android Studio的AI聊天功能,使开发者能够使用自然语言与代码和项目互动。

概述

通过通过MCP服务器插件将Android Studio连接到AI聊天界面,开发者可以:

  • 询问他们的Android代码
  • 请求代码修改和重构
  • 获取Android专用概念的解释
  • 生成新的代码组件
  • Android 应用中的调试问题

先修条件

  • 安装在你电脑上的Android Studio
  • 已安装光标IDE(用于客户端通信)

安装

步骤1:安装JetBrains的MCP服务器插件

  1. 打开Android Studio
  2. 进入设置/偏好设置 → 插件 → 市场
  3. 搜索“MCP 服务器”
  4. 点击名为“MCP Server”(插件编号:26071)的插件 Install
  5. 在提示时重启Android Studio

步骤2:在光标中配置客户端

  1. 打开光标并访问设置:
  • Mac:按Cmd+,或前往光标→偏好
  • 对于 Windows/Linux:按 Ctrl+, 或前往 File → 偏好设置

本页由 AI 翻译,技术细节请以原文为准。

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": ""
    }
    
  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": ""
}

Resources

License

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

在 GitHub 查看完整 README

安装

npx -y @jetbrains/mcp-proxy
新手?先看 mcpskill.org 教程 →

配置

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