Skip to content

JoeFwd/JetBrainsDebuggerPauseMonitor

Repository files navigation

JetBrains Debugger Pause Monitor

Thin HTTP proxy that forwards get_debug_session_status calls to a JetBrains debugger MCP server and exposes the result as a simple JSON state object — designed for Claude Code PreToolUse hooks that need a cheap, synchronous pause check.

GET http://localhost:7777/state?path=<absoluteProjectPath>

The path query parameter is required. It is forwarded as the project_path argument to the JetBrains MCP tool so the IDE can route the call to the correct open project when multiple projects are loaded. The monitor returns HTTP 400 when path is omitted.

There is no background polling. Each HTTP request to /state triggers exactly one MCP tool call; the response is returned directly to the caller.

Requirement

This monitor requires the JetBrains IDE plugin hechtcarmel/jetbrains-debugger-mcp-plugin. That plugin provides the MCP server the monitor proxies.

Install the plugin in your JetBrains IDE and note the endpoint URL shown in Settings → Tools → Debugger MCP Server.

Per-project MCP endpoint

Each project must have a file named jetbrains-mcp-url in its root directory containing the full MCP URL for the IDE instance that has it open:

http://127.0.0.1:29202/debugger-mcp/streamable-http

The monitor reads this file on every new connection attempt. If the file is absent and JETBRAINS_MCP_URL is not set, the request falls back to JetBrains' default local MCP endpoints and returns the JetBrains server response. With multiple JetBrains instances running concurrently, prefer the per-project file so the monitor queries the IDE that actually has the project open.

Tip: add jetbrains-mcp-url to your project's .gitignore since the port is machine-local.

Default ports by IDE (check your plugin settings to confirm):

IDE Default port
IntelliJ IDEA 29190
PyCharm 29192
WebStorm 29193
GoLand 29194
Rider 29198

Configuration

Variable Description
JETBRAINS_MONITOR_PORT Local HTTP port for the /state endpoint. Default: 7777.
JETBRAINS_MCP_URL Fallback MCP URL used when a project has no jetbrains-mcp-url file. Optional — prefer the per-project file for multi-instance setups.
JETBRAINS_MONITOR_LOG_FILE File path for monitor logs. Default: %LOCALAPPDATA%\JetBrainsDebuggerPauseMonitor\monitor.log.

The monitor logs to both the console and the file above.

Run

dotnet run --project .\src\JetBrainsDebuggerPauseMonitor\JetBrainsDebuggerPauseMonitor.csproj

Query the state for a project:

Invoke-RestMethod "http://localhost:7777/state?path=C:\Projects\MyRiderProject"

Failure cases:

400 — path parameter missing
400 { isPaused: false, statusText: "MCP error: ..." } — JetBrains MCP server returned an error
200 { isPaused: false, statusText: "Could not connect..." } — IDE not running / wrong port

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages