.NET API
McpServerRequest
Tracon.AspNetCore.dllRequest 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()
Remarks
Section titled “Remarks”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.
Constructors
Section titled “Constructors”McpServerRequest()
Section titled “ McpServerRequest()”public McpServerRequest()Properties
Section titled “Properties”Description
Section titled “ Description”Description.
public string? Description { get; init; }Property Value
Section titled “Property Value”Enabled
Section titled “ Enabled”Whether the server is enabled.
public bool Enabled { get; init; }Property Value
Section titled “Property Value”Endpoint
Section titled “ Endpoint”Server address. Only http and https are accepted.
public required string Endpoint { get; init; }Property Value
Section titled “Property Value”HeaderConfigurationKeys
Section titled “ HeaderConfigurationKeys”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; }Property Value
Section titled “Property Value”IReadOnlyDictionary<string, string>?
Headers
Section titled “ Headers”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; }Property Value
Section titled “Property Value”IReadOnlyDictionary<string, string>?
OAuthAuthorizationMode
Section titled “ OAuthAuthorizationMode”OAuth authorization flow.
[JsonPropertyName("oauthAuthorizationMode")]public McpOAuthAuthorizationMode OAuthAuthorizationMode { get; init; }Property Value
Section titled “Property Value”OAuthClientId
Section titled “ OAuthClientId”OAuth client identifier.
[JsonPropertyName("oauthClientId")]public string? OAuthClientId { get; init; }Property Value
Section titled “Property Value”OAuthClientSecretConfigurationKey
Section titled “ OAuthClientSecretConfigurationKey”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; }Property Value
Section titled “Property Value”OAuthEnabled
Section titled “ OAuthEnabled”Whether OAuth authentication is enabled. While on,
HeaderConfigurationKeys may not name Authorization.
[JsonPropertyName("oauthEnabled")]public bool OAuthEnabled { get; init; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”[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.
OAuthScopes
Section titled “ OAuthScopes”Space-separated list of OAuth scopes.
[JsonPropertyName("oauthScopes")]public string? OAuthScopes { get; init; }Property Value
Section titled “Property Value”RequiresApproval
Section titled “ RequiresApproval”Whether this server’s tools require approval. Default true.
public bool RequiresApproval { get; init; }Property Value
Section titled “Property Value”Transport
Section titled “ Transport”Transport mode.
public McpTransportMode Transport { get; init; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”Equals(object?)
Section titled “ Equals(object?)”public override bool Equals(object? obj)Parameters
Section titled “Parameters”obj object?
Returns
Section titled “Returns”Equals(McpServerRequest?)
Section titled “ Equals(McpServerRequest?)”public bool Equals(McpServerRequest? other)Parameters
Section titled “Parameters”other McpServerRequest?
Returns
Section titled “Returns”GetHashCode()
Section titled “ GetHashCode()”public override int GetHashCode()Returns
Section titled “Returns”ToString()
Section titled “ ToString()”public override string ToString()Returns
Section titled “Returns”Operators
Section titled “Operators”operator ==(McpServerRequest?, McpServerRequest?)
Section titled “ operator ==(McpServerRequest?, McpServerRequest?)”public static bool operator ==(McpServerRequest? left, McpServerRequest? right)Parameters
Section titled “Parameters”left McpServerRequest?
right McpServerRequest?
Returns
Section titled “Returns”operator !=(McpServerRequest?, McpServerRequest?)
Section titled “ operator !=(McpServerRequest?, McpServerRequest?)”public static bool operator !=(McpServerRequest? left, McpServerRequest? right)Parameters
Section titled “Parameters”left McpServerRequest?
right McpServerRequest?