McpServerDefinition
AgentPrism.Abstractions.dllA registered remote MCP server. Its tools are discovered at connection time and listed alongside the tools registered in code.
public sealed record McpServerDefinition : IEquatable<McpServerDefinition>Inheritance
Section titled “Inheritance”Implements
Section titled “Implements”IEquatable<McpServerDefinition>
Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”Carries no secret. The value of the authentication header is not stored in this record; only the name of the configuration key the value is read from (AuthorizationConfigurationKey) is stored. The value is resolved at run time through IConfiguration, so it stays in dotnet user-secrets or an environment variable. It never enters a database backup, an audit trail, or a UI response.
Constructors
Section titled “Constructors”McpServerDefinition()
Section titled “ McpServerDefinition()”public McpServerDefinition()Properties
Section titled “Properties”AuthorizationConfigurationKey
Section titled “ AuthorizationConfigurationKey”The configuration key the Authorization header’s value is read
from. Example: AgentPrism:McpSecrets:GithubToken. If left empty, the
header is not sent.
public string? AuthorizationConfigurationKey { get; init; }Property Value
Section titled “Property Value”CreatedAt
Section titled “ CreatedAt”The creation time (UTC).
public DateTimeOffset CreatedAt { get; init; }Property Value
Section titled “Property Value”Description
Section titled “ Description”The description.
public string? Description { get; init; }Property Value
Section titled “Property Value”Enabled
Section titled “ Enabled”Whether the server is enabled. Its tools are not discovered while disabled.
public bool Enabled { get; init; }Property Value
Section titled “Property Value”Endpoint
Section titled “ Endpoint”The server address. Only http and https are accepted.
public required Uri Endpoint { get; init; }Property Value
Section titled “Property Value”Uri
Headers
Section titled “ Headers”Extra request headers. Must not carry a secret — these values are stored as-is and shown in the UI.
public IReadOnlyDictionary<string, string> Headers { get; init; }Property Value
Section titled “Property Value”IReadOnlyDictionary<string, string>
The server identifier. A time-ordered UUID (v7).
public required Guid Id { get; init; }Property Value
Section titled “Property Value”The server name. Discovered tools are named as {name}.{tool}, so
tools with the same name on two servers never collide.
public required string Name { get; init; }Property Value
Section titled “Property Value”OAuthAuthorizationMode
Section titled “ OAuthAuthorizationMode”The OAuth authorization flow.
[JsonPropertyName("oauthAuthorizationMode")]public McpOAuthAuthorizationMode OAuthAuthorizationMode { get; init; }Property Value
Section titled “Property Value”OAuthClientId
Section titled “ OAuthClientId”The OAuth client identifier. Not a secret, stored as-is.
[JsonPropertyName("oauthClientId")]public string? OAuthClientId { get; init; }Property Value
Section titled “Property Value”OAuthClientSecretConfigurationKey
Section titled “ OAuthClientSecretConfigurationKey”The configuration key the OAuth client secret’s value is read from.
The value is never written to the database, under the same rule
as AuthorizationConfigurationKey.
[JsonPropertyName("oauthClientSecretConfigurationKey")]public string? OAuthClientSecretConfigurationKey { get; init; }Property Value
Section titled “Property Value”OAuthEnabled
Section titled “ OAuthEnabled”Whether OAuth authentication is on. When on, it cannot be used at the
same time as AuthorizationConfigurationKey — both would
try to manage the Authorization header.
[JsonPropertyName("oauthEnabled")]public bool OAuthEnabled { get; init; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”[JsonPropertyName] is given deliberately: System.Text.Json’s
camelCase policy lowercases only the first letter, and since “OAuth”
starts with two uppercase letters, the default output would be
oAuthEnabled (not the expected oauthEnabled). The same
constraint applies to all four OAuth fields below.
OAuthScopes
Section titled “ OAuthScopes”The space-separated OAuth scope list. Example: "repo read:user".
[JsonPropertyName("oauthScopes")]public string? OAuthScopes { get; init; }Property Value
Section titled “Property Value”RequiresApproval
Section titled “ RequiresApproval”Whether this server’s tools require explicit approval before each call. Defaults to true: the tool definition comes from outside and is treated as untrusted.
public bool RequiresApproval { get; init; }Property Value
Section titled “Property Value”TenantId
Section titled “ TenantId”The tenant the server belongs to.
public required string TenantId { get; init; }Property Value
Section titled “Property Value”Transport
Section titled “ Transport”The transport format.
public McpTransportMode Transport { get; init; }Property Value
Section titled “Property Value”UpdatedAt
Section titled “ UpdatedAt”The last-updated time (UTC).
public DateTimeOffset UpdatedAt { 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(McpServerDefinition?)
Section titled “ Equals(McpServerDefinition?)”public bool Equals(McpServerDefinition? other)Parameters
Section titled “Parameters”other McpServerDefinition?
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 ==(McpServerDefinition?, McpServerDefinition?)
Section titled “ operator ==(McpServerDefinition?, McpServerDefinition?)”public static bool operator ==(McpServerDefinition? left, McpServerDefinition? right)Parameters
Section titled “Parameters”left McpServerDefinition?
right McpServerDefinition?
Returns
Section titled “Returns”operator !=(McpServerDefinition?, McpServerDefinition?)
Section titled “ operator !=(McpServerDefinition?, McpServerDefinition?)”public static bool operator !=(McpServerDefinition? left, McpServerDefinition? right)Parameters
Section titled “Parameters”left McpServerDefinition?
right McpServerDefinition?