# Interface McpServerOrBuilder (0.12.0)

0.12.0 (latest) 0.10.0 0.7.0 0.6.0 0.4.0 0.2.0 0.1.0

    public interface McpServerOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### getCapabilities()

    public abstract 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** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Struct.html` | The capabilities. |

### getCapabilitiesOrBuilder()

    public abstract 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** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.StructOrBuilder.html` |   |

### getDescription()

    public abstract String getDescription()

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

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The description. |

### getDescriptionBytes()

    public abstract ByteString getDescriptionBytes()

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

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for description. |

### getDisplayName()

    public abstract String getDisplayName()

Optional. A human readable name for the MCP server.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The displayName. |

### getDisplayNameBytes()

    public abstract ByteString getDisplayNameBytes()

Optional. A human readable name for the MCP server.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for displayName. |

### getName()

    public abstract 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** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The name. |

### getNameBytes()

    public abstract 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** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for name. |

### getState()

    public abstract 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** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudapiregistry/latest/com.google.cloud.apiregistry.v1.State` | The state. |

### getStateValue()

    public abstract 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** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for state. |

### getUrls(int index)

    public abstract String getUrls(int index)

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

`repeated string urls = 4;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the element to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The urls at the given index. |

### getUrlsBytes(int index)

    public abstract ByteString getUrlsBytes(int index)

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

`repeated string urls = 4;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the value to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes of the urls at the given index. |

### getUrlsCount()

    public abstract int getUrlsCount()

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

`repeated string urls = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The count of urls. |

### getUrlsList()

    public abstract List<String> getUrlsList()

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

`repeated string urls = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` | A list containing the urls. |

### hasCapabilities()

    public abstract 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** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the capabilities field is set. |