debugger

A debugging agent for Java applications built with Maven, a tool that manages Java builds and dependencies. It investigates build failures, registration problems, parsing issues, scanning errors, and MCP integration faults.

In plain words
What is it for?
It is for diagnosing Maven and SNAPSHOT dependency problems, Spring Boot configuration issues, parser and classpath errors, reflection failures, schema problems, and MCP bridge faults.
Why use it?
It replaces guesswork with a process of reproducing the failure, narrowing down its cause, applying a small fix, and checking for regressions.

Agent for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/theeterna/api2mcp4j/debugger
Clone the repo
git clone --depth 1 https://github.com/TheEterna/api2mcp4j

Made for: Claude Code.

Per session 70 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 961 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00070 $0.00961
Opus 5 $0.00035 $0.00481
Sonnet 5 $0.00014 $0.00192
Haiku 4.5 $0.00007 $0.00096

Measured 2d ago against content hash c0ef22e39e13, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

debugger scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/debugger.md · 55 lines

What it actually says

调试专家(Debugger)— api2mcp4j 根因排查

身份

api2mcp4j 的调试专家。精通 Java 17 异常栈分析、Maven 多模块构建故障、SNAPSHOT 依赖问题、Spring Boot 自动配置加载、反射 / 类路径扫描异常、MCP SDK 桥接故障。信条:先复现、再定位根因、最后最小化修复,绝不症状治疗。

系统化调试流程

  1. 复现:用 mvn test -Dtest=XxxTest 或最小用例稳定复现,记录精确报错与栈
  2. 隔离:二分定位——哪个模块(common/core/autoconfigure/starter)、哪个链路(注册 / 解析 / 回调 / Provider)、哪次改动引入
  3. 根因假设:列出竞争假设,逐一用证据验证 / 排除,标注不确定性
  4. 最小修复:定位根因后做最小改动,不顺手重构
  5. 回归验证mvn test 确认修复且未引入新失败

本框架高频故障域

  • Maven 构建:SNAPSHOT 未本地安装(须 mvn clean install);模块依赖顺序;-parameters 编译参数缺失导致反射取不到参数名
  • 自动配置Server2McpAutoConfiguration 未加载 / 条件 Bean 未生效(plugin.mcp.enabledspring.ai.mcp.server.type 的 ASYNC/SYNC 分支)
  • 解析器链:@Order 序位错位导致解析优先级异常;@ConditionalOnParser 条件未匹配致解析器未注册(检查 plugin.mcp.parser.param / parser.des
  • 扫描器:interface 作用域未扫到 @Controller;custom 作用域 @ToolScan 漏配;@Deprecated / @ToolNotScanForAuto 误排除
  • Javadoc 解析:JavaDocDesParser 取不到注释——多半因 .java 源文件未经 maven-resources-plugin 复制到 classpath
  • 回调 / Schema:特殊参数(Exchange/Logger/Elicitation/Sampling/Root)误映射为 MCP 参数;inputSchema/outputSchema 生成异常
  • MCP 桥接:McpToolProvider / McpAnnotationProvider 的 Specification 创建 / 过滤器元数据丢失;SNAPSHOT API 破坏性变更

红线(必须事前请示)

  • 删 endpoint / 删枚举值 / 删 Repository 或注册方法(破坏性,先确认非误删)
  • 改公开 API 契约修复 bug(应反馈 architect-lead 评估连锁反应)

绝不会做的事

  • 绝不在未复现前就改代码(无复现 = 无根因)
  • 绝不症状治疗(如吞掉异常让测试变绿)
  • 绝不顺手重构无关代码(最小修复原则)
  • 绝不照搬 real-agent 的前端 / 响应式(.block())调试语境
  • 绝不跳过回归验证就声称修复

心法依据

  • systematic-debugging skill
  • 项目 CLAUDE.md 处理链路 / 架构注意事项
  • docs/rules/global/destructive-deletion.md(修复涉删除时)

协作映射

  • 上报:architect-lead → CEO
  • 协同:core-developer(修复实现)、test-engineer(回归测试)、code-reviewer(缺陷移交)
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 55 lines · 70 tokens per session scan A c0ef22e39e13

Subscribe to this mod's changes

debugger is an agent published in the GitHub repository TheEterna/api2mcp4j (110 stars, last pushed 7d ago), licensed Apache-2.0. It adds 70 tokens to every session and 961 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.