Package com.tnsai.mcp.registry
Record Class McpServerEntry
java.lang.Object
java.lang.Record
com.tnsai.mcp.registry.McpServerEntry
- Record Components:
name- unique server name/identifierdescription- human-readable description of the serverversion- server version stringprotocolVersion- MCP protocol version (e.g. "2025-11-05"), null if unknowntransport- 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.0metadata- 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptionrecord component.endpoint()Returns the value of theendpointrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.metadata()Returns the value of themetadatarecord component.name()Returns the value of thenamerecord component.Returns the value of theprotocolVersionrecord component.doublerating()Returns the value of theratingrecord component.source()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetransportrecord component.version()Returns the value of theversionrecord component.
-
Constructor Details
-
McpServerEntry
public McpServerEntry(String name, String description, String version, String protocolVersion, String transport, String endpoint, String source, double rating, Map<String, String> metadata) Validates entry fields on construction.- Throws:
IllegalArgumentException- if name is null/blank or rating is out of range
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
protocolVersion
Returns the value of theprotocolVersionrecord component.- Returns:
- the value of the
protocolVersionrecord component
-
transport
Returns the value of thetransportrecord component.- Returns:
- the value of the
transportrecord component
-
endpoint
Returns the value of theendpointrecord component.- Returns:
- the value of the
endpointrecord component
-
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
rating
public double rating()Returns the value of theratingrecord component.- Returns:
- the value of the
ratingrecord component
-
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-