Interface McpEndpoint
- All Superinterfaces:
McpEndpointMixin
- All Known Implementing Classes:
SpringMcpRestServlet
Mixin interface that exposes a
2025-06-18 MCP endpoint at POST /mcp on any Juneau
REST resource.
The mixin path and the servlet-subclass path
(McpRestServlet) are at parity: both bind the revision at compile time and both
expose the same capabilities() hook.
Example:
-
Method Summary
Modifier and TypeMethodDescriptiondefault ServerCapabilitiesOptional explicit capabilities advertisement forinitialize.default McpRevisionrevision()The MCP protocol revision this endpoint speaks.Methods inherited from interface org.apache.juneau.rest.server.mcp.McpEndpointMixin
getMcpConfig, handleMcpRequest, subscriptionBroker
-
Method Details
-
revision
Description copied from interface:McpEndpointMixinThe MCP protocol revision this endpoint speaks.- Specified by:
revisionin interfaceMcpEndpointMixin- Returns:
- The bound revision. Never
null.
-
capabilities
Optional explicit capabilities advertisement forinitialize.Returning
null (the default) leaves capabilities auto-derived from the registered tool / prompt / resource lists; a non-null value bypasses auto-derivation.Stays a
defaultinterface method (Correction C8), for the same reasonMcpRestServlet.capabilities()staysprotected: onlyrevision()above, declared on this same interface, ever calls it.- Returns:
- The explicit capabilities, or
null to auto-derive.
-