Class McpServer (0.4.0)

public final class McpServer extends GeneratedMessage implements McpServerOrBuilder

Represents an MCP Server. MCP Servers act as endpoints that expose a collection of tools that can be invoked by agents.

Protobuf type google.cloud.apiregistry.v1.McpServer

Implements

McpServerOrBuilder

Static Fields

CAPABILITIES_FIELD_NUMBER

public static final int CAPABILITIES_FIELD_NUMBER
Field Value
Type Description
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
Type Description
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

STATE_FIELD_NUMBER

public static final int STATE_FIELD_NUMBER
Field Value
Type Description
int

URLS_FIELD_NUMBER

public static final int URLS_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static McpServer getDefaultInstance()
Returns
Type Description
McpServer

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static McpServer.Builder newBuilder()
Returns
Type Description
McpServer.Builder

newBuilder(McpServer prototype)

public static McpServer.Builder newBuilder(McpServer prototype)
Parameter
Name Description
prototype McpServer
Returns
Type Description
McpServer.Builder

parseDelimitedFrom(InputStream input)

public static McpServer parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
McpServer
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static McpServer parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
McpServer
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static McpServer parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
McpServer
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static McpServer parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
McpServer
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static McpServer parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
McpServer
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static McpServer parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
McpServer
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static McpServer parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
McpServer
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static McpServer parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
McpServer
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static McpServer parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
McpServer
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static McpServer parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
McpServer
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static McpServer parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
McpServer
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static McpServer parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
McpServer
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<McpServer> parser()
Returns
Type Description
Parser<McpServer>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getCapabilities()

public Struct getCapabilities()

The capabilities that a server may support. Known capabilities defined in https://modelcontextprotocol.io/specification/2025-06-18/schema#servercapabilities and additional capabilities defined by the servers.

.google.protobuf.Struct capabilities = 6;

Returns
Type Description
Struct

The capabilities.

getCapabilitiesOrBuilder()

public StructOrBuilder getCapabilitiesOrBuilder()

The capabilities that a server may support. Known capabilities defined in https://modelcontextprotocol.io/specification/2025-06-18/schema#servercapabilities and additional capabilities defined by the servers.

.google.protobuf.Struct capabilities = 6;

Returns
Type Description
StructOrBuilder

getDefaultInstanceForType()

public McpServer getDefaultInstanceForType()
Returns
Type Description
McpServer

getDescription()

public String getDescription()

Optional. A human-readable description of the MCP Server's functionality.

string description = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. A human-readable description of the MCP Server's functionality.

string description = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for description.

getDisplayName()

public String getDisplayName()

Optional. A human readable name for the MCP server.

string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Optional. A human readable name for the MCP server.

string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for displayName.

getName()

public String getName()

Identifier. The resource name of the MCP Server. Format: projects/{project}/locations/{location}/mcpServers/{mcp_server}. Example: projects/12345/locations/us-central1/mcpServers/google:bigquery.googleapis.com:mcp for 1p projects/12345/locations/us-central1/mcpServers/apphub:starbucks for 2p

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. The resource name of the MCP Server. Format: projects/{project}/locations/{location}/mcpServers/{mcp_server}. Example: projects/12345/locations/us-central1/mcpServers/google:bigquery.googleapis.com:mcp for 1p projects/12345/locations/us-central1/mcpServers/apphub:starbucks for 2p

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

public Parser<McpServer> getParserForType()
Returns
Type Description
Parser<McpServer>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getState()

public State getState()

Output only. The state of the MCP Server.

.google.cloud.apiregistry.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
State

The state.

getStateValue()

public int getStateValue()

Output only. The state of the MCP Server.

.google.cloud.apiregistry.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for state.

getUrls(int index)

public String getUrls(int index)

The base URL of the MCP server. Example: [geolocation.googleapis.com/mcp].

repeated string urls = 4;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The urls at the given index.

getUrlsBytes(int index)

public ByteString getUrlsBytes(int index)

The base URL of the MCP server. Example: [geolocation.googleapis.com/mcp].

repeated string urls = 4;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the urls at the given index.

getUrlsCount()

public int getUrlsCount()

The base URL of the MCP server. Example: [geolocation.googleapis.com/mcp].

repeated string urls = 4;

Returns
Type Description
int

The count of urls.

getUrlsList()

public ProtocolStringList getUrlsList()

The base URL of the MCP server. Example: [geolocation.googleapis.com/mcp].

repeated string urls = 4;

Returns
Type Description
ProtocolStringList

A list containing the urls.

hasCapabilities()

public boolean hasCapabilities()

The capabilities that a server may support. Known capabilities defined in https://modelcontextprotocol.io/specification/2025-06-18/schema#servercapabilities and additional capabilities defined by the servers.

.google.protobuf.Struct capabilities = 6;

Returns
Type Description
boolean

Whether the capabilities field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public McpServer.Builder newBuilderForType()
Returns
Type Description
McpServer.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

protected McpServer.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
McpServer.Builder
Overrides

toBuilder()

public McpServer.Builder toBuilder()
Returns
Type Description
McpServer.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException