A JetBrains IDE plugin that exposes an MCP server, enabling AI coding assistants to leverage the IDE's indexing and refactoring capabilities (rename, safe delete, find references, call hierarchy, type hierarchy, diagnostics and more).
Add to Claude Desktop config.json
{
"mcpServers": {
"hechtcarmel-jetbrains-index-mcp-plugin": {
"command": "node",
"args": [
"~/.mcp/jetbrains-index-mcp-plugin/index.js"
]
}
}
} Get the source and run locally
git clone https://github.com/hechtcarmel/jetbrains-index-mcp-plugin.git ~/.mcp/jetbrains-index-mcp-plugin
cd ~/.mcp/jetbrains-index-mcp-plugin 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 assistants with access to the IDE’s powerful code intelligence features through the Model Context Protocol (MCP).
Multi-Language Support Advanced tools work across multiple languages based on available plugins:
Universal Tools (All Supported JetBrains IDEs)
Extended Tools (Language-Aware) These tools activate based on installed language plugins:
Refactoring Tools
Project Lifecycle Management
When working across many projects simultaneously, idle ones consume memory unnecessarily and leave editors open for no reason. Lifecycle management automatically sleeps and wakes projects based on window focus and MCP activity — no configuration required.
ide_project_status - Combined snapshot of every open and managed projectide_set_project_mode / ide_get_project_modes - Explicit mode controlide_release_project - Unenroll a project from lifecycle managementide_lifecycle_log - Timestamped event log with trigger reasons, for diagnosing unexpected behaviour. The ring buffer is always active; file output enables via Help → Diagnostic Tools → Debug Log SettingsUnlike simple text-based code analysis, this plugin gives AI assistants access to:
Perfect for AI-assisted development workflows where accuracy and safety matter.
Settings/Preferences > Plugins > Marketplace > Search for “IDE Index MCP Server” > Install
Go to JetBrains Marketplace and install it by clicking the Install to … button.
Download the latest release and install it manually: Settings/Preferences > Plugins > ⚙️ > Install plugin from disk…
intellij-index on port 29170pycharm-index on port 29172webstorm-index on port 29173The easiest way to configure your AI assistant:
Disclaimer: This repository is not maintained by me. Please use its own issue tracker for integration-specific issues and support.
Use the “Install on Coding Agents” button in the tool window, or run this command (adjust name and port for your IDE):
# IntelliJ IDEA
claude mcp add --transport http --scope user intellij-index http://127.0.0.1:29170/index-mcp/streamable-http
# PyCharm
claude mcp add --transport http --scope user pycharm-index http://127.0.0.1:29172/index-mcp/streamable-http
# WebStorm
claude mcp add --transport http --scope user webstorm-index http://127.0.0.1:29173/index-mcp/streamable-http
Options:
--scope user - Adds globally for all projects--scope project - Adds to current project onlyTo remove: claude mcp remove <server-name> (e.g., claude mcp remove intellij-index)
Use the “Install on Coding Agents” button in the tool window, or run this command (adjust name and port for your IDE):
# IntelliJ IDEA
codex mcp add intellij-index --url http://127.0.0.1:29170/index-mcp/streamable-http
# PyCharm
codex mcp add pycharm-index --url http://127.0.0.1:29172/index-mcp/streamable-http
# WebStorm
codex mcp add webstorm-index --url http://127.0.0.1:29173/index-mcp/streamable-http
To remove: codex mcp remove <server-name> (e.g., codex mcp remove intellij-index)
Add to .cursor/mcp.json in your project root or ~/.cursor/mcp.json globally (adjust name and port for your IDE):
{
"mcpServers": {
"intellij-index": {
"url": "http://127.0.0.1:29170/index-mcp/streamable-http"
}
}
}
Add to ~/.codeium/windsurf/mcp_config.json (adjust name and port for your IDE):
{
"mcpServers": {
"intellij-index": {
"serverUrl": "http://127.0.0.1:29170/index-mcp/streamable-http"
}
}
}
{
"mcp.servers": {
"intellij-index": {
"url": "http://127.0.0.1:29170/index-mcp/streamable-http"
}
}
}
Note: Replace the server name and port with your IDE’s defaults. See IDE-Specific Defaults below.
Each JetBrains IDE has a unique default port and server name to allow running multiple IDEs simultaneously without conflicts:
| IDE | Server Name | Default Port |
|---|---|---|
| IntelliJ IDEA | intellij-index | 29170 |
| Android Studio | android-studio-index | 29171 |
| PyCharm | pycharm-index | 29172 |
| WebStorm | webstorm-index | 29173 |
| GoLand | goland-index | 29174 |
| PhpStorm | phpstorm-index | 29175 |
| RubyMine | rubymine-index | 29176 |
| CLion | clion-index | 29177 |
| RustRover | rustrover-index | 29178 |
| DataGrip | datagrip-index | 29179 |
Tip: Use the “Install on Coding Agents” button in the tool window - it automatically uses the correct server name and port for your IDE.
The plugin provides 38 MCP tools organized by availability. Tools marked (disabled by default) can be enabled in Settings > Tools > Index MCP Server.
These tools work in all supported JetBrains IDEs.
| Tool | Description |
|---|---|
ide_find_references | Find all references to a symbol across the entire project |
ide_find_definition | Find the definition/declaration location of a symbol |
ide_find_class | Search for classes/interfaces by name with camelCase/substring/wildcard matching |
ide_find_file | Search for files by name using IDE’s file index |
ide_find_symbol | Search for symbols (classes, methods, fields, functions) by name with IntelliJ Go to Symbol matching (disabled by default) |
ide_search_text | Text search using IDE’s pre-built word index with context filtering |
ide_diagnostics | Analyze file problems with fresh editor diagnostics for open files or public batch diagnostics for closed files, plus optional build/test results; intentions are best-effort |
ide_index_status | Check if the IDE is in dumb mode or smart mode |
ide_sync_files | Force sync IDE’s virtual file system and PSI cache with external file changes |
ide_build_project | Build project using IDE’s build system (JPS, Gradle, Maven) with structured errors (disabled by default) |
ide_read_file | Read file content by path or qualified name, including library/jar sources (disabled by default) |
ide_get_active_file | Get the currently active file(s) in the editor with cursor position (disabled by default) |
ide_open_file | Open a file in the editor with optional line/column navigation (disabled by default) |
ide_set_power_save_mode | Enable or disable IDE Power Save Mode — suspends background inspections while keeping the index and all code intelligence operational (disabled by default) |
ide_close_project | Close an open project window and free its memory — refuses to close the last open project (disabled by default) |
ide_open_project | Open a project by absolute path and wait until indexing completes (configurable timeout); returns immediately if already open (disabled by default) |
ide_install_plugin | Install a plugin zip into the IDE, replacing any existing version — auto-detects build/distributions/*.zip when no path is given (disabled by default) |
ide_restart | Restart the IDE — terminates the MCP connection; call after ide_install_plugin (disabled by default) |
ide_refactor_rename | Rename a symbol and update all references across the project (all languages) |
ide_move_file | Move a file to a new directory, applying language-aware reference/package updates when the IDE provides a semantic move backend |
ide_reformat_code | Reformat code using project code style with import optimization (disabled by default) |
These tools activate based on available language plugins:
| Tool | Description | Languages |
|---|---|---|
ide_type_hierarchy | Get the complete type hierarchy (supertypes and subtypes) | Java, Kotlin, Python, JS/TS, Go, PHP, Rust |
ide_call_hierarchy | Analyze method call relationships (callers or callees) | Java, Kotlin, Python, JS/TS, Go, PHP, Rust |
ide_find_implementations | Find all implementations of an interface or abstract method | Java, Kotlin, Python, JS/TS, PHP, Rust |
ide_find_super_methods | Find the full inheritance hierarchy of methods that a method overrides/implements | Java, Kotlin, Python, JS/TS, PHP |
ide_file_structure | Get hierarchical file structure (similar to IDE’s Structure view) (disabled by default) | Java, Kotlin, Python, JS/TS, PHP, Markdown |
PHP file structure support requires the PHP plugin and is available in PhpStorm or IntelliJ IDEA Ultimate with the PHP plugin enabled.
| Tool | Description |
|---|---|
ide_convert_java_to_kotlin | Convert Java files to Kotlin using IntelliJ’s built-in converter (disabled by default, requires Java + Kotlin plugins) |
ide_refactor_safe_delete | Safely delete an element, checking for usages first (Java/Kotlin only) |
Note: Refactoring tools modify source files. All changes support undo via Ctrl/Cmd+Z.
ide_project_status is enabled by default. All other lifecycle tools are disabled by default — enable them in Settings → Tools → Index MCP Server.
| Tool | Description | Default |
|---|---|---|
ide_project_status | Combined snapshot: every open project and every managed project with open/managed/mode per row | Enabled |
ide_set_project_mode | Set a project’s lifecycle mode: active, background, dormant, or closed | Disabled |
ide_get_project_modes | List all managed projects and their current modes, including closed ones | Disabled |
ide_set_all_project_modes | Set all managed projects to the same mode at once (active/background/dormant) | Disabled |
ide_enroll_all_projects | Enroll every currently open project in lifecycle management | Disabled |
ide_release_project | Unenroll a project from lifecycle management | Disabled |
ide_release_all_projects | Release every managed project (including closed ones) from lifecycle management | Disabled |
ide_lifecycle_log | Query recent lifecycle events from a ring buffer; each event has a trigger field explaining the cause | Disabled |
Lifecycle modes — transitions are automatic, driven by window focus and MCP activity:
| Mode | Power Save | Editors | PSI Cache | Auto-transition |
|---|---|---|---|---|
active | off | open | loaded | focus lost for N min → background |
background | on | open | loaded | N min idle → dormant |
dormant | on | closed | freed | N min idle → closed |
closed | — | — | freed | next MCP call → background (auto-reopens) |
Timing thresholds are configurable in Settings. Projects enroll automatically on first MCP use and auto-reopen when an MCP tool targets a closed project — existing tools require no changes.
MCP availability guarantee: the lifecycle manager never closes the last open managed project — it stays in dormant (memory mostly freed, MCP still reachable). If all projects are somehow closed (e.g., the user manually closes the last window), any MCP tool call without a project_path automatically reopens a managed-closed project to restore access.
Fully Tested:
| IDE | Universal | Navigation | Refactoring |
|---|---|---|---|
| IntelliJ IDEA | ✓ 14 tools | ✓ 6 tools | ✓ rename + reformat + safe delete + Java→Kotlin |
| Android Studio | ✓ 14 tools | ✓ 6 tools | ✓ rename + reformat + safe delete + Java→Kotlin |
| PyCharm | ✓ 14 tools | ✓ 6 tools | ✓ rename + reformat |
| WebStorm | ✓ 14 tools | ✓ 6 tools | ✓ rename + reformat |
| GoLand | ✓ 14 tools | ✓ 4 tools | ✓ rename + reformat |
| RustRover | ✓ 14 tools | ✓ 5 tools | ✓ rename + reformat |
| PhpStorm | ✓ 14 tools | ✓ 6 tools | ✓ rename + reformat |
May Work (Untested):
| IDE | Universal | Navigation | Refactoring |
|---|---|---|---|
| RubyMine | ✓ 14 tools | ✓ 2 Markdown tools | ✓ rename + reformat |
| CLion | ✓ 14 tools | ✓ 2 Markdown tools | ✓ rename + reformat |
| DataGrip | ✓ 14 tools | ✓ 2 Markdown tools | ✓ rename + reformat |
Note: Navigation tools activate when language plugins are present. Markdown adds heading search and file-structure support when the bundled Markdown plugin is enabled. Go and Rust do not expose
ide_find_super_methodsdue to language semantics, and Go does not exposeide_find_implementations. The rename and reformat tools work across all languages.ide_convert_java_to_kotlinis available only in IntelliJ IDEA and Android Studio, requires both Java and Kotlin plugins, and is disabled by default.
For detailed tool documentation with parameters and examples, see USAGE.md.
When multiple projects are open in a single IDE window, you must specify which project to use with the project_path parameter:
{
"name": "ide_find_references",
"arguments": {
"project_path": "/Users/dev/myproject",
"file": "src/Main.kt",
"line": 10,
"column": 5
}
}
If project_path is omitted:
The plugin supports workspace projects where a single IDE window contains multiple sub-projects as modules with separate content roots. The project_path parameter accepts:
When an error occurs, the response returns available_projects. By default this includes workspace sub-projects so AI agents can discover valid module content roots. If you want smaller error payloads, switch Project list in error responses to Compact in plugin settings to return only top-level project roots.
When you use the plugin across multiple projects simultaneously — common when an AI agent is working across a monorepo — open projects compete for memory even when they’re not being actively used. Lifecycle management handles this automatically.
Projects enroll on their first MCP tool call and are notified via balloon. From that point, transitions happen based on focus and MCP activity:
background)dormant)closed)No changes are needed in existing MCP tools — ProjectResolver handles the reopen transparently. The auto-reopen typically takes 5–15 seconds on first open; subsequent opens are faster.
The lifecycle manager never closes the last open managed project: it stays dormant (memory mostly freed, MCP still reachable). If all projects are closed by other means, any tool call automatically reopens one managed project to restore MCP access.
Use ide_project_status to see the current state of all projects at a glance, and ide_lifecycle_log to see what happened and why — useful when a project closed unexpectedly. Each log event has a trigger field: timer:inactivity, timer:close, focus_gained, mcp_call, auto_open, user, etc.
Timing thresholds are configurable in Settings → Index MCP Server → Project Lifecycle Management.
The plugin adds an “Index MCP Server” tool window (bottom panel) that shows:
| Action | Description |
|---|---|
| Refresh | Refresh server status and command history |
| Copy URL | Copy the MCP server URL to clipboard |
| Clear History | Clear the command history |
| Export History | Export history to JSON or CSV file |
| Install on Coding Agents | Install MCP server on AI assistants (prominent button on right) |
| Code | Name | Description |
|---|---|---|
| -32700 | Parse Error | Failed to parse JSON-RPC request |
| -32600 | Invalid Request | Invalid JSON-RPC request format |
| -32601 | Method Not Found | Unknown method name |
| -32602 | Invalid Params | Invalid or missing parameters |
| -32603 | Internal Error | Unexpected internal error |
| Code | Name | Description |
|---|---|---|
| -32001 | Index Not Ready | IDE is in dumb mode (indexing in progress) |
| -32002 | File Not Found | Specified file does not exist |
| -32003 | Symbol Not Found | No symbol found at the specified position |
| -32004 | Refactoring Conflict | Refactoring cannot be completed (e.g., name conflict) |
Configure the plugin at Settings > Tools > Index MCP Server:
| Setting | Default | Description |
|---|---|---|
| Server Port | IDE-specific | MCP server port (range: 1024-65535, auto-restart on change). See IDE-Specific Defaults |
| Server Host | 127.0.0.1 | Listening host. Change to 0.0.0.0 for remote/WSL access |
| Max History Size | 100 | Maximum number of commands to keep in history |
| Project List in Error Responses | Expanded | Controls available_projects detail for invalid/missing project_path errors. Expanded includes workspace sub-projects; Compact returns only top-level project roots |
| Sync External Changes | false | Sync external file changes before operations (WARNING: significant performance impact) |
| Disabled Tools | 7 tools | Per-tool enable/disable toggles. Some tools are disabled by default to keep the tool list focused |
| Lifecycle Management | ||
| Enable lifecycle management | true | Master toggle for the automatic sleep/wake state machine |
| Active → Background (minutes) | 2 | Focus-loss grace period before switching to Power Save Mode |
| Background → Dormant (minutes) | 2 | MCP-idle time before closing editors and freeing PSI caches |
| Dormant → Closed (minutes) | 10 | Idle time before fully closing the project window |
| Event log buffer size | 500 | How many events ide_lifecycle_log retains in memory (100–10,000) |
Fully Tested:
May Work (Untested):
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.
The plugin runs a custom embedded Ktor CIO HTTP server with dual MCP transports:
AI Assistant ──────► POST /index-mcp/streamable-http (initialize or request)
◄── JSON-RPC response or HTTP 202 Accepted
──────► POST /index-mcp/streamable-http (follow-up requests/notifications)
◄── JSON-RPC response or HTTP 202 Accepted
The plugin uses stateless Streamable HTTP for the primary MCP transport. It does not
issue Mcp-Session-Id headers, does not require session resumption, and does not
implement or advertise authentication capabilities.
AI Assistant ──────► GET /index-mcp/sse (establish SSE stream)
◄── event: endpoint (receive POST URL with sessionId)
──────► POST /index-mcp?sessionId=x (JSON-RPC requests)
◄── HTTP 202 Accepted
◄── event: message (JSON-RPC response via SSE)
This dual approach:
2025-03-262024-11-05Contributions are welcome! Please:
./gradlew test# Build the plugin
./gradlew build
# Run IDE with plugin installed
./gradlew runIde
# Run tests
./gradlew test
# Run plugin verification
./gradlew runPluginVerifier
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Plugin based on the IntelliJ Platform Plugin Template.
AI-powered task management system for AI-driven development. Features PRD parsing, task expansion, multi-provider support (Claude, OpenAI, Gemini, Perplexity, xAI), and selective tool loading for optimized context usage.
Provide coding agents direct access to Figma data to help them one-shot design implementation.
High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 66 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.
gitmcp.io is a generic remote MCP server to connect to ANY GitHub repository or project for documentation
MCP Server for Android/iOS application and device automation, development and app scraping. Simulator/Emulator/Physical devices like iPhone, Google Pixel, Samsung supported.
Create crafted UI components inspired by the best 21st.dev design engineers.