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
  • 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. Only 2025-06-18 and 2025-11-25 are eligible; Soklet's 2026-07-28 implementation does not use sessions. The server must configure McpSessionConfig. Once enabled, later requests require the initialized session ID rather than falling back to stateless operation. The selected revisions must be a subset of protocolVersions().
      Returns:
      session-enabled revisions, or an empty array when disabled
      Default:
      {}
    • subscriptionProtocolVersions

      Exact revisions on which this endpoint enables subscriptions. Modern 2026-07-28 exposes subscriptions/listen; supported 2025-06-18 and 2025-11-25 use session GET delivery and must also appear in sessionProtocolVersions(). 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

      The implementation name reported to MCP clients.
      Returns:
      the nonblank implementation name
    • version

      The implementation version reported to MCP clients.
      Returns:
      the nonblank implementation version
    • title

      The optional human-readable implementation title.
      Returns:
      the title, or an empty string if none is configured
      Default:
      ""
    • 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 for resources/list pages.
      Returns:
      nonnegative whole-millisecond time to live
      Default:
      0L
    • resourceListCacheScope

      The fixed cache scope for every resources/list page.
      Returns:
      resources-list cache scope
      Default:
      PRIVATE
    • resourceTemplateListCacheTimeToLiveInMilliseconds

      The default cache time to live for resources/templates/list.
      Returns:
      nonnegative whole-millisecond time to live
      Default:
      0L
    • resourceTemplateListCacheScope

      The fixed cache scope for resources/templates/list.
      Returns:
      resource-template-list cache scope
      Default:
      PRIVATE