Class McpImplementation

java.lang.Object
com.soklet.McpImplementation

@ThreadSafe public final class McpImplementation extends Object
Immutable MCP implementation metadata.

Servers use this value to identify themselves to MCP clients. Client implementation information received from the wire is informational and is not an authenticated identity.

String factories and setters reject unpaired UTF-16 surrogates with IllegalArgumentException; well-formed Unicode is preserved exactly.

Author:
Mark Allen
  • Method Details

    • withNameAndVersion

      Vends a builder primed with the required implementation name and version. Client-provided strings are preserved, including blank values. Endpoints require a nonblank name and version for configured server information.
      Parameters:
      name - the implementation name
      version - the implementation version
      Returns:
      a builder for implementation metadata
      Throws:
      NullPointerException - if name or version is null
    • getName

      The implementation name.
      Returns:
      the implementation name, which may be blank for client information
    • getVersion

      The implementation version.
      Returns:
      the implementation version, which may be blank for client information
    • getTitle

      The optional human-readable implementation title.
      Returns:
      the title, or the empty optional if none was configured
    • getDescription

      The optional human-readable implementation description.
      Returns:
      the description, or the empty optional if none was configured
    • getWebsiteUrl

      The optional absolute website URI for this implementation.
      Returns:
      the website URI, or the empty optional if none was configured
    • equals

      public boolean equals(@Nullable Object other)
      Overrides:
      equals in class Object
      Returns:
      whether every implementation property is structurally equal
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
      Returns:
      structural implementation hash code