A JetBrains IDE plugin that exposes an MCP (Model Context Protocol) server, enabling AI coding assistants like Claude, Codex, Cursor, and Windsurf to leverage the IDE's powerful indexing and refactoring capabilities. Fully tested: IntelliJ IDEA, PyCharm, WebStorm, GoLand, RustRover, Android Studio, PhpStorm May work (untested): RubyMine, CLion, DataGrip IDE Index MCP Server provides AI coding assi
Add this skill
npx mdskills install hechtcarmel/jetbrains-index-mcp-pluginExposes JetBrains IDE code intelligence to AI assistants via MCP with comprehensive multi-language support
1# IDE Index MCP Server234[](https://plugins.jetbrains.com/plugin/29174-ide-index-mcp-server)5[](https://plugins.jetbrains.com/plugin/29174-ide-index-mcp-server)67A JetBrains IDE plugin that exposes an **MCP (Model Context Protocol) server**, enabling AI coding assistants like Claude, Codex, Cursor, and Windsurf to leverage the IDE's powerful indexing and refactoring capabilities.89**Fully tested**: IntelliJ IDEA, PyCharm, WebStorm, GoLand, RustRover, Android Studio, PhpStorm10**May work** (untested): RubyMine, CLion, DataGrip1112[](https://www.buymeacoffee.com/hechtcarmel)1314<!-- Plugin description -->15**IDE Index MCP Server** provides AI coding assistants with access to the IDE's powerful code intelligence features through the Model Context Protocol (MCP).1617### Features1819**Multi-Language Support**20Advanced tools work across multiple languages based on available plugins:21- **Java & Kotlin** - IntelliJ IDEA, Android Studio22- **Python** - PyCharm (all editions), IntelliJ with Python plugin23- **JavaScript & TypeScript** - WebStorm, IntelliJ Ultimate, PhpStorm24- **Go** - GoLand, IntelliJ IDEA Ultimate with Go plugin25- **Rust** - RustRover, IntelliJ IDEA Ultimate with Rust plugin, CLion2627**Universal Tools (All JetBrains IDEs)**28- **Find References** - Locate all usages of any symbol across the project29- **Go to Definition** - Navigate to symbol declarations30- **Code Diagnostics** - Access errors, warnings, and quick fixes31- **Index Status** - Check if code intelligence is ready3233**Extended Tools (Language-Aware)**34These tools activate based on installed language plugins:35- **Type Hierarchy** - Explore class inheritance chains36- **Call Hierarchy** - Trace method/function call relationships37- **Find Implementations** - Discover interface/abstract implementations38- **Symbol Search** - Find by name with fuzzy/camelCase matching39- **Find Super Methods** - Navigate method override hierarchies4041**Refactoring Tools**42- **Rename Refactoring** - Safe renaming with automatic related element renaming (getters/setters, overriding methods) - works across ALL languages, fully headless43- **Safe Delete** - Remove code with usage checking (Java/Kotlin only)4445### Why Use This Plugin?4647Unlike simple text-based code analysis, this plugin gives AI assistants access to:48- **True semantic understanding** through the IDE's AST and index49- **Cross-project reference resolution** that works across files and modules50- **Multi-language support** - automatically detects and uses language-specific handlers51- **Safe refactoring operations** with automatic reference updates and undo support5253Perfect for AI-assisted development workflows where accuracy and safety matter.54<!-- Plugin description end -->5556## Table of Contents5758- [Installation](#installation)59- [Quick Start](#quick-start)60- [Client Configuration](#client-configuration)61- [Available Tools](#available-tools)62- [Multi-Project Support](#multi-project-support)63- [Tool Window](#tool-window)64- [Error Codes](#error-codes)65- [Requirements](#requirements)66- [Contributing](#contributing)6768## Installation6970### Using the IDE built-in plugin system7172<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>Marketplace</kbd> > <kbd>Search for "IDE Index MCP Server"</kbd> > <kbd>Install</kbd>7374### Using JetBrains Marketplace7576Go to [JetBrains Marketplace](https://plugins.jetbrains.com/plugin/29174-ide-index-mcp-server) and install it by clicking the <kbd>Install to ...</kbd> button.7778### Manual Installation7980Download the [latest release](https://github.com/hechtcarmel/jetbrains-index-mcp-plugin/releases/latest) and install it manually:81<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>⚙️</kbd> > <kbd>Install plugin from disk...</kbd>8283## Quick Start84851. **Install the plugin** and restart your JetBrains IDE862. **Open a project** - the MCP server starts automatically with IDE-specific defaults:87 - IntelliJ IDEA: `intellij-index` on port **29170**88 - PyCharm: `pycharm-index` on port **29172**89 - WebStorm: `webstorm-index` on port **29173**90 - Other IDEs: See [IDE-Specific Defaults](#ide-specific-defaults)913. **Configure your AI assistant** using the "Install on Coding Agents" button (easiest) or manually924. **Use the tool window** (bottom panel: "Index MCP Server") to copy configuration or monitor commands935. **Change port** (optional): Click "Change port, disable tools" in the toolbar or go to <kbd>Settings</kbd> > <kbd>Tools</kbd> > <kbd>Index MCP Server</kbd>9495### Using the "Install on Coding Agents" Button9697The easiest way to configure your AI assistant:981. Open the "Index MCP Server" tool window (bottom panel)992. Click the prominent **"Install on Coding Agents"** button on the right side of the toolbar1003. A popup appears with two sections:101 - **Install Now** - For Claude Code CLI and Codex CLI: Runs the installation command automatically102 - **Copy Configuration** - For other clients: Copies the JSON config to your clipboard1034. For "Copy Configuration" clients, paste the config into the appropriate config file104105## Client Configuration106107### Claude Code (CLI)108109Use the "Install on Coding Agents" button in the tool window, or run this command (adjust name and port for your IDE):110111```bash112# IntelliJ IDEA113claude mcp add --transport http intellij-index http://127.0.0.1:29170/index-mcp/sse --scope user114115# PyCharm116claude mcp add --transport http pycharm-index http://127.0.0.1:29172/index-mcp/sse --scope user117118# WebStorm119claude mcp add --transport http webstorm-index http://127.0.0.1:29173/index-mcp/sse --scope user120```121122Options:123- `--scope user` - Adds globally for all projects124- `--scope project` - Adds to current project only125126To remove: `claude mcp remove <server-name>` (e.g., `claude mcp remove intellij-index`)127128### Codex CLI129130Use the "Install on Coding Agents" button in the tool window, or run this command (adjust name and port for your IDE):131132```bash133# IntelliJ IDEA134codex mcp add --transport sse intellij-index http://127.0.0.1:29170/index-mcp/sse135136# PyCharm137codex mcp add --transport sse pycharm-index http://127.0.0.1:29172/index-mcp/sse138139# WebStorm140codex mcp add --transport sse webstorm-index http://127.0.0.1:29173/index-mcp/sse141```142143To remove: `codex mcp remove <server-name>` (e.g., `codex mcp remove intellij-index`)144145### Cursor146147Add to `.cursor/mcp.json` in your project root or `~/.cursor/mcp.json` globally (adjust name and port for your IDE):148149```json150{151 "mcpServers": {152 "intellij-index": {153 "url": "http://127.0.0.1:29170/index-mcp/sse"154 }155 }156}157```158159### Windsurf160161Add to `~/.codeium/windsurf/mcp_config.json` (adjust name and port for your IDE):162163```json164{165 "mcpServers": {166 "intellij-index": {167 "serverUrl": "http://127.0.0.1:29170/index-mcp/sse"168 }169 }170}171```172173### VS Code (Generic MCP)174175```json176{177 "mcp.servers": {178 "intellij-index": {179 "transport": "sse",180 "url": "http://127.0.0.1:29170/index-mcp/sse"181 }182 }183}184```185186> **Note**: Replace the server name and port with your IDE's defaults. See [IDE-Specific Defaults](#ide-specific-defaults) below.187188### IDE-Specific Defaults189190Each JetBrains IDE has a unique default port and server name to allow running multiple IDEs simultaneously without conflicts:191192| IDE | Server Name | Default Port |193|-----|-------------|--------------|194| IntelliJ IDEA | `intellij-index` | 29170 |195| Android Studio | `android-studio-index` | 29171 |196| PyCharm | `pycharm-index` | 29172 |197| WebStorm | `webstorm-index` | 29173 |198| GoLand | `goland-index` | 29174 |199| PhpStorm | `phpstorm-index` | 29175 |200| RubyMine | `rubymine-index` | 29176 |201| CLion | `clion-index` | 29177 |202| RustRover | `rustrover-index` | 29178 |203| DataGrip | `datagrip-index` | 29179 |204| Aqua | `aqua-index` | 29180 |205| DataSpell | `dataspell-index` | 29181 |206| Rider | `rider-index` | 29182 |207208> **Tip**: Use the "Install on Coding Agents" button in the tool window - it automatically uses the correct server name and port for your IDE.209210## Available Tools211212The plugin provides MCP tools organized by availability:213214### Universal Tools215216These tools work in all supported JetBrains IDEs.217218| Tool | Description |219|------|-------------|220| `ide_find_references` | Find all references to a symbol across the entire project |221| `ide_find_definition` | Find the definition/declaration location of a symbol |222| `ide_diagnostics` | Analyze a file for problems (errors, warnings) and available intentions |223| `ide_index_status` | Check if the IDE is in dumb mode or smart mode |224225### Extended Tools (Language-Aware)226227These tools activate based on available language plugins:228229| Tool | Description | Languages |230|------|-------------|-----------|231| `ide_type_hierarchy` | Get the complete type hierarchy (supertypes and subtypes) | Java, Kotlin, Python, JS/TS, Go, Rust |232| `ide_call_hierarchy` | Analyze method call relationships (callers or callees) | Java, Kotlin, Python, JS/TS, Go, Rust |233| `ide_find_implementations` | Find all implementations of an interface or abstract method | Java, Kotlin, Python, JS/TS, Go, Rust |234| `ide_find_symbol` | Search for symbols (classes, methods, fields) by name with fuzzy/camelCase matching | Java, Kotlin, Python, JS/TS, Go, Rust |235| `ide_find_super_methods` | Find the full inheritance hierarchy of methods that a method overrides/implements | Java, Kotlin, Python, JS/TS, Go, Rust |236237### Refactoring Tools238239| Tool | Description | Languages |240|------|-------------|-----------|241| `ide_refactor_rename` | Rename a symbol and update all references | All languages |242| `ide_refactor_safe_delete` | Safely delete an element, checking for usages first | Java/Kotlin only |243244> **Note**: Refactoring tools modify source files. All changes support undo via <kbd>Ctrl/Cmd+Z</kbd>.245246### Tool Availability by IDE247248**Fully Tested:**249250| IDE | Universal | Navigation | Refactoring |251|-----|-----------|------------|-------------|252| IntelliJ IDEA | ✓ 4 tools | ✓ 5 tools | ✓ 2 tools (rename + safe delete) |253| Android Studio | ✓ 4 tools | ✓ 5 tools | ✓ 2 tools (rename + safe delete) |254| PyCharm | ✓ 4 tools | ✓ 5 tools | ✓ 1 tool (rename) |255| WebStorm | ✓ 4 tools | ✓ 5 tools | ✓ 1 tool (rename) |256| GoLand | ✓ 4 tools | ✓ 5 tools | ✓ 1 tool (rename) |257| RustRover | ✓ 4 tools | ✓ 5 tools | ✓ 1 tool (rename) |258| PhpStorm | ✓ 4 tools | - | ✓ 1 tool (rename) |259260**May Work (Untested):**261262| IDE | Universal | Navigation | Refactoring |263|-----|-----------|------------|-------------|264| RubyMine | ✓ 4 tools | - | ✓ 1 tool (rename) |265| CLion | ✓ 4 tools | - | ✓ 1 tool (rename) |266| DataGrip | ✓ 4 tools | - | ✓ 1 tool (rename) |267268> **Note**: Navigation tools (type hierarchy, call hierarchy, find implementations, symbol search, find super methods) are available when language plugins are present. The rename tool works across all languages.269270For detailed tool documentation with parameters and examples, see [USAGE.md](USAGE.md).271272## Multi-Project Support273274When multiple projects are open in a single IDE window, you must specify which project to use with the `project_path` parameter:275276```json277{278 "name": "ide_find_references",279 "arguments": {280 "project_path": "/Users/dev/myproject",281 "file": "src/Main.kt",282 "line": 10,283 "column": 5284 }285}286```287288If `project_path` is omitted:289- **Single project open**: That project is used automatically290- **Multiple projects open**: An error is returned with the list of available projects291292### Workspace Projects293294The plugin supports **workspace projects** where a single IDE window contains multiple sub-projects as modules with separate content roots. The `project_path` parameter accepts:295296- The **workspace root** path297- A **sub-project path** (module content root)298- A **subdirectory** of any open project299300When an error occurs, the response includes all available sub-projects so AI agents can discover the correct paths to use.301302## Tool Window303304The plugin adds an "Index MCP Server" tool window (bottom panel) that shows:305306- **Server Status**: Running indicator with server URL and port307- **Project Name**: Currently active project308- **Command History**: Log of all MCP tool calls with:309 - Timestamp310 - Tool name311 - Status (Success/Error/Pending)312 - Parameters and results (expandable)313 - Execution duration314315### Tool Window Actions316317| Action | Description |318|--------|-------------|319| Refresh | Refresh server status and command history |320| Copy URL | Copy the MCP server URL to clipboard |321| Clear History | Clear the command history |322| Export History | Export history to JSON or CSV file |323| **Install on Coding Agents** | Install MCP server on AI assistants (prominent button on right) |324325## Error Codes326327### JSON-RPC Standard Errors328329| Code | Name | Description |330|------|------|-------------|331| -32700 | Parse Error | Failed to parse JSON-RPC request |332| -32600 | Invalid Request | Invalid JSON-RPC request format |333| -32601 | Method Not Found | Unknown method name |334| -32602 | Invalid Params | Invalid or missing parameters |335| -32603 | Internal Error | Unexpected internal error |336337### Custom MCP Errors338339| Code | Name | Description |340|------|------|-------------|341| -32001 | Index Not Ready | IDE is in dumb mode (indexing in progress) |342| -32002 | File Not Found | Specified file does not exist |343| -32003 | Symbol Not Found | No symbol found at the specified position |344| -32004 | Refactoring Conflict | Refactoring cannot be completed (e.g., name conflict) |345346## Settings347348Configure the plugin at <kbd>Settings</kbd> > <kbd>Tools</kbd> > <kbd>Index MCP Server</kbd>:349350| Setting | Default | Description |351|---------|---------|-------------|352| Server Port | IDE-specific | MCP server port (range: 1024-65535, auto-restart on change). See [IDE-Specific Defaults](#ide-specific-defaults) |353| Max History Size | 100 | Maximum number of commands to keep in history |354| Sync External Changes | false | Sync external file changes before operations |355356## Requirements357358- **JetBrains IDE** 2025.1 or later (any IDE based on IntelliJ Platform)359- **JVM** 21 or later360- **MCP Protocol** 2024-11-05361362### Supported IDEs363364**Fully Tested:**365- IntelliJ IDEA (Community/Ultimate)366- Android Studio367- PyCharm (Community/Professional)368- WebStorm369- GoLand370- RustRover371- PhpStorm372373**May Work (Untested):**374- RubyMine375- CLion376- DataGrip377378> The plugin uses standard IntelliJ Platform APIs and should work on any IntelliJ-based IDE, but has only been tested on the IDEs listed above.379380## Architecture381382The plugin runs a **custom embedded Ktor CIO HTTP server** with **dual MCP transports**:383384### SSE Transport (MCP Inspector, spec-compliant clients)385386```387AI Assistant ──────► GET /index-mcp/sse (establish SSE stream)388 ◄── event: endpoint (receive POST URL with sessionId)389 ──────► POST /index-mcp?sessionId=x (JSON-RPC requests)390 ◄── HTTP 202 Accepted391 ◄── event: message (JSON-RPC response via SSE)392```393394### Streamable HTTP Transport (Claude Code, simple clients)395396```397AI Assistant ──────► POST /index-mcp (JSON-RPC requests)398 ◄── JSON-RPC response (immediate HTTP response)399```400401This dual approach:402- **MCP Inspector compatible** - Full SSE transport per MCP spec (2024-11-05)403- **Claude Code compatible** - Streamable HTTP for simple request/response404- **Configurable port** - Default 29277, changeable in settings405- Works with any MCP-compatible client406- Single server instance across all open projects407408## Contributing409410Contributions are welcome! Please:4114121. Fork the repository4132. Create a feature branch4143. Make your changes4154. Run tests: `./gradlew test`4165. Submit a pull request417418### Development Setup419420```bash421# Build the plugin422./gradlew build423424# Run IDE with plugin installed425./gradlew runIde426427# Run tests428./gradlew test429430# Run plugin verification431./gradlew runPluginVerifier432```433434## License435436This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.437438---439440Plugin based on the [IntelliJ Platform Plugin Template](https://github.com/JetBrains/intellij-platform-plugin-template).441
Full transparency — inspect the skill content before installing.