home / skills / vaayne / agent-kit / mcp-jetbrains-ide

mcp-jetbrains-ide skill

/skills/mcp-jetbrains-ide

This skill helps you manage JetBrains IDE tasks from MCP by running configurations, editing files, and locating code across projects.

npx playbooks add skill vaayne/agent-kit --skill mcp-jetbrains-ide

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
3.8 KB
---
name: mcp-jetbrains-ide
description: Control JetBrains IDE (IntelliJ, WebStorm, PyCharm) via MCP. Use when manipulating IDE files, running configurations, searching code, or performing refactoring. Triggers on "open in IDE", "run configuration", "refactor code", "IDE search", "JetBrains".
---

# JetBrains IDE MCP

MCP service at `http://localhost:64342/sse` (sse) with 21 tools.

## Requirements

- `mh` CLI must be installed. If not available, install with:
  ```bash
  curl -fsSL https://raw.githubusercontent.com/vaayne/mcphub/main/scripts/install.sh | sh
  ```

## Usage

List tools: `mh list -u http://localhost:64342/sse -t sse`
Get tool details: `mh inspect -u http://localhost:64342/sse -t sse <tool-name>`
Invoke tool: `mh invoke -u http://localhost:64342/sse -t sse <tool-name> '{"param": "value"}'`

## Notes

- Run `inspect` before invoking unfamiliar tools to get full parameter schema
- Timeout: 30s default, use `--timeout <seconds>` to adjust
- The IDE must be running with the MCP plugin active for this to work

## Tools

| Tool                      | Description                                                                                  |
| ------------------------- | -------------------------------------------------------------------------------------------- |
| `buildProject`            | Triggers building of the project, returns build errors. Use after edits to validate changes. |
| `createNewFile`           | Creates a new file at the specified path, optionally with initial content.                   |
| `executeRunConfiguration` | Run a specific run configuration and wait for completion.                                    |
| `findFilesByGlob`         | Search for files matching a glob pattern (e.g. `**/*.txt`).                                  |
| `findFilesByNameKeyword`  | Search for files by name keyword (case-insensitive).                                         |
| `getAllOpenFilePaths`     | Get paths of all currently open files in the editor.                                         |
| `getFileProblems`         | Analyze a file for errors and warnings using IDE inspections.                                |
| `getFileTextByPath`       | Read file contents by project-relative path.                                                 |
| `getProjectDependencies`  | Get list of all project dependencies.                                                        |
| `getProjectModules`       | Get list of all modules with their types.                                                    |
| `getRepositories`         | Get list of VCS roots in the project.                                                        |
| `getRunConfigurations`    | Get available run configurations with details.                                               |
| `getSymbolInfo`           | Get Quick Documentation info for a symbol at position.                                       |
| `listDirectoryTree`       | Get tree representation of a directory structure.                                            |
| `openFileInEditor`        | Open a file in the IDE editor.                                                               |
| `permissionPrompt`        | Handle permission prompts.                                                                   |
| `reformatFile`            | Apply code formatting rules to a file.                                                       |
| `renameRefactoring`       | Rename a symbol with full project-wide refactoring.                                          |
| `replaceTextInFile`       | Replace text in a file with find/replace options.                                            |
| `searchInFilesByRegex`    | Search project files using regex pattern.                                                    |
| `searchInFilesByText`     | Search project files for text substring.                                                     |

Overview

This skill provides programmatic control of JetBrains IDEs (IntelliJ, WebStorm, PyCharm) via an MCP server. It exposes tools to open files, run configurations, search code, and perform refactorings so an AI agent can interact with a live IDE. Use it when you need precise IDE-driven actions that depend on project context and IDE inspections.

How this skill works

The skill communicates with a local MCP SSE endpoint (default http://localhost:64342/sse) and exposes about 21 tools. Each tool maps to an IDE action such as opening files, running builds, running a configuration, searching the project, or applying refactorings. Tools are inspected before use to learn parameter schemas; invocations use a CLI helper (mh) or direct HTTP SSE calls and expect the IDE to have the MCP plugin active.

When to use it

  • Open a specific file in the editor from a code assistant or workflow.
  • Run or re-run a run configuration and capture results programmatically.
  • Search the codebase by text, regex, filename, or glob to locate relevant symbols.
  • Apply project-wide rename refactoring or replace text safely using IDE context.
  • Format or analyze files with IDE inspections to catch errors before committing changes.

Best practices

  • Always run an inspect/list call to view a tool's parameter schema before invoking it.
  • Ensure the JetBrains IDE is running with the MCP plugin enabled and reachable at the configured SSE URL.
  • Use getFileProblems and IDE inspections after edits to validate changes before CI or commits.
  • Prefer renameRefactoring and replaceTextInFile tools over raw file edits for safe, cross-file refactors.
  • Set appropriate timeouts for long operations (builds, large searches) instead of relying on defaults.

Example use cases

  • Create a new source file with createNewFile and immediately open it with openFileInEditor for guided editing.
  • Find all uses of a symbol via searchInFilesByText or searchInFilesByRegex, then run renameRefactoring to update references.
  • Run executeRunConfiguration to run tests or an app and capture build/test errors via buildProject and getFileProblems.
  • Use findFilesByGlob to discover config files, then update content with replaceTextInFile and reformatFile.
  • Query getProjectDependencies or getProjectModules to generate reports or decide upgrade steps.

FAQ

Do I need any CLI tools installed?

Yes. The mh CLI is recommended to list, inspect, and invoke MCP tools. Install mh if not present.

What must be running for the skill to work?

The JetBrains IDE must be running and the MCP plugin must be active and reachable at the SSE endpoint.

How do I learn the parameters for a tool?

Use the inspect command (mh inspect or the equivalent SSE inspect) to retrieve the tool's parameter schema before invoking it.