Skip to content
Tracon

McpServerRequest

Namespace Tracon · Assembly Tracon.AspNetCore.dll

Request to create/update an MCP server.

public sealed record McpServerRequest : IEquatable<McpServerRequest>
Inheritance
object ← McpServerRequest
Implements
IEquatable<McpServerRequest>
Inherited Members
object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

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

public McpServerRequest()

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

Credential request headers, as a map from the header name to the NAME of the configuration key its value is read from, for example {"X-Api-Key": "Tracon:McpSecrets:acme:SearchKey"}. Every name must sit inside the caller’s tenant key space. A response returns the map unmasked: it carries no value. Absent or null keeps the stored map; {} removes it.

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

IReadOnlyDictionary<string, string>?

Extra request headers, sent as given with every request to the server. The values are stored as plain text, so a header whose name looks like a credential (Authorization, X-Api-Key, Cookie, any name ending in -key) is rejected with 400: declare it in HeaderConfigurationKeys. Send every header with its real value on each save: a response masks the values as ***, and a value of *** is rejected with 400. Absent or null keeps the stored headers; {} removes them.

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, HeaderConfigurationKeys may not name Authorization.

[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