Record Class McpServerEntry

java.lang.Object
java.lang.Record
com.tnsai.mcp.registry.McpServerEntry
Record Components:
name - unique server name/identifier
description - human-readable description of the server
version - server version string
protocolVersion - MCP protocol version (e.g. "2025-11-05"), null if unknown
transport - transport type: "stdio", "sse", or "streamable-http"
endpoint - connection endpoint (URL or command)
source - registry source name (e.g. "official", "smithery")
rating - quality rating from 0.0 to 5.0
metadata - additional key-value metadata

public record McpServerEntry(String name, String description, String version, String protocolVersion, String transport, String endpoint, String source, double rating, Map<String,String> metadata) extends Record
Represents a single MCP server entry discovered from a registry source.

Each entry contains identification, transport configuration, and quality metadata about an MCP server available in a public registry.

  • Constructor Details

  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • description

      public String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • version

      public String version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • protocolVersion

      public String protocolVersion()
      Returns the value of the protocolVersion record component.
      Returns:
      the value of the protocolVersion record component
    • transport

      public String transport()
      Returns the value of the transport record component.
      Returns:
      the value of the transport record component
    • endpoint

      public String endpoint()
      Returns the value of the endpoint record component.
      Returns:
      the value of the endpoint record component
    • source

      public String source()
      Returns the value of the source record component.
      Returns:
      the value of the source record component
    • rating

      public double rating()
      Returns the value of the rating record component.
      Returns:
      the value of the rating record component
    • metadata

      public Map<String,String> metadata()
      Returns the value of the metadata record component.
      Returns:
      the value of the metadata record component