Annotation Interface McpServerEndpoint
Declares a class that contributes an endpoint to Soklet's dedicated MCP
server.
Soklet's annotation processor derives the endpoint descriptor without initializing the annotated class. A running MCP server creates endpoint instances through its configured instance provider when invoking handlers. Named application modules must open or export the endpoint package to Soklet. Packages containing non-public record types used for typed arguments or results must be open to Soklet's module for runtime conversion.
- Author:
- Mark Allen
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionThe implementation name reported to MCP clients.The fixed, non-root URL path exposed by the dedicated MCP server.The exact MCP protocol revisions available at this endpoint.The implementation version reported to MCP clients. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThe optional human-readable implementation description.Optional instructions that help clients use this endpoint.The fixed cache scope for everyresources/listpage.longThe default cache time to live forresources/listpages.The fixed cache scope forresources/templates/list.longThe default cache time to live forresources/templates/list.Exact served revisions on which this endpoint enables sessions.Exact revisions on which this endpoint enables subscriptions.Revisions on which this endpoint exposes the Tasks facility.The optional human-readable implementation title.Names a server-registered tool rate limiter for this endpoint.The optional absolute website URL for the implementation.
-
Element Details
-
protocolVersions
The exact MCP protocol revisions available at this endpoint. At least one revision must be specified; revisions are never inferred or upgraded.- Returns:
- supported protocol revisions
-
taskProtocolVersions
Revisions on which this endpoint exposes the Tasks facility.- Returns:
- task-enabled revisions, or an empty array when disabled
- Default:
{}
-
sessionProtocolVersions
Exact served revisions on which this endpoint enables sessions. Only2025-06-18and2025-11-25are eligible; Soklet's2026-07-28implementation does not use sessions. The server must configureMcpSessionConfig. Once enabled, later requests require the initialized session ID rather than falling back to stateless operation. The selected revisions must be a subset ofprotocolVersions().- Returns:
- session-enabled revisions, or an empty array when disabled
- Default:
{}
-
subscriptionProtocolVersions
Exact revisions on which this endpoint enables subscriptions. Modern2026-07-28exposessubscriptions/listen; supported2025-06-18and2025-11-25use session GET delivery and must also appear insessionProtocolVersions(). Legacy delivery requires server HTTP admission and an effective event source/family set. URI updates require an explicit URI authorizer; legacy catalog-only delivery does not.- Returns:
- subscription-enabled revisions, or an empty array when disabled
- Default:
{}
-
path
The fixed, non-root URL path exposed by the dedicated MCP server. It must be a normalized ASCII raw URI path of at most 8192 bytes; non-ASCII characters must be percent-encoded. Trailing slashes, repeated slashes, whitespace and dot segments are rejected; the declared path is never rewritten.- Returns:
- the endpoint URL path
-
name
-
version
-
title
-
description
The optional human-readable implementation description.- Returns:
- the description, or an empty string if none is configured
- Default:
""
-
websiteUrl
The optional absolute website URL for the implementation.- Returns:
- the website URL, or an empty string if none is configured
- Default:
""
-
instructions
Optional instructions that help clients use this endpoint.- Returns:
- endpoint instructions, or an empty string if none are configured
- Default:
""
-
toolRateLimiterName
Names a server-registered tool rate limiter for this endpoint.An empty value inherits the server's tool rate limiter. A nonempty value must identify an entry in the server's rate-limiter registry.
- Returns:
- the rate-limiter name, or an empty string to inherit
- Default:
""
-
resourceListCacheTimeToLiveInMilliseconds
The default cache time to live forresources/listpages.- Returns:
- nonnegative whole-millisecond time to live
- Default:
0L
-
resourceListCacheScope
The fixed cache scope for everyresources/listpage.- Returns:
- resources-list cache scope
- Default:
PRIVATE
-
resourceTemplateListCacheTimeToLiveInMilliseconds
The default cache time to live forresources/templates/list.- Returns:
- nonnegative whole-millisecond time to live
- Default:
0L
-
resourceTemplateListCacheScope
The fixed cache scope forresources/templates/list.- Returns:
- resource-template-list cache scope
- Default:
PRIVATE
-