Skip to main content

Module Structure

bud/
├── bud-core          Pure Java library (zero Spring dependencies)
├── bud-mcp-server    Spring Boot app with @McpTool annotations
└── bud-acp-server    ACP agent via AgentClient

bud-core

The foundation. Template extraction, POM mutation (via maven-model), JavaParser-based refactoring, project analysis. Zero Spring framework dependencies — enforced by ArchUnit rules. Key classes:
  • TemplateExtractor — Extracts project templates from classpath using JDK ClassLoader + manifest files
  • PomMutator — Read/write Maven POM files (add/remove dependencies, set versions, add plugins)
  • JavaParserRefactor — AST-based package rename for extracted templates
  • RecipeCatalog — Composable recipes (actuator, security, CI, native image, etc.)
  • StartersCatalog — Searchable index of Spring Boot starters
  • BootProjectAnalyzer — Analyze existing projects for dependencies, structure, test strategy

bud-mcp-server

Spring Boot 4.1.0-M2 application that wraps bud-core with 16 @McpTool-annotated methods. Communicates via stdio JSON-RPC (MCP protocol). This is the tool layer — it has no AI, no LLM calls, no opinions about what to do. It just exposes deterministic operations.

bud-acp-server

The product. An ACP agent that receives natural language prompts, delegates to an AgentClient (which spawns Claude Code CLI with the MCP tools registered), and streams results back to the IDE.

Protocol Stack

┌─────────────────────────────────────┐
│  JetBrains IDE (AI Chat)            │
│  ← ACP protocol (stdio JSON-RPC) → │
├─────────────────────────────────────┤
│  BudAgent (@AcpAgent)               │
│  ← AgentClient →                    │
├─────────────────────────────────────┤
│  Claude Code CLI                    │
│  ← MCP protocol (stdio JSON-RPC) → │
├─────────────────────────────────────┤
│  Bud MCP Server (16 tools)          │
│  ← Java method calls →              │
├─────────────────────────────────────┤
│  bud-core (pure Java)               │
└─────────────────────────────────────┘
Two protocol boundaries, both stdio-based:
  1. ACP — IDE ↔ BudAgent (session management, prompt/response)
  2. MCP — Claude Code ↔ Bud MCP Server (tool discovery, tool invocation)

Enterprise Model

Every other ACP registry agent requires an API key. Bud is different:
  • No API key — Bud delegates to your enterprise-approved CLI
  • No billing exposure — the CLI handles authentication and billing
  • No compliance review — your IT department already approved the CLI
  • Deterministic tools — the MCP tools don’t call any LLM; scaffolding is pure code generation
The LLM is only involved in tool selection (deciding which MCP tools to call based on your prompt). The actual project creation is deterministic.

Key Dependencies

DependencyPurposeModule
javaparser-core 3.28.0AST-based package renamebud-core
maven-model 3.9.6POM read/writebud-core
spring-ai-starter-mcp-server@McpTool + stdio transportbud-mcp-server
acp-agent-support 0.10.0@AcpAgent + ACP runtimebud-acp-server
agent-client-core 0.12.0Portable CLI abstractionbud-acp-server
agent-claude 0.12.0Claude Code CLI providerbud-acp-server

Lineage

Spring CLI ai add (2023, one-shot, OpenAI only)
  → Loopy (agentic loop, Spring skills/tools, multi-turn)
    → Bud (ACP-native registry agent, portable across IDEs)