Table of Contents

Class McpServer

Namespace
Google.GenAI.Types
Assembly
Google.GenAI.dll

A MCPServer is a server that can be called by the model to perform actions. It is a server that implements the MCP protocol. Next ID: 6. This data type is not supported in Vertex AI.

public record McpServer : IEquatable<McpServer>
Inheritance
McpServer
Implements
Inherited Members

Properties

Name

The name of the MCPServer.

[JsonPropertyName("name")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Name { get; set; }

Property Value

string

StreamableHttpTransport

A transport that can stream HTTP requests and responses.

[JsonPropertyName("streamableHttpTransport")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public StreamableHttpTransport? StreamableHttpTransport { get; set; }

Property Value

StreamableHttpTransport

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a McpServer object.

public static McpServer? FromJson(string jsonString, JsonSerializerOptions? options = null)

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

McpServer

The deserialized McpServer object, or null if deserialization fails.