modelscope.cn

idea-mcp-development

用于 JetBrains IDE 开发任务,需要通过 IDEA/Android Studio MCP 工?

Installation

$ npx skills add https://modelscope.cn

Also in this package

Other skills from modelscope.cn · top by installs.

npx skills add https://modelscope.cn

Browse all from modelscope.cn

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Version1.0.0
More metadata
version
1.0.0

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 14,200 B

History

  1. First recorded snapshot · 0 installs

SKILL.md


name: idea-mcp-development

description: Use when working on IntelliJ IDEA, Android Studio, JetBrains IDE, Java, Kotlin, Android, Gradle, Maven, JVM projects, or configuring idea-mcp-server, Android-studio-mcp, SSE, HTTP, or MCP access for IDE build, run, test, inspection, and symbol workflows


IDEA MCP Development

Overview

Use local JetBrains IDE MCP tools for IDE-aware development work. If the tools are not available, guide the user to expose a real JetBrains MCP SSE or HTTP endpoint and configure the current AI tool without overwriting existing settings.

Core rule: do not invent an IDEA MCP endpoint, command, port, or config schema. Use visible MCP tools when available; otherwise ask for the exact endpoint or help the user enable it in the IDE.

When To Use

Use this skill for tasks involving:

  • IntelliJ IDEA, Android Studio, or another JetBrains IDE.
  • Java, Kotlin, Android, Gradle, Maven, or JVM projects where IDE project context matters.
  • Build, rebuild, run configuration, tests, inspections, symbol lookup, dependency/module lookup, open editors, or opening files in the IDE.
  • idea-mcp-server, Android-studio-mcp, JetBrains MCP Server, local IDE MCP, SSE endpoint, HTTP endpoint, or MCP configuration.

Do not force MCP setup for purely conceptual questions that do not need IDE access.

Decision Flow

  1. Check whether this session already exposes JetBrains MCP tools.
  2. If idea-mcp-server_* tools exist, prefer them for IDE-aware actions.
  3. If Android-studio-mcp_* tools exist, prefer them for Android Studio IDE-aware actions.
  4. If no JetBrains MCP tools exist and the task needs IDE access, enter setup mode.
  5. If the task does not need IDE access, continue normally.

Preferred MCP Operations

When matching tools are available, prefer them over shell for:

Need Preferred action
Build or rebuild Use MCP build project tool
Run app or tests List and execute IDE run configurations
File diagnostics Use MCP file problems or inspections
Project structure Query modules, dependencies, and repositories
Code understanding Query symbol info and open editors
IDE navigation Open relevant files in the IDE

Normal file search, file edits, and shell commands are still valid when they are the right tool. MCP is preferred for IDE-aware operations, not for every operation.

Setup Mode

If no JetBrains MCP tools are visible and the task needs IDE MCP access:

  1. Ask which AI tool should be configured if it is not clear.
  2. Ask the user for the local JetBrains MCP endpoint. Accept SSE or streamable HTTP.
  3. If the user does not have an endpoint, guide them to enable the JetBrains MCP Server in the IDE.
  4. Read existing config before editing.
  5. Preserve all existing MCP servers and unrelated fields.
  6. Add a clearly named server such as idea-mcp-server only after the exact endpoint or command is known.
  7. Tell the user to restart the AI tool because MCP config is usually loaded at startup.

Never fabricate endpoints such as http://localhost:63342. That is commonly an IDE web server port, not proof of an MCP endpoint. Use only an endpoint provided by the user, found in existing config, shown by the IDE, or documented by the installed JetBrains MCP integration.

Never assume npx @jetbrains/mcp-proxy or any other launch command unless the user's installed JetBrains MCP integration documents it or the user provides it.

Enabling JetBrains MCP Server

Guide the user through these steps when they do not yet have an endpoint:

  1. Open IntelliJ IDEA, Android Studio, or the relevant JetBrains IDE.
  2. Check settings or plugins for MCP Server support.
  3. Install or enable JetBrains MCP Server integration if needed.
  4. Start the local MCP server from the IDE.
  5. Copy the displayed SSE or HTTP endpoint, or the documented local MCP launch command.
  6. Return that endpoint or command for AI tool configuration.

If the IDE does not show an endpoint or command, do not guess. Ask the user to confirm their IDE version and MCP Server integration details.

Configuration Guidance

opencode

Default to global config at ~/.config/opencode/opencode.json unless the user asks for project-local config.

Before editing:

  • Read the existing file.
  • Preserve $schema, providers, agents, commands, permissions, plugins, and existing MCP servers.
  • Add only the JetBrains MCP server entry.

For remote SSE or HTTP endpoints, use opencode's remote MCP server shape from the installed schema. If unsure, read https://opencode.ai/config.json before editing.

After editing, tell the user to quit and restart opencode.

Claude Code

Inspect the installed Claude Code MCP configuration mechanism before editing. Prefer official CLI commands or documented config files for the installed version. Do not assume opencode's JSON shape applies to Claude Code.

Cursor

Inspect Cursor's user or workspace MCP configuration before editing. Preserve existing server definitions and add only the JetBrains MCP server entry. Do not assume the config file path or JSON shape before checking the installed Cursor MCP settings.

Cline/Roo Code

Inspect the extension MCP settings before editing. Preserve existing server definitions and add only the JetBrains MCP server entry. Do not assume the extension stores settings in the same location as Cursor.

codex

Inspect the active codex configuration location and MCP schema before editing. Preserve existing server definitions and add the JetBrains MCP server using the installed codex format.

Safety Rules

  • Do not overwrite config files wholesale.
  • Do not remove existing MCP servers.
  • Do not edit unrelated settings.
  • Do not create fake endpoints.
  • Do not assume one MCP config schema works for every AI tool.
  • Do not claim the MCP server works until the user restarts the AI tool and the tools are visible in a new session.
  • If a config schema is uncertain, inspect existing config, check official help/schema, or ask one focused question.

Red Flags

Stop and correct course if you think:

Rationalization Correct action
"I'll just use Gradle directly." Use IDE MCP first for IDE-aware build/test/run when available.
"localhost:63342 is probably the MCP endpoint." Ask for the exact SSE/HTTP endpoint.
"The JetBrains proxy command is probably npx." Verify the installed integration or ask the user.
"All MCP clients use the same config shape." Inspect the target tool's actual config/schema.
"I'll replace the MCP config with my snippet." Preserve existing servers and add one entry.
"The config is written, so it works." Require restart and visible tools before claiming success.

Verification Checklist

Before saying the setup or task is complete:

  • Checked for visible idea-mcp-server or Android-studio-mcp tools.
  • Used MCP tools for IDE-aware operations when available.
  • Asked for the exact SSE/HTTP endpoint or documented command when tools were missing.
  • Read existing config before recommending or applying edits.
  • Preserved unrelated config.
  • Told the user to restart the affected AI tool after config changes.
  • Did not claim success until the MCP tools were visible in a restarted session.

IDEA MCP 开发

概览

在涉及 JetBrains IDE 的开发工作中,优先使用本地 IDE MCP 工具。如果工具不可用,引导用户暴露真实的 JetBrains MCP SSE 或 HTTP endpoint,并在不覆盖现有设置的前提下配置当前 AI 工具。

核心规则:不要编造 IDEA MCP endpoint、命令、端口或配置 schema。有可见 MCP 工具时直接使用;没有时询问精确 endpoint,或帮助用户在 IDE 中启用。

何时使用

以下任务应使用本 skill:

  • IntelliJ IDEA、Android Studio 或其他 JetBrains IDE。
  • Java、Kotlin、Android、Gradle、Maven 或 JVM 项目,且 IDE 项目上下文有帮助。
  • build、rebuild、run configuration、测试、inspection、符号查询、依赖/模块查询、打开编辑器、在 IDE 中打开文件。
  • idea-mcp-serverAndroid-studio-mcp、JetBrains MCP Server、本地 IDE MCP、SSE endpoint、HTTP endpoint 或 MCP 配置。

如果只是纯概念问题,且不需要访问 IDE,不要强制进入 MCP 配置流程。

决策流程

  1. 检查当前会话是否已经暴露 JetBrains MCP 工具。
  2. 如果存在 idea-mcp-server_* 工具,IDE 感知操作优先使用它们。
  3. 如果存在 Android-studio-mcp_* 工具,Android Studio 相关 IDE 感知操作优先使用它们。
  4. 如果没有 JetBrains MCP 工具,且任务需要 IDE 访问,进入配置流程。
  5. 如果任务不需要 IDE 访问,正常继续。

优先使用 MCP 的操作

当匹配工具可用时,以下操作优先使用 MCP,而不是 shell:

需求 优先动作
构建或重新构建 使用 MCP build project 工具
运行应用或测试 列出并执行 IDE run configuration
文件诊断 使用 MCP file problems 或 inspection 工具
项目结构 查询 module、dependency、repository
代码理解 查询 symbol info 和 open editors
IDE 导航 在 IDE 中打开相关文件

普通文件搜索、文件编辑和 shell 命令在合适时仍然可以使用。MCP 只对 IDE 感知操作优先,不替代所有操作。

配置流程

如果没有可见 JetBrains MCP 工具,且任务需要 IDE MCP 访问:

  1. 如果不明确,询问要配置哪个 AI 工具。
  2. 向用户索取本地 JetBrains MCP endpoint,接受 SSE 或 streamable HTTP。
  3. 如果用户没有 endpoint,引导用户在 IDE 中启用 JetBrains MCP Server。
  4. 编辑前先读取现有配置。
  5. 保留所有已有 MCP server 和无关字段。
  6. 只有在已知精确 endpoint 或命令后,才添加清晰命名的 server,例如 idea-mcp-server
  7. 告诉用户重启 AI 工具,因为 MCP 配置通常只在启动时加载。

不要编造 http://localhost:63342 之类的 endpoint。它通常只是 IDE web server 端口,并不能证明是 MCP endpoint。只使用用户提供、现有配置中发现、IDE 显示,或已安装 JetBrains MCP 集成文档确认的 endpoint。

不要假设 npx @jetbrains/mcp-proxy 或任何其他启动命令,除非用户安装的 JetBrains MCP 集成文档说明了它,或用户明确提供了它。

启用 JetBrains MCP Server

当用户还没有 endpoint 时,按以下步骤引导:

  1. 打开 IntelliJ IDEA、Android Studio 或对应 JetBrains IDE。
  2. 在设置或插件中检查 MCP Server 支持。
  3. 如需要,安装或启用 JetBrains MCP Server 集成。
  4. 从 IDE 启动本地 MCP server。
  5. 复制显示的 SSE 或 HTTP endpoint,或文档说明的本地 MCP 启动命令。
  6. 将 endpoint 或命令返回给 agent 用于 AI 工具配置。

如果 IDE 没有显示 endpoint 或命令,不要猜测。询问用户确认 IDE 版本和 MCP Server 集成细节。

配置指导

opencode

默认使用全局配置 ~/.config/opencode/opencode.json,除非用户要求项目级配置。

编辑前:

  • 读取现有文件。
  • 保留 $schema、provider、agent、command、permission、plugin 和已有 MCP server。
  • 只添加 JetBrains MCP server 条目。

对于 remote SSE 或 HTTP endpoint,使用已安装 opencode schema 中的 remote MCP server 格式。如果不确定,先读取 https://opencode.ai/config.json

编辑后,告诉用户退出并重启 opencode。

Claude Code

编辑前检查已安装 Claude Code 的 MCP 配置机制。优先使用当前版本的官方 CLI 命令或文档配置文件。不要假设 opencode 的 JSON 格式适用于 Claude Code。

Cursor

编辑前检查 Cursor 的 user 或 workspace MCP 配置。保留已有 server 定义,只添加 JetBrains MCP server 条目。不要在检查前假设配置文件路径或 JSON 格式。

Cline/Roo Code

编辑前检查扩展的 MCP 设置。保留已有 server 定义,只添加 JetBrains MCP server 条目。不要假设扩展与 Cursor 使用相同位置。

codex

编辑前检查当前生效的 codex 配置位置和 MCP schema。保留已有 server 定义,并使用已安装 codex 的格式添加 JetBrains MCP server。

安全规则

  • 不要整体覆盖配置文件。
  • 不要删除已有 MCP server。
  • 不要编辑无关设置。
  • 不要创建假的 endpoint。
  • 不要假设所有 AI 工具使用同一个 MCP 配置 schema。
  • 在用户重启 AI 工具且新会话中可见 MCP tools 前,不要声称 MCP server 已可用。
  • 如果配置 schema 不确定,检查现有配置、官方帮助/schema,或只问一个聚焦问题。

Red Flags

如果出现以下想法,停下来修正方向:

想法 正确动作
“我直接用 Gradle 就行。” 有 IDE MCP 时,IDE 感知 build/test/run 优先用 MCP。
“localhost:63342 大概就是 MCP endpoint。” 询问精确 SSE/HTTP endpoint。
“JetBrains proxy 命令大概是 npx。” 验证已安装集成或询问用户。
“所有 MCP client 都用同一个配置格式。” 检查目标工具的实际配置/schema。
“我用自己的片段替换 MCP 配置。” 保留已有 server,只添加一个条目。
“配置写好了,所以能用了。” 要求重启,并在工具可见后才能声明成功。

验证清单

在声明 setup 或任务完成前:

  • 已检查是否存在可见的 idea-mcp-serverAndroid-studio-mcp 工具。
  • 有 MCP 工具时,IDE 感知操作已优先使用 MCP。
  • 工具缺失时,已询问精确 SSE/HTTP endpoint 或文档确认的命令。
  • 推荐或应用配置前已读取现有配置。
  • 已保留无关配置。
  • 配置变更后已提醒用户重启对应 AI 工具。
  • 在重启后的新会话可见 MCP tools 前,没有声称配置成功。