Skip to content

AgentPrismMcpSecurityOptions

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

The security boundary applied to stored MCP server definitions.

public sealed class AgentPrismMcpSecurityOptions

objectAgentPrismMcpSecurityOptions

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

Read from the AgentPrism:Mcp configuration section, the same section as the MCP package’s own connection settings.

This type lives in the abstractions package on purpose: the rule is enforced in two places that do not see each other — the endpoint that saves a server definition (AgentPrism.AspNetCore) and the transport that resolves the key at connection time (AgentPrism.Mcp). One shared type keeps the two from drifting apart.

public AgentPrismMcpSecurityOptions()

Gets the configuration section name.

public const string SectionName = "AgentPrism:Mcp"

string

Gets or sets the only prefix under which a configuration key may be referenced by an MCP server definition. Default is "AgentPrism:McpSecrets:".

public string AllowedConfigurationPrefix { get; set; }

string

Covers both key-name fields a definition carries: authorizationConfigurationKey and oauthClientSecretConfigurationKey.

A security boundary, not a convenience default — the same reason as AgentPrismTenantProviderOptions.AllowedConfigurationPrefix. A definition never carries a secret value, only the name of the key the value is read from. Without this restriction that name could point at any configuration key in the application, and its value would be sent to the remote MCP server as an Authorization header.