Saltar al contenido principal

AI tooling for webforJ

Your AI assistant writes the Java. Now it can check it.

AI coding tools are fast, and their output still needs checking. webforJ gives them a loop of write, check and review: the real API to read, the right workflow to follow, and a test that returns pass or fail without a browser.

For Claude Code, GitHub Copilot, Cursor, Gemini and Codex.

$claude plugin marketplace add webforj/webforj-ai
$claude plugin install webforj@webforj-ai
#Verify inside Claude Code
>/plugin
>/mcp
webforj appears under Installed
plugin:webforj:webforj-mcp appears under connected servers
The install commands from the docs. One install brings the MCP server and the Agent Skills.

Why a loop

Three ways agent-built Java breaks, and the check for each

When a coding agent has nothing to look things up in, it writes from memory. Telling it to be careful fixes none of these. Each failure needs its own check, and webforJ closes each gap with a piece of tooling.

  1. 01
    Without a check

    It calls an API that does not exist, or used to.

    The real API

    The MCP server searches the webforJ knowledge base, so the agent reads signatures instead of recalling them.

    Read the docs
  2. 02
    Without a check

    It follows generic Java habits instead of the conventions of the framework.

    The right workflow

    Agent Skills tell the agent how to approach forms, security, styling, timers, and more.

    Read the docs
  3. 03
    Without a check

    It produces code that compiles and does nothing useful when a user clicks.

    A pass or fail

    The TestBed runs a view in a plain JUnit test, so the agent can prove its own work.

    Read the docs

The loop

Write, check, review

The agent writes the view, writes the test, runs it, and reads a pass or a fail. Step through one real screen, from the prompt to the passing test.

Your prompt

Add a webforJ greeting view at /greeting. A name field, a Greet button, and a paragraph that says Hello with the name.

A view is a Java class with a route

Nothing else is needed: no template, no JavaScript, and no REST layer between the screen and your code.

With the MCP server connected, the agent has looked up Composite, Button and @Route before it writes them.

GreetingView.java
@Route("greeting")
public class GreetingView extends Composite<Div> {
private final TextField name = new TextField("Name");
private final Paragraph message = new Paragraph();
private final Button greet =
new Button("Greet", ButtonTheme.PRIMARY, e -> greet());

public GreetingView() {
getBoundComponent().add(name, greet, message);
}

private void greet() {
message.setText("Hello, " + name.getValue() + "!");
}
}
Stage 1 of 3

The pieces

Three pieces behind the loop

  1. AI pluginbundlesMCP serverAgent Skills
  2. TestBed
  3. craftforJ Assistant

01 webforJ AI plugin

One install brings both pieces

The plugin bundles the MCP server and the Agent Skills. Together they turn an assistant that guesses at webforJ conventions into one that follows them.

Mention webforJ in your prompts. That is the cue that sends the assistant to the plugin instead of general Java knowledge.

Install the plugin

Where it installs

  • Claude CodeMarketplace command
  • GitHub Copilot CLIMarketplace command
  • VS Code + CopilotChat: Install Plugin From Source
  • Gemini CLIExtension install
  • OpenAI Codex CLIMarketplace command, then /plugins
  • Cursor, Kiro, Goose, Junie, AntigravityManual configuration

What a prompt reaches for

  • Wrap this Custom Element library as a webforJ component.creating-components skill
  • Style this view with the DWC design tokens.styling-apps skill
  • Scaffold a new webforJ sidemenu project called CustomerPortal.MCP project scaffolder
  • Generate a theme from brand color #6366f1.MCP theme generator
  • Find the webforJ docs on @Route and routing.MCP knowledge search

01a MCP server, part of the AI plugin

The assistant reads the real API instead of recalling it

Model Context Protocol is an open standard that lets AI assistants call external tools on demand. The webforJ MCP server answers from the real framework: docs, design tokens, component styling and project scaffolding.

Validation catches typos and invented tokens before they ship as silently failing CSS.

See what the server can do
  1. Target the right webforJ version

    Reads pom.xml when available and otherwise asks you. Every answer after that is scoped to your version.

  2. Look things up in the knowledge base

    An API question, a guide, a code sample or the Kotlin DSL, answered from the real framework.

    How do I set up routing with @Route in webforJ?
  3. Scaffold a new project

    The correct Maven archetype command from hello-world, blank, tabs or sidemenu, in the webforj or webforj-spring flavor.

    Create a webforJ project called CustomerPortal using the sidemenu archetype
  4. Generate a DWC theme

    Primary, success, warning, danger, info, default and gray palettes from one brand color, with automatic text contrast.

    Generate a webforJ theme from brand color #6366f1
  5. Style DWC components correctly

    CSS custom properties, shadow parts, reflected attributes and slots, read before any CSS is written.

    What CSS variables and parts does dwc-button expose?
  6. Validate design tokens

    Checks CSS, Java or Markdown against the real --dwc-* catalog and flags unknown names with suggested corrections.

    Validate app.css for any unknown --dwc-* tokens
Only the MCP server, in Claude Code
claude mcp add webforj-mcp https://mcp.webforj.com/mcp -t http -s user
The plugin is the recommended install. This command connects the server alone, at https://mcp.webforj.com/mcp.

01b Agent Skills, part of the AI plugin

The right workflow for the task in front of it

The MCP server makes accurate information available. A skill tells the assistant when to look something up, which approach fits, and what order to do things in.

Skills follow the open Agent Skills standard. The assistant loads one automatically when your prompt matches it.

Browse the skills
  • webforj-adding-servlets

    REST endpoints, webhooks and custom servlets next to the webforJ UI.

    Add a REST endpoint at /api/orders.
  • webforj-building-forms

    Binding, Jakarta validation, masked inputs and responsive form layouts.

    Build a registration form bound to my User bean.
  • webforj-creating-components

    Reusable Java components from Custom Elements, JavaScript libraries or compositions.

    Compose these webforJ components into a reusable card.
  • webforj-handling-timers-and-async

    Interval, Debouncer, Environment.runLater and PendingResult instead of raw timers and threads.

    Refresh this dashboard every 30 seconds.
  • webforj-localizing-apps

    Message bundles, runtime language switching and browser locale detection.

    Add multi-language support with English and Spanish.
  • webforj-securing-apps

    Login, logout, role-based access and secure-by-default routes.

    Protect /admin so only users with the ADMIN role can see it.
  • webforj-styling-apps

    Themes, palettes and component styling with every --dwc-* token validated.

    Theme this app with a blue palette.
  • webforj-upgrading-versions

    Major version upgrades with the official webforj-rewrite OpenRewrite recipe.

    Upgrade this app from webforJ 25 to 26.

02 TestBed

A clear pass or fail, with no browser and no server

A view runs inside a plain JUnit test. Components attach, fire their events, and navigate exactly as they do in a running app.

Every interaction finishes before the next line of the test runs, so nothing waits and nothing flakes. Spring Boot apps use the webforj-spring-testbed module.

Read the TestBed guide
  1. FindComponentLocator

    Describes a component the way a user picks it out, by its type and what it shows.

  2. ActUserInteraction

    Makes only the gestures a user could make. Clicking a disabled button fails the test.

  3. CheckverifyThat

    Checks what the user would see, and a failure names the component and both values.

pom.xml
<dependency>
<groupId>com.webforj</groupId>
<artifactId>webforj-testbed-junit</artifactId>
<scope>test</scope>
</dependency>
The version comes from the webforJ BOM. A project created from an archetype already imports it.

03 craftforJ Assistant

A coding agent inside the running app

It writes Java freely, compiles each edit before you see it, and applies it to the running app. Applying a change restarts the app, and the agent picks its plan up again once it is back.

It ships with webforJ, so there is nothing to install. craftforJ ships no model of its own: add an API key for a supported provider or point it at a model running locally with Ollama.

Meet the assistant
Lives in
AI pluginYour editor
craftforJ AssistantThe running app
Reads
AI pluginYour source files
craftforJ AssistantYour app, live, with its real values
Verifies by
AI pluginYour next build
craftforJ AssistantCompiling each edit before you see it
Suited to
AI pluginBuilding something new from scratch
craftforJ AssistantUnderstanding, fixing and prototyping against the app in front of you
The craftforJ Assistant asking before it acts, inline in the transcript, with Apply, Allow for chat and Dismiss.
The assistant asking before it acts, inline in the transcript.
webforj.conf
webforj.debug = true
webforj.devtools.craftforj.enabled = true
craftforJ runs only in development. Open it with Alt + Shift + D and switch to the AI Assistant tab.

How to start

Ask for one screen with a test

Pick a screen you would otherwise build by hand this week. webforJ is the full-stack Java framework for business web apps: you build the whole app, screens included, in Java.

  1. 1

    Install the plugin

    claude plugin marketplace add webforj/webforj-ai
    claude plugin install webforj@webforj-ai
  2. 2

    Scaffold or open a webforJ project

    Ask the MCP server for a project, or open one you already have.

  3. 3

    Ask for the view and its TestBed test in one prompt

    Describe the behavior you care about, so the test asserts it.

  4. 4

    Run mvn test and read the result