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, CL
Add this skill
npx mdskills install hechtcarmel/jetbrains-debugger-mcp-pluginComprehensive MCP server providing 22 debugger tools with excellent documentation and multi-IDE support
1# Debugger MCP Server234[](https://plugins.jetbrains.com/plugin/29233)5[](https://plugins.jetbrains.com/plugin/29233)67A 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.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**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.1617### Features1819**Debug Session Management**20- **Start/Stop Sessions** - Launch any run configuration in debug mode21- **Rich Status** - Get comprehensive state in a single call (variables, stack, source context)22- **Multi-Session Support** - Manage multiple concurrent debug sessions2324**Breakpoint Management**25- **Line Breakpoints** - Set breakpoints at any valid location26- **Conditional Breakpoints** - Add conditions that must be true to pause27- **Tracepoints** - Log messages without pausing execution2829**Execution Control**30- **Step Over/Into/Out** - Navigate through code line by line31- **Resume & Pause** - Control execution flow32- **Run to Line** - Continue execution until a specific line3334**Variable Inspection**35- **View Variables** - Inspect local variables, arguments, and object fields36- **Modify Values** - Change variable values during debugging3738**Expression Evaluation**39- **Evaluate Expressions** - Run arbitrary expressions in the current context40- **Code Fragments** - Execute multi-line code snippets4142**Stack & Thread Navigation**43- **Stack Traces** - View the complete call stack with source locations44- **Frame Selection** - Switch context to any stack frame45- **Thread Listing** - See all threads and their states4647### Why Use This Plugin?4849Unlike manual debugging, this plugin enables:50- **Autonomous AI Debugging** - Your AI assistant can debug code without human intervention51- **Rich Context in Single Calls** - Get variables, stack, and source in one request52- **Programmatic Breakpoint Control** - Set conditional breakpoints with complex expressions53- **Cross-IDE Compatibility** - Works with any JetBrains IDE that supports XDebugger54- **22 Comprehensive Tools** - Full debugging capability through MCP5556Perfect for AI-assisted development workflows where you want your assistant to investigate bugs, validate fixes, or explore code behavior autonomously.57<!-- Plugin description end -->5859## Table of Contents6061- [Installation](#installation)62- [Quick Start](#quick-start)63- [Client Configuration](#client-configuration)64- [Available Tools](#available-tools)65- [Multi-Project Support](#multi-project-support)66- [Tool Window](#tool-window)67- [Error Codes](#error-codes)68- [Settings](#settings)69- [Requirements](#requirements)70- [Contributing](#contributing)7172## Installation7374### Using the IDE built-in plugin system7576<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>Marketplace</kbd> > <kbd>Search for "Debugger MCP Server"</kbd> > <kbd>Install</kbd>7778### Using JetBrains Marketplace7980Go to [JetBrains Marketplace](https://plugins.jetbrains.com/plugin/29233) and install it by clicking the <kbd>Install to ...</kbd> button.8182### Manual Installation8384Download the [latest release](https://github.com/hechtcarmel/jetbrains-debugger-mcp-plugin/releases/latest) and install it manually:85<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>⚙️</kbd> > <kbd>Install plugin from disk...</kbd>8687## Quick Start88891. **Install the plugin** and restart your JetBrains IDE902. **Open a project** - the MCP server starts automatically913. **Find your IDE port**: <kbd>Settings</kbd> > <kbd>Build, Execution, Deployment</kbd> > <kbd>Debugger</kbd> > <kbd>Built-in Server Port</kbd> (default: 63342)924. **Configure your AI assistant** with the server URL: `http://127.0.0.1:{PORT}/debugger-mcp/sse`935. **Use the tool window** (bottom panel: "Debugger MCP Server") to copy configuration or monitor commands9495### Using the "Install on Coding Agents" Button9697The easiest way to configure your AI assistant:981. Open the "Debugger 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## Example Workflow106107Just tell your AI assistant:108109> "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."110111Or for more complex debugging:112113> "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."114115## Client Configuration116117### Claude Code (CLI)118119The 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 (e.g., `intellij-debugger`, `pycharm-debugger`).120121Or run this command manually in your terminal (replace `<ide>-debugger` with your IDE name):122123```bash124claude mcp add --transport sse intellij-debugger http://127.0.0.1:63342/debugger-mcp/sse --scope user125```126127**IDE-specific server names:**128- IntelliJ IDEA: `intellij-debugger`129- PyCharm: `pycharm-debugger`130- WebStorm: `webstorm-debugger`131- GoLand: `goland-debugger`132- PhpStorm: `phpstorm-debugger`133- RubyMine: `rubymine-debugger`134- CLion: `clion-debugger`135- RustRover: `rustrover-debugger`136- Android Studio: `android-studio-debugger`137138Options:139- `--scope user` - Adds globally for all projects140- `--scope project` - Adds to current project only141142To remove: `claude mcp remove intellij-debugger` (use your IDE's name)143144### Codex CLI145146The 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 (e.g., `intellij-debugger`, `pycharm-debugger`).147148Or run this command manually in your terminal (replace `<ide>-debugger` with your IDE name):149150```bash151codex mcp add intellij-debugger -- npx -y mcp-remote http://127.0.0.1:63342/debugger-mcp/sse --allow-http152```153154To remove: `codex mcp remove intellij-debugger` (use your IDE's name)155156### Cursor157158Add to `.cursor/mcp.json` in your project root or `~/.cursor/mcp.json` globally:159160```json161{162 "mcpServers": {163 "intellij-debugger": {164 "url": "http://127.0.0.1:63342/debugger-mcp/sse"165 }166 }167}168```169170### Windsurf171172Add to `~/.codeium/windsurf/mcp_config.json`:173174```json175{176 "mcpServers": {177 "intellij-debugger": {178 "serverUrl": "http://127.0.0.1:63342/debugger-mcp/sse"179 }180 }181}182```183184### VS Code (Generic MCP)185186```json187{188 "mcp.servers": {189 "intellij-debugger": {190 "transport": "sse",191 "url": "http://127.0.0.1:63342/debugger-mcp/sse"192 }193 }194}195```196197> **Note**: Replace `intellij-debugger` with your IDE's server name (see list above).198199> **Note**: Replace `63342` with your actual IDE port if different. Check <kbd>Settings</kbd> > <kbd>Debugger</kbd> > <kbd>Built-in Server Port</kbd>.200201## Available Tools202203The plugin provides **22 MCP tools** organized by category:204205### Run Configuration Tools206207| Tool | Description |208|------|-------------|209| `list_run_configurations` | List all available run configurations in the project |210| `execute_run_configuration` | Execute a run configuration in debug or run mode |211212### Debug Session Tools213214| Tool | Description |215|------|-------------|216| `list_debug_sessions` | List all active debug sessions with state and metadata |217| `start_debug_session` | Start a new debug session for a run configuration |218| `stop_debug_session` | Stop/terminate a debug session |219| `get_debug_session_status` | Get comprehensive status (variables, stack, source) in one call |220221### Breakpoint Tools222223| Tool | Description |224|------|-------------|225| `list_breakpoints` | List all breakpoints with optional filtering |226| `set_breakpoint` | Set a line breakpoint with condition, log message, suspend policy |227| `remove_breakpoint` | Remove a breakpoint by ID or location |228229### Execution Control Tools230231| Tool | Description |232|------|-------------|233| `resume_execution` | Resume paused execution |234| `pause_execution` | Pause running execution |235| `step_over` | Step over to next line (without entering methods) |236| `step_into` | Step into method calls |237| `step_out` | Step out of current method |238| `run_to_line` | Continue execution until a specific line |239240### Stack & Thread Tools241242| Tool | Description |243|------|-------------|244| `get_stack_trace` | Get current call stack with file/line/method info |245| `select_stack_frame` | Change debugger context to a different stack frame |246| `list_threads` | List all threads with state information |247248### Variable Tools249250| Tool | Description |251|------|-------------|252| `get_variables` | Get all variables visible in current stack frame |253| `set_variable` | Modify a variable's value during debugging |254255### Navigation Tools256257| Tool | Description |258|------|-------------|259| `get_source_context` | Get source code around current execution point |260261### Evaluation Tools262263| Tool | Description |264|------|-------------|265| `evaluate_expression` | Evaluate an expression or code fragment in debug context |266267> **Note**: For detailed tool documentation with parameters, examples, and response formats, see [USAGE.md](USAGE.md).268269## Multi-Project Support270271When multiple projects are open in a single IDE window, you must specify which project to use with the `project_path` parameter:272273```json274{275 "name": "set_breakpoint",276 "arguments": {277 "project_path": "/Users/dev/myproject",278 "file_path": "/Users/dev/myproject/src/Main.java",279 "line": 42280 }281}282```283284If `project_path` is omitted:285- **Single project open**: That project is used automatically286- **Multiple projects open**: An error is returned with the list of available projects287288## Tool Window289290The plugin adds a "Debugger MCP Server" tool window (bottom panel) that shows:291292- **Server Status**: Running indicator with server URL and port293- **Project Name**: Currently active project294- **Command History**: Log of all MCP tool calls with:295 - Timestamp296 - Tool name297 - Status (Success/Error/Pending)298 - Parameters and results (expandable)299 - Execution duration300301### Tool Window Actions302303| Action | Description |304|--------|-------------|305| Refresh | Refresh server status and command history |306| Copy URL | Copy the MCP server URL to clipboard |307| Clear History | Clear the command history |308| Export History | Export history to JSON or CSV file |309| **Install on Coding Agents** | Install MCP server on AI assistants (prominent button on right) |310311## Error Codes312313### JSON-RPC Standard Errors314315| Code | Name | Description |316|------|------|-------------|317| -32700 | Parse Error | Failed to parse JSON-RPC request |318| -32600 | Invalid Request | Invalid JSON-RPC request format |319| -32601 | Method Not Found | Unknown method name |320| -32602 | Invalid Params | Invalid or missing parameters |321| -32603 | Internal Error | Unexpected internal error |322323### Custom MCP Errors324325| Code | Name | Description |326|------|------|-------------|327| -32001 | Session Not Found | Debug session not found |328| -32002 | File Not Found | Specified file does not exist |329| -32003 | Not Paused | Operation requires paused session |330| -32004 | Breakpoint Error | Failed to set/remove breakpoint |331| -32005 | Evaluation Error | Expression evaluation failed |332333## Settings334335Configure the plugin at <kbd>Settings</kbd> > <kbd>Tools</kbd> > <kbd>Debugger MCP Server</kbd>:336337| Setting | Default | Description |338|---------|---------|-------------|339| Server Port | 0 (auto) | Set specific port or 0 for auto-assign |340| Max History Size | 100 | Maximum number of commands to keep in history |341| Auto-scroll | true | Auto-scroll to new commands in history |342| Show Notifications | true | Show notifications for server events |343344## Requirements345346- **JetBrains IDE** 2025.1 or later (any IDE based on IntelliJ Platform)347- **JVM** 21 or later348- **MCP Protocol** 2024-11-05349350### Supported IDEs351352**Fully tested**: IntelliJ IDEA, PyCharm, WebStorm, GoLand, RustRover, Android Studio, PhpStorm353**May work** (untested): RubyMine, CLion, DataGrip354355## Architecture356357The plugin supports **dual MCP transports** on the IDE's built-in web server:358359### SSE Transport (MCP Inspector, spec-compliant clients)360361```362AI Assistant ──────► GET /debugger-mcp/sse (establish SSE stream)363 ◄── event: endpoint (receive POST URL with sessionId)364 ──────► POST /debugger-mcp?sessionId=x (JSON-RPC requests)365 ◄── HTTP 202 Accepted366 ◄── event: message (JSON-RPC response via SSE)367```368369### Streamable HTTP Transport (Claude Code, simple clients)370371```372AI Assistant ──────► POST /debugger-mcp (JSON-RPC requests)373 ◄── JSON-RPC response (immediate HTTP response)374```375376This dual approach:377- **MCP Inspector compatible** - Full SSE transport per MCP spec (2024-11-05)378- **Claude Code compatible** - Streamable HTTP for simple request/response379- Requires no additional ports or processes380- Works with any MCP-compatible client381- Automatically adapts to the IDE's server port382383## Contributing384385Contributions are welcome! Please:3863871. Fork the repository3882. Create a feature branch3893. Make your changes3904. Run tests: `./gradlew test`3915. Submit a pull request392393### Development Setup394395```bash396# Build the plugin397./gradlew build398399# Run IDE with plugin installed400./gradlew runIde401402# Run tests403./gradlew test404405# Run plugin verification406./gradlew runPluginVerifier407```408409## License410411This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.412413---414415Plugin based on the [IntelliJ Platform Plugin Template](https://github.com/JetBrains/intellij-platform-plugin-template).416
Full transparency — inspect the skill content before installing.