Package com.codename1.backend.mcp
package com.codename1.backend.mcp
A Model Context Protocol server inside the backend, so an agent can call a running server's tools over HTTP.
McpServer answers JSON-RPC at cn1.mcp.path (/mcp by default). An
application publishes its own tools by annotating bean methods with
McpTool from com.codename1.backend.annotations; the build generates their
schemas and a dispatcher, so nothing is looked up by reflection. DevTools
adds the development tools -- routes, beans, configuration, requests, SQL,
jobs and metrics -- and is installed only on a development profile.
Server code: this package is not available in the app.
-
ClassDescriptionThe tools an agent developing a backend uses on the running server.The conversions the build's generated tool and operation adapters use: one argument out of a call's argument map, as the type the method declares.The server's Model Context Protocol endpoint: JSON-RPC over MCP's Streamable HTTP transport, at
cn1.mcp.path(/mcpby default).Extra tools installed when the server starts; the development tools are one.One tool on the server's MCP endpoint.