1. Conduid
  2. Data
  3. Jdb MCP
MCP server · Data

Jdb MCP

Java Debugger MCP Server. Enables AI agents to debug live Java apps via JDI with breakpoints, stack tracing, and variable inspection.

Unclaimed data
39Low

Scored 6 months ago · breakdown

About Jdb MCP

Jdb MCP is an MCP server in the Data category: java Debugger MCP Server. Enables AI agents to debug live Java apps via JDI with breakpoints, stack tracing, and variable inspection.

Install

From source
git clone https://github.com/d4n-sec/jdb-mcp

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Jdb MCP

Powered by Claude · Grounded in docs

I know everything about Jdb MCP. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.

5 checks have not been run yet.

README

JDB-MCP: Java Debugger MCP Server

中文版

JDB-MCP is a Model Context Protocol (MCP) server based on the Java Debug Interface (JDI). It enables AI agents (such as Claude, Cline, Trae) to perform deep runtime debugging of Java applications.

Demo

Demo Play

Key Capabilities

  • Multi-transport Support: Supports both stdio (standard VSCode integration) and http (for remote/curl debugging).
  • Full-featured Debugging (Attach Mode Only):
    • Attach to running processes (debug_attach) - Supports any Java application (SpringBoot, Maven, Gradle, etc.) with JDWP enabled.
    • Breakpoint management (debug_set_breakpoint, debug_set_watchpoint)
    • Flow control (Step Over, Step Into, Step Out, Resume)
    • State inspection (Stack trace inspection, deep structured variable traversal)
    • Thread & Class inspection (debug_list_threads, debug_list_classes)
    • Dynamic modification (Change variable values at runtime)
  • Simplified Design: Currently focused on single-session debugging, eliminating the need for complex sessionId management.
  • Manual Debug Mode Required: The target Java application must be started manually with JDWP options enabled.
  • Real-time Awareness: Leveraging MCP Notifications, AI agents are immediately notified when a breakpoint is hit.

Installation & Build

Prerequisites

  • JDK 17+ (with JDI module)

Build fatJAR

# Build all modules and generate JARs in the `release/` directory
mvn clean package

# Or build for a specific JDK version:

# For JDK 17+ (Recommended)
mvn clean package -pl jdb-mcp-jdk17 -am

# For JDK 7 (Legacy Support)
mvn clean package -pl jdb-mcp-jdk7 -am

The executable JARs will be located in the release/ directory:

  • release/jdb-mcp.jar (JDK 17+)
  • release/jdb-mcp-jdk7.jar (JDK 7)

Configuration & Usage

Startup Options

  • --transport <stdio|http>: Set transport mode (default: stdio).
  • --notifications <true|false>: Enable real-time AI notifications (default: true).

For detailed tool parameter analysis, please refer to the Parameter Guide.

Usage in VSCode (Cline/Claude Dev)

Add the following configuration to your MCP settings:

{
  "mcpServers": {
    "jdb-debugger": {
      "command": "java",
      "args": [
        "-jar",
        "path/to/jdb-mcp.jar"
      ]
    }
  }
}

How to Debug (Attach Mode)

Important: You must manually start your target Java application with JDWP enabled.

  1. Start your project:
    java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -jar your-app.jar
    
  2. In the AI chat, request: Attach to localhost:5005 and debug...

Tool List

  • debug_attach: Attach to an existing debug port via Socket.
  • debug_list_threads: List all threads and their status.
  • debug_list_classes: List loaded classes with optional filtering.
  • debug_list_methods: List methods in a specific class.
  • debug_source: Retrieve source code for a class (requires source roots).
  • debug_set_method_breakpoint: Set a breakpoint at method entry.
  • debug_set_method_entry: Monitor method entry events.
  • debug_set_method_exit: Monitor method exit events.
  • debug_list_vars: List variables (supports threadName, frameIndex and scope filter).
  • debug_get_var: Get detailed info for a specific variable.
  • debug_set_var: Modify runtime variables (supports threadName and frameIndex).
  • ...and more (see tools/list).

TODO List

  • Implement debug_launch: Enable "out-of-the-box" experience by allowing users to launch and debug Java programs directly through the MCP.
  • Implement debug_calc: Support evaluating arbitrary Java expressions in the debug context (Expression Evaluation).
  • Multi-session Support: Refactor to allow one MCP instance to manage and debug multiple target programs simultaneously.
  • Package Prefix Filtering: Support filtering by package prefix (e.g., com.example.*) for method entry/exit and breakpoints.
  • Batch Class Filtering: Support passing multiple class names or wildcard patterns at once for filtering events.
  • Enhanced Breakpoint Control: Support conditional breakpoints and thread filtering for more precise debug interruption.
  • To be added: More features based on community feedback.

License

Open-sourced under the MIT License.

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About Jdb MCP

How do I install Jdb MCP?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Jdb MCP safe to use with an AI agent?

Its trust score is 39 out of 100 (low). It passes 1 of the 1 static security checks run so far. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Jdb MCP still maintained?

Conduid hasn't recorded a commit date for this repository yet. Check the repository directly for recent activity.