mcp-java-dev-tools

mcp-java-dev-tools

Bridges agentic coding tools and live Java runtime behavior through a lightweight sidecar agent. Attaches directly to a running JVM to provide bytecode-level runtime signals for probe-verified inspection and deterministic debugging.

Category
访问服务器

README

mcp-java-dev-tools

node npm JDK Java Agent Target package MCP Badge

MCP Java Dev Tools bridges agentic coding tools and live Java runtime behavior through a lightweight sidecar agent.

Static analysis only gets you so far. By attaching directly to a running JVM, this tool surfaces bytecode-level runtime signals that static analysis alone can't see — enabling probe-verified inspection, targeted regression checks, runtime-path validation, and deterministic debugging workflows.

The runtime agent is built with ByteBuddy and works alongside JDWP rather than replacing it. On top of the probe layer, the system adds framework-aware data synthesis and strict, fail-closed tool contracts — so agent orchestrators can make decisions grounded in actual runtime proof, not inference.

The current focus is HTTP entrypoints. Non-HTTP protocol support is on the horizon but not yet implemented — it will need concrete models and validation targets before the core contracts can be generalized.

For operator workflows and end-to-end execution flows, see docs/how-it-works/README.md.


Requirements

Requirement Version
Node.js v24.13.0 (tested)
npm 11.6.2 (tested)
JDK 17+
Maven any recent

Build

npm.cmd install
npm.cmd run build
mvn -f java-agent\pom.xml package

This produces two artifacts:

  • MCP server → dist/server.js
  • Java agent bundle → java-agent/core/core-probe/target/mcp-java-dev-tools-agent-0.1.0-all.jar

Installation

Installer

Installer flow is split into install and update scripts (Codex and Kiro skills).

./scripts/install.sh

This installs the default skill set:

  • mcp-java-dev-tools-line-probe-run
  • mcp-java-dev-tools-regression-suite
  • mcp-java-dev-tools-regression-plan-crafter
  • mcp-java-dev-tools-regression-result
  • mcp-java-dev-tools-issue-report
  • mcp-java-dev-tools-probe-registry-manager

To update/overwrite existing installed skills (and add missing new skills):

./scripts/update.sh

Both scripts:

  • run npm run build:compile
  • run mvn -f java-agent/pom.xml package
  • sync shipped skills into the target client skill directory
  • by default prompt for a first workspace and generate MCP env config block output (Codex/Kiro specific)

Kiro-specific behavior during install/update:

  • stale managed skills matching mcp-java-dev-tools-* are detected and can be deleted interactively
  • installed managed skills are validated after sync (SKILL.md + expected folder presence)
  • Kiro restart/reload guidance is printed so the visible tool/skill list refreshes from the synced skill directory

Default MCP registry env input can be skipped:

./scripts/install.sh --client codex --no-configure-mcp-env

MCP env input captures:

  • MCP_JAVA_AGENT_JAR (required; absolute path to built Java agent jar)

Spring Integration Launcher

Use the helper launcher to run a Spring app with auto-inferred Java agent include scope and probe port:

./spring-integration/run-spring-app-with-mcp.sh

Behavior:

  • prompts for Spring project absolute path, app port (default 8080), optional JDWP port, and Java 21 compatibility
  • infers include package from src/main/java
  • assigns probe port starting at 9173 and increments if occupied
  • opens a new Git Bash window and starts the Spring app with JAVA_TOOL_OPTIONS including -javaagent

Manual Setup

Java Agent Setup

The target JVM must run on Java 17 or newer. If you're on Java 21, see Java 21 compatibility mode before continuing.

Add the following as a JVM argument when launching your application, replacing {desktopName}:

-javaagent:C:\Users\{desktopName}\repository\mcp-java-dev-tools\java-agent\core\core-probe\target\mcp-java-dev-tools-agent-0.1.7.jar=host=0.0.0.0;port=9191;exclude=com.nimbly.mcpjavadevtools.agent.**,**.config.**,**Test

Tip: The include filter is optional. If omitted, the agent infers an include scope from startup command metadata (sun.java.command), usually the startup class package (for example com.acme.app.**). Set include explicitly when inference is ambiguous or too broad.

include supports comma-separated basepaths:

  • package globs (for example com.thirdparty.service.**)
  • exact class FQCNs (for example com.example.ApiClass)
  • mixed module/class targeting in one value (for example com.example.app.**,com.example.api.**,com.thirdparty.SomeClass)

To confirm the agent is instrumenting your classes, check the startup logs for lines like:

[mcp-probe]: com.yourpackagename.yourclassname

If you don't see your classes listed, check your include filter.


<details> <summary><strong>IntelliJ IDEA — Step by Step</strong></summary>

  1. Open Run > Edit Configurations... from the top menu
  2. Select the run configuration for your target application (or create one if it doesn't exist)
  3. Expand the Modify options dropdown and enable Add VM options if it isn't already visible
  4. In the VM options field, paste the full -javaagent:... argument from above
  5. Click Apply, then OK
  6. Run your application normally — the agent attaches on startup

Finding the JAR path: If you're unsure of the absolute path, right-click the agent JAR in the Project panel and choose Copy Path > Absolute Path.

On Windows, use backslashes in the path (C:\Users\...). On macOS/Linux, use forward slashes (/home/... or /Users/...).

</details>


<details> <summary><strong>Eclipse — Step by Step</strong></summary>

  1. Go to Run > Run Configurations... (or Debug Configurations... if you're debugging)
  2. Select your application under Java Application, or create a new one
  3. Open the Arguments tab
  4. In the VM arguments field, paste the full -javaagent:... argument from above
  5. Click Apply, then Run (or Debug)

Finding the JAR path: Navigate to the JAR in your file system, right-click it, and copy the full path. Paste it into the agent argument, replacing the placeholder path.

On Windows, Eclipse accepts both forward and backslashes in paths, but backslashes are safer. Wrap the path in quotes if it contains spaces: -javaagent:"C:\path with spaces\agent.jar"=...

</details>


Runtime Configuration

Java Agent Options

Capture History Buffer Size

Controls how many method captures the agent retains per probe point.

Method Value
Agent arg captureMethodBufferSize=<1..32>
JVM property -Dmcp.probe.capture.method.buffer.size=<1..32>
Environment variable MCP_PROBE_CAPTURE_METHOD_BUFFER_SIZE=<1..32>

Default is 3. Increase this if you need deeper capture history for a single probe point.

Java 21 Compatibility Mode

Required if your target JVM runs on Java 21. Enables ByteBuddy's experimental support for newer JVM internals.

Method Value
Agent arg allowJava21=true (aliases: java21Compat=true, byteBuddyExperimental=true)
JVM property -Dmcp.probe.bytebuddy.experimental=true (legacy alias: -Dmcp.probe.allow.java21=true)
Environment variable MCP_PROBE_BYTEBUDDY_EXPERIMENTAL=true (legacy alias: MCP_PROBE_ALLOW_JAVA21=true)

Default is false.

MCP Server Environment Variables

Required

Variable Purpose
MCP_JAVA_AGENT_JAR Absolute path to the built Java agent jar used for probe-wired runtime startup

Optional

Variable Default Notes
MCP_JAVA_REQUEST_MAPPING_RESOLVER_JAR —
MCP_JAVA_REQUEST_MAPPING_RESOLVER_CLASSPATH —
MCP_JAVA_BIN —
MCP_PROBE_LINE_SELECTION_MAX_SCAN_LINES 120 Range: 10–2000
MCP_PROBE_WAIT_MAX_RETRIES 1 Max: 10
MCP_PROBE_WAIT_UNREACHABLE_RETRY_ENABLED false
MCP_PROBE_WAIT_UNREACHABLE_MAX_RETRIES 3 Max: 10
MCP_PROBE_INCLUDE_EXECUTION_PATHS false Set true to include executionPaths arrays in probe payloads

Configuration Scope Matrix

Setting Consumed By Affects
.mcpjvm/probe-config.json MCP server Canonical multi-probe routing with workspaces/profiles/probes
include / exclude in -javaagent:... (or mcp.probe.include / MCP_PROBE_INCLUDE) Java agent Which classes are instrumented at runtime
MCP_PROBE_INCLUDE_EXECUTION_PATHS MCP server Whether executionPaths arrays are included in returned probe payloads

Probe Endpoints

These paths are fixed and cannot be overridden.

Endpoint Path
Status /__probe/status
Reset /__probe/reset
Capture /__probe/capture

Skills

Skill Purpose
mcp-java-dev-tools-line-probe-run Line-level probe execution
mcp-java-dev-tools-regression-suite Regression check orchestration
mcp-java-dev-tools-regression-plan-crafter Craft and refine deterministic persisted regression plan specs (metadata.json, contract.json, plan.md)
mcp-java-dev-tools-regression-result Artifact-derived result rendering with extensible display templates (default endpoint table)
mcp-java-dev-tools-issue-report Sanitized issue reporting from session, runtime, and probe evidence

Contributing

Contribution guidance lives in CONTRIBUTING.md.

The guide distinguishes between:

  • synthesizer and adapter contributions
  • probe tools and recipe generation contributions

Start there before opening a large pull request or changing public tool contracts.

MCP Tools

Tool
debug_check
artifact_management
probe
route_synthesis
execution_profile_export
execution_orchestration

Probe config Artifact runtime behavior:

  • Registry config is loaded from discovered workspace .mcpjvm/probe-config.json.
  • File edits are auto-reloaded with debounce.
  • artifact_management with artifactType=probe_config and action=reload remains available as deterministic manual refresh/fallback.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选