Skip to content

McpServerRequest

Namespace AgentPrism · Assembly AgentPrism.AspNetCore.dll

Request to create/update an MCP server.

public sealed record McpServerRequest : IEquatable<McpServerRequest>

objectMcpServerRequest

IEquatable<McpServerRequest>

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

There is no secret field. The authentication header’s value is not sent; only the name of the configuration key (AuthorizationConfigurationKey) the value is to be read from is sent. The value is resolved through IConfiguration at runtime and is never written to the database.

public McpServerRequest()

Configuration key the Authorization header’s value is read from. Example: AgentPrism:McpSecrets:GithubToken.

public string? AuthorizationConfigurationKey { get; init; }

string?

Description.

public string? Description { get; init; }

string?

Whether the server is enabled.

public bool Enabled { get; init; }

bool

Server address. Only http and https are accepted.

public required string Endpoint { get; init; }

string

Extra request headers. Must not carry secrets — these values are stored as-is and appear in the listing endpoint.

public IReadOnlyDictionary<string, string>? Headers { get; init; }

IReadOnlyDictionary<string, string>?

OAuth authorization flow.

[JsonPropertyName("oauthAuthorizationMode")]
public McpOAuthAuthorizationMode OAuthAuthorizationMode { get; init; }

McpOAuthAuthorizationMode

OAuth client identifier.

[JsonPropertyName("oauthClientId")]
public string? OAuthClientId { get; init; }

string?

Configuration key the OAuth client secret’s value is read from. The value itself is not sent; only the key’s name is.

[JsonPropertyName("oauthClientSecretConfigurationKey")]
public string? OAuthClientSecretConfigurationKey { get; init; }

string?

Whether OAuth authentication is enabled. While on, AuthorizationConfigurationKey must be empty.

[JsonPropertyName("oauthEnabled")]
public bool OAuthEnabled { get; init; }

bool

[JsonPropertyName] is given deliberately — same reason as McpServerDefinition.OAuthEnabled: the camelCase policy produces an unexpected result for a name like “OAuth” that starts with two capital letters.

Space-separated list of OAuth scopes.

[JsonPropertyName("oauthScopes")]
public string? OAuthScopes { get; init; }

string?

Whether this server’s tools require approval. Default true.

public bool RequiresApproval { get; init; }

bool

Transport mode.

public McpTransportMode Transport { get; init; }

McpTransportMode

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(McpServerRequest? other)

other McpServerRequest?

bool

public override int GetHashCode()

int

public override string ToString()

string

operator ==(McpServerRequest?, McpServerRequest?)

Section titled “ operator ==(McpServerRequest?, McpServerRequest?)”
public static bool operator ==(McpServerRequest? left, McpServerRequest? right)

left McpServerRequest?

right McpServerRequest?

bool

operator !=(McpServerRequest?, McpServerRequest?)

Section titled “ operator !=(McpServerRequest?, McpServerRequest?)”
public static bool operator !=(McpServerRequest? left, McpServerRequest? right)

left McpServerRequest?

right McpServerRequest?

bool