cf-kaizen is a multi-module Spring Boot project that leverages Spring AI to provide a natural language interface for interacting with Cloud Foundry foundations. The project hosts clients generated from OpenAPI derivatives of cf-butler and cf-hoover APIs, combined with Spring AI implementation to enable conversational interaction with Cloud Foundry resources.
The primary use case is to allow users to interact with one or more Cloud Foundry foundations using natural language without explicitly having to be aware of the Cloud Foundry APIs.
- Architecture
- Tech stack
- How to
- Build
- Run
- Integrate w/ cf-butler and cf-hoover hosted on
- Cloud Foundry
- Korifi (under development)
- Run with
cf-kaizen follows a modular architecture with several components working together:
-
MCP Servers
- Butler Server: Provides API access to Cloud Foundry foundation resources (organizations, spaces, applications, service instances, etc.)
- Hoover Server: Provides aggregated API access to Cloud Foundry foundations' resources
-
MCP Clients
- Butler Frontend: A reactive web application that serves as the chat UI for interacting with Butler server
- Hoover Frontend: A reactive web application that serves as the chat UI for interacting with Hoover server
-
Model Context Protocol (MCP) Integration
- Enables the clients to connect to AI models like Claude Desktop through standardized protocol
- Allows AI models to access tools and resources defined in cf-kaizen
┌───────────────────┐
│ │
┌───┤ Claude Desktop │
│ │ or LibreChat │
│ │ │
│ └───────────────────┘
▼
┌─────────────────┐ ┌───────────────────┐
│ │ │ │
│ cf-kaizen │◄────┤ Spring AI MCP │
│ MCP Servers │ │ Client │
│ │ │ │
└────────┬────────┘ └───────────────────┘
│
▼
┌─────────────────┐ ┌───────────────────┐
│ │ │ │
│ cf-butler and │ │ Cloud Foundry │
│ cf-hoover APIs │◄────┤ Foundation │
│ │ │ │
└─────────────────┘ └───────────────────┘
- Java 21: Base programming language
- Spring Boot 3.4.x+: Primary application framework
- Spring WebFlux: Reactive web framework
- Spring AI: Framework for AI model integration
- Model Context Protocol (MCP): Protocol for AI model interaction with external tools
- Spring Cloud: For Cloud Foundry integration
- Caffeine: In-memory caching
- Resilience4j: Fault tolerance library
- React 18: JavaScript library for building UI
- Vite: Build tool and development server
- TailwindCSS: Utility-first CSS framework
- Radix UI: Unstyled, accessible components
- React Markdown: Markdown rendering
- Maven 3.9.x+: Primary build tool
- frontend-maven-plugin: For integrating frontend build with Maven
- Node.js v23.4.0: JavaScript runtime for frontend build
- npm 10.9.2: Package manager for JavaScript dependencies
- Git CLI (2.43.0 or better)
- GitHub CLI (2.65.0 or better)
- Java SDK (21 or better)
- Maven (3.9.9 or better)
- Clone the repository:
git clone https://github.com/cf-toolsuite/cf-kaizen
- Navigate to the project directory:
cd cf-kaizen
- Build with Maven:
mvn clean install
This will:
- Build the Java backend components
- Download and install Node.js and npm (via frontend-maven-plugin)
- Install JavaScript dependencies
- Build the React frontend applications
- Package everything into executable JARs
- Start Butler:
# Open a terminal session
# Target root of cf-kaizen project source, then...
cd butler
# Replace the application domain below with your own
export CF_APP_DOMAIN=apps.dhaka.cf-app.com
# If the name of the cf-butler instance on the foundation
# you are targeting is named differently, be sure to update the value
export CF_BUTLER_API_ENDPOINT=https://cf-butler.${CF_APP_DOMAIN}
mvn spring-boot:run -Dspring-boot.run.profiles=cloud,dev
# Open a separate terminal session, target the root of cf-kaizen project source, then...
cd clients/butler
mvn spring-boot:run -Dspring-boot.run.profiles=openai,dev
- Start Hoover:
# Open a terminal session
# Target root of cf-kaizen project source, then...
cd hoover
# Replace the application domain below with your own
export CF_APP_DOMAIN=apps.dhaka.cf-app.com
# If the name of the cf-hoover instance on the foundation
# you are targeting is named differently, be sure to update the value
export CF_BUTLER_API_ENDPOINT=https://cf-hoover.${CF_APP_DOMAIN}
# Open a separate terminal session, target the root of cf-kaizen project source, then...
cd clients/hoover
mvn spring-boot:run -Dspring-boot.run.profiles=openai,dev
- Access the applications in your browser:
- Butler frontend: http://localhost:8081
- Hoover frontend: http://localhost:8083
- Install Claude Desktop
- Create a configuration file:
"cf-kaizen-butler-client": {
"command": "java",
"args": [
"-jar",
"-Ddefault.url=<cf-butler-application-instance-api-endpoint>",
"<path-to-project>/target/cf-kaizen-butler-server-0.0.1-SNAPSHOT.jar"
]
}
- Replace placeholders with appropriate values
- Restart Claude Desktop
- Verify that new tool calls are available in Claude
cf-kaizen supports multiple configuration profiles:
The application can be configured to use different AI model providers:
- OpenAI (default)
- Groq Cloud
- Ollama (local models)
- OpenRouter
Configuration is specified in application.yml
and can be overridden with environment variables or command-line arguments.
spring:
application:
name: cf-kaizen-butler-frontend
ai:
mcp:
client:
name: ${MCP_CLIENT_NAME:butler}
request-timeout: 120s
type: ASYNC
sse:
connections:
butler:
url: ${CF_KAIZEN_BUTLER_SERVER_URL:http://localhost:8082}
# Additional configuration options...
cf-kaizen can be deployed to Cloud Foundry using standard cf CLI commands:
E.g.,
cf push cf-kaizen-butler-frontend -m 1G -p ./target/cf-kaizen-butler-frontend-0.0.1-SNAPSHOT.jar
Consult the documentation for detailed deployment instructions on Cloud Foundry.
cf-kaizen/
├── butler/ # Butler MCP server
├── clients/ # Frontend clients
│ ├── butler/ # Butler client frontend
│ ├── hoover/ # Hoover client frontend
│ └── docker/ # Docker configurations
├── config/ # Configuration files
├── docs/ # Documentation
├── hoover/ # Hoover MCP server
└── scripts/ # Helper scripts
- Create a new tool in the appropriate MCP server
- Implement the tool functionality
- Configure the MCP client to discover and use the tool
- Update the system prompt if needed
cf-kaizen provides a powerful, AI-driven interface to Cloud Foundry foundations, enabling natural language interactions with Cloud Foundry resources. By leveraging Spring AI and the Model Context Protocol, it offers a standardized way to connect AI models with Cloud Foundry data and operations.