MCP Apps 26.02
MCP Apps let an MCP-capable AI app, also called a host, open a routed webforJ view inside its conversation. The view remains part of the Java app, so it uses the same components, services, routing, and state as it does in a browser.
The person and the AI can work with the same live UI. The AI can supply input when it opens the view, call actions that change the open view, and receive context from choices the person makes in the UI. The person can continue using the rendered webforJ components directly.
Spring Boot with Spring AI is the primary way to publish an MCP App. The integration discovers marked routes and adds them to Spring AI's MCP server. Start with the Spring Boot setup, then test the connection with the minimal published view. Applications that don't use Spring Boot can use the standard servlet setup instead.
MCP Apps need control of the app's servlet context to install the cross-origin filter, cookie settings, OAuth 2.0 discovery handling, and the other embed support the host needs. An app deployed through BBj Services can't initiate that servlet setup. Deploy the app in a servlet container that the app controls instead.
Topics
Spring Boot MCP Apps
Build and publish a routed webforJ view as an MCP App with Spring Boot and Spring AI.
Test an MCP App
Test a webforJ MCP App with an MCP Apps-capable host, including the Codex app, Claude Desktop, and MCPJam.
Open a view with input
Accept structured opening input in a routed MCP App and choose its requested display mode.
Add tools for an open view
Add tools that work with an MCP App already open in the current conversation.
Work with the MCP client
Connect a rendered webforJ view to its MCP client.
Configure an MCP App
Configure the public app origin, allowed embedding clients, and external browser domains.
Standard webforJ setup
Assemble an MCP server and register webforJ MCP Apps in a standard servlet-based webforJ application.