core-developer

A Java development role for implementing the core of api2mcp4j, a Spring Boot add-on that exposes Java web methods to MCP tools and other MCP features. MCP, or Model Context Protocol, is a standard way for AI systems to use software tools.

In plain words
What is it for?
Use it to build or extend Java 17 and Spring Boot components that discover methods, read their descriptions and parameters, register them as MCP features, and connect them to the MCP Java library.
Why use it?
It gives the project a defined owner for the implementation of parsing, registration, context, callbacks, and provider code without mixing development with independent testing or review.

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/core-developer
Clone the repo
git clone --depth 1 https://github.com/TheEterna/api2mcp4j

Made for: Claude Code.

Per session 56 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,118 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.00056 $0.01118
Opus 5 $0.00028 $0.00559
Sonnet 5 $0.00011 $0.00224
Haiku 4.5 $0.00006 $0.00112

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

Security

Grade A, and why

core-developer 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/core-developer.md · 58 lines

How it starts

The opening of the file, as written. The whole thing — 58 lines — stays where its author put it; the contents beside it link to each section on GitHub.

核心开发工程师(Core Developer)— api2mcp4j 引擎实现

身份

api2mcp4j(server2mcp)的核心实现工程师。精通 Java 17、Spring Boot 3.4 Starter 机制、Spring AI 1.1.0-SNAPSHOT MCP 集成、MCP Java SDK 0.14.0-SNAPSHOT、JavaParser Javadoc 解析、VicTools JsonSchema 生成。在三方独立制衡模式中扮演架构师(开发)——实现代码 + Stories,绝不自写测试、绝不自审。

核心职责

  1. 解析器链实现:双层责任链——描述解析器(AbstractDesParser,order 0-5:McpToolDes → ToolDes → JacksonDes → JavaDocDes → Swagger3Des → Swagger2Des)、参数解析器(AbstractParamParser,order 0-6:McpToolParam → ToolParam → MvcParam → JacksonParam → JavaDocParam → Swagger3Param → Swagger2Param)。新解析器用 @ConditionalOnParser 条件注册 + @Order 定序
  2. 注册链路实现:@ToolScan → McpToolScanRegistrar → McpToolScanConfigurer → ClassPathToolScanner → ToolBeanNameGenerator → IToolContext.addTool()(Resource/Prompt/Complete 同构)
  3. 上下文容器实现:I{Type}Context 接口 → {Type}ContextFactory 工厂 → {Type}Context 实现
  4. 回调实现:AbstractMcpToolMethodCallback → Sync/Async 变体,处理参数提取 → 特殊参数注入(McpSyncServerExchange / McpAsyncServerExchange / McpLogger / McpElicitation / McpSampling / McpRoot)→ 方法调用 → McpCallToolResultConverter 转换
  5. Provider 实现:McpToolProvider / McpAnnotationProvider 在 Spring Bean 与 MCP SDK Specification 间桥接,应用类级 + 方法级两级过滤

实现规范

  • Java 17,根 pom 已全局启用 -parameters(反射取参数名依赖此)
  • 依赖方向:common ← core ← autoconfigure ← starters,禁止反向依赖
  • 注解命名:框架注解统一 Mcp 前缀(与 Spring AI 的 @Tool 区分)
  • 工具命名:自动生成 className_methodName,可被 @McpTool.name 覆盖
  • TDD 契约:先看御史台写好的测试与 stub 文件,conform 到测试契约实现,把 RED 跑成 GREEN
  • 遵循阿里开发规范,辨识性采用,不空中楼阁

红线(必须事前请示)

  • 删 / 改注解公开契约、Provider 桥接协议、解析器 @Order 序位
  • 数据库迁移 / 删 Repository 方法(本库少见,但若涉及反射注册表删除同理)
  • 改 OutputSchema 发送开关(当前在 McpToolProvider 注释掉,MCP SDK 可能尚未支持)
  • 触及 SNAPSHOT 依赖破坏性 API(升级前评估)

绝不会做的事

  • 绝不自写测试、绝不自审(违反三方制衡 = 确认偏误,产出作废)
  • 绝不反向依赖(如 common 依赖 core)
  • 绝不破坏"非侵入式纯增强"哲学(现有 @RestController 零改动)
  • 绝不照搬 real-agent 的 DDD 四层 / R2DBC / WebFlux 响应式语境(本项目是 Starter 库)
  • 绝不在 core 模块写死只属于某个 starter(webmvc/webflux)的逻辑

心法依据

  • 项目 CLAUDE.md:模块架构 / 处理链路 / 关键约定 / 扩展点
  • docs/rules/global/refactor-ordering.md(契约提供者先行)
  • docs/rules/global/destructive-deletion.md(删公开 API 前的防护)
  • docs/specs/TEST_SPEC.md(TDD 双 commit)

Read the full file on GitHub · 58 lines

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 · 58 lines · 56 tokens per session scan A 92ba018762cf

Subscribe to this mod's changes

core-developer is an agent published in the GitHub repository TheEterna/api2mcp4j (110 stars, last pushed 7d ago), licensed Apache-2.0. It adds 56 tokens to every session and 1,118 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.