Back to MCP Servers

Jetbrains Debugger Mcp Plugin

A JetBrains IDE plugin that exposes an MCP server, giving AI coding assistants full programmatic control over the debugger.

developer-toolsai
By hechtcarmel
8418Updated 2 weeks agoKotlinMIT

Installation

npx -y jetbrains-debugger-mcp-plugin

Configuration

{
  "mcpServers": {
    "jetbrains-debugger-mcp-plugin": {
      "command": "npx",
      "args": ["-y", "jetbrains-debugger-mcp-plugin"]
    }
  }
}

How to use

  1. Run the installation command above (if needed)
  2. Open your Claude Code settings file (~/.claude/settings.json)
  3. Add the configuration to the mcpServers section
  4. Restart Claude Code to apply changes

Debugger MCP Server

Build Version Downloads

A JetBrains IDE plugin that exposes an MCP (Model Context Protocol) server, giving AI coding assistants full programmatic control over the debugger. Set breakpoints, step through code, inspect variables, and evaluate expressions—all driven autonomously by your AI assistant.

Fully tested: IntelliJ IDEA, PyCharm, WebStorm, GoLand, RustRover, Android Studio, PhpStorm May work (untested): RubyMine, CLion, DataGrip

"Buy Me A Coffee"

<!-- Plugin description -->

Debugger MCP Server gives AI coding assistants complete control over the IDE's debugger through the Model Context Protocol (MCP). Let your AI assistant debug code autonomously—from setting breakpoints to inspecting variables to stepping through execution.

Features

Debug Session Management

  • Start/Stop Sessions - Launch any run configuration in debug mode
  • Rich Status - Get comprehensive state in a single call (variables, stack, source context)
  • Multi-Session Support - Manage multiple concurrent debug sessions

Breakpoint Management

  • Line Breakpoints - Set breakpoints at any valid location
  • Conditional Breakpoints - Add conditions that must be true to pause
  • Tracepoints - Log messages without pausing execution

Execution Control

  • Step Over/Into/Out - Navigate through code line by line
  • Resume & Pause - Control execution flow
  • Run to Line - Continue execution until a specific line

Variable Inspection

  • View Variables - Inspect local variables, arguments, and object fields
  • Modify Values - Change variable values during debugging

Expression Evaluation

  • Evaluate Expressions - Run arbitrary expressions in the current context
  • Code Fragments - Execute multi-line code snippets
  • Safety Controls - Choose unrestricted evaluation, a default risky-operation blocklist, or conservative read-only checks with optional custom regex block rules

Stack & Thread Navigation

  • Stack Traces - View the complete call stack with source locations
  • Frame Selection - Switch context to any stack frame
  • Thread Listing - See all threads and their states

Companion Skill

  • AI Debugging Guidance - Bundled companion skill teaches AI agents optimal debugger tool usage
  • One-Click Install - Install to .claude/skills/ or export as .skill/.zip

Why Use This Plugin?

Unlike manual debugging, this plugin enables:

  • Autonomous AI Debugging - Your AI assistant can debug code without human intervention
  • Rich Context in Single Calls - Get variables, stack, and source in one request
  • Programmatic Breakpoint Control - Set conditional breakpoints with complex expressions
  • Cross-IDE Compatibility - Works with any JetBrains IDE that supports XDebugger
  • 22 Comprehensive Tools - Full debugging capability through MCP
  • Configurable Server - IDE-specific ports with customizable host binding

Perfect for AI-assisted development workflows where you want your assistant to investigate bugs, validate fixes, or explore code behavior autonomously.

<!-- Plugin description end -->

Table of Contents

Installation

Using the IDE built-in plugin system

<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>Marketplace</kbd> > <kbd>Search for "Debugger MCP Server"</kbd> > <kbd>Install</kbd>

Using JetBrains Marketplace

Go to JetBrains Marketplace and install it by clicking the <kbd>Install to ...</kbd> button.

Manual Installation

Download the latest release and install it manually: <kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>⚙️</kbd> > <kbd>Install plugin from disk...</kbd>

Quick Start

  1. Install the plugin and restart your JetBrains IDE
  2. Open a project - the MCP server starts automatically on an IDE-specific port
  3. Find your IDE port: <kbd>Settings</kbd> > <kbd>Tools</kbd> > <kbd>Debugger MCP Server</kbd> (each IDE has a unique default port, e.g., 29190 for IntelliJ IDEA)
  4. Configure your AI assistant with the server URL: http://127.0.0.1:{PORT}/debugger-mcp/streamable-http
  5. Use the tool window (bottom panel: "Debugger MCP Server") to copy configuration or monitor commands

Using the "Install on Coding Agents" Button

The easiest way to configure your AI assistant:

  1. Open the "Debugger MCP Server" tool window (bottom panel)
  2. Click the prominent "Install on Coding Agents" button on the right side of the toolbar
  3. A popup appears with three sections:
    • Install Now - For Claude Code CLI and Codex CLI: Runs the installation command automatically
    • Copy Configuration - For other clients (Gemini CLI, Cursor, etc.): Copies the JSON config to your clipboard
    • Generic MCP Config - Streamable HTTP or Legacy SSE configuration for any MCP client
  4. For "Copy Configuration" clients, paste the config into the appropriate config file

Example Workflow

Just tell your AI assistant:

"Debug the calculateTotal function—set a breakpoint at line 42, run the tests in debug mode, and show me the variable values when it pauses."

Or for more complex debugging:

"There's a bug in UserService. Set a breakpoint at line 42, run the tests in debug mode, and when it breaks, show me the stack trace and all local variables."

Client Configuration

Claude Code (CLI)

The easiest way is to use the "Install on Coding Agents" button in the IDE's tool window—it generates the correct command with your IDE-specific server name and port.

Or run this command manually in your terminal (replace <ide>-debugger and port with your IDE's values):

claude mcp add --transport http intellij-debugger http://127.0.0.1:29190/debugger-mcp/streamable-http --scope user

IDE-specific server names and default ports:

IDEServer NameDefault Port
IntelliJ IDEAintellij-debugger29190
Android Studioandroid-studio-debugger29191
PyCharmpycharm-debugger29192
WebStormwebstorm-debugger29193
GoLandgoland-debugger29194
PhpStormphpstorm-debugger29195
RubyMinerubymine-debugger29196
CLionclion-debugger29197
RustRoverrustrover-debugger29198
DataGripdatagrip-debugger29199
Aquaaqua-debugger29200
DataSpelldataspell-debugger29201
Riderrider-debugger29202

Options:

  • --scope user - Adds globally for all projects
  • --scope project - Adds to current project only

To remove: claude mcp remove intellij-debugger (use your IDE's name)

Codex CLI

The easiest way is to use the "Install on Coding Agents" button in the IDE's tool window—it generates the correct command with your IDE-specific server name and port.

Or run this command manually in your terminal (replace <ide>-debugger and port with your IDE's values):

codex mcp add intellij-debugger --url http://127.0.0.1:29190/debugger-mcp/streamable-http

To remove: codex mcp remove intellij-debugger (use your IDE's name)

Gemini CLI

Add to ~/.gemini/settings.json:

{
  "mcpServers": {
    "intellij-debugger": {
      "httpUrl": "http://127.0.0.1:29190/debugger-mcp/streamable-http"
    }
  }
}

Cursor

Add to .cursor/mcp.json in your project root or ~/.cursor/mcp.json globally:

{
  "mcpServers": {
    "intellij-debugger": {
      "url": "http://127.0.0.1:29190/debugger-mcp/streamable-http"
    }
  }
}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "intellij-debugger": {
      "serverUrl": "http://127.0.0.1:29190/debugger-mcp/streamable-http"
    }
  }
}

VS Code (Generic MCP)

{
  "mcp.servers": {
    "intellij-debugger": {
      "url": "http://127.0.0.1:29190/debugger-mcp/streamable-http"
    }
  }
}

Note: Replace intellij-debugger and the port with your IDE's server name and default port (see table above).

Note: The port can be changed in <kbd>Settings</kbd> > <kbd>Tools</kbd> > <kbd>Debugger MCP Server</kbd>.

Available Tools

The plugin provides 22 MCP tools organized by category:

Run Configuration Tools

ToolDescription
list_run_configurationsList all available run configurations in the project
execute_run_configurationExecute a run configuration in debug or run mode

Debug Session Tools

ToolDescription
list_debug_sessionsList all active debug sessions with state and metadata
start_debug_sessionStart a new debug session for a run configuration
stop_debug_sessionStop/terminate a debug session
get_debug_session_statusGet comprehensive status (variables, stack, source) in one call

Breakpoint Tools

ToolDescription
list_breakpointsList all breakpoints with optional filtering
set_breakpointSet a line breakpoint with condition, log message, suspend policy
remove_breakpointRemove a breakpoint by ID or location

Execution Control Tools

ToolDescription
resume_executionResume paused execution
pause_executionPause running execution
step_overStep over to next line (without entering methods)
step_intoStep into method calls
step_outStep out of current method
run_to_lineContinue execution until a specific line

Stack & Thread Tools

ToolDescription
get_stack_traceGet current call stack with file/line/method info
select_stack_frameChange debugger context to a different stack frame
list_threadsList all threads with state information

Variable Tools

ToolDescription
get_variablesGet all variables visible in current stack frame
set_variableModify a variable's value during debugging

Navigation Tools

ToolDescription
get_source_contextGet source code around current execution point

Evaluation Tools

ToolDescription
evaluate_expressionEvaluate an expression or code fragment in debug context

Note: For detailed tool documentation with parameters, examples, and response formats, see USAGE.md.

Multi-Project Support

When multiple projects are open in a single IDE window, you must specify which project to use with the project_path parameter:

{
  "name": "set_breakpoint",
  "arguments": {
    "project_path": "/Users/dev/myproject",
    "file_path": "/Users/dev/myproject/src/Main.java",
    "line": 42
  }
}

If project_path is omitted:

  • Single project open: That project is used automatically
  • Multiple projects open: An error is returned with the list of available projects

Tool Window

The plugin adds a "Debugger MCP Server" tool window (bottom panel) that shows:

  • Server Status: Running indicator with server URL and port
  • **A

View source on GitHub