AuditingMcpServerStore
AgentPrism.Core.dllWraps IMcpServerStore in a decorator that writes an audit trail.
public sealed class AuditingMcpServerStore : IMcpServerStore, IAuditDecoratedInheritance
Section titled “Inheritance”object ← AuditingMcpServerStore
Implements
Section titled “Implements”IMcpServerStore, IAuditDecorated
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”Adding an MCP server accepts an external tool definition, so every write to this store must enter the audit trail. McpServerDefinition never carries a secret, but the secret filter still applies.
Constructors
Section titled “Constructors”AuditingMcpServerStore(IMcpServerStore, IAuditLog, IAuditActorResolver, ILogger<AuditingMcpServerStore>)
Section titled “ AuditingMcpServerStore(IMcpServerStore, IAuditLog, IAuditActorResolver, ILogger<AuditingMcpServerStore>)”Initializes a new audited MCP server store.
public AuditingMcpServerStore(IMcpServerStore inner, IAuditLog auditLog, IAuditActorResolver actorResolver, ILogger<AuditingMcpServerStore> logger)Parameters
Section titled “Parameters”inner IMcpServerStore
auditLog IAuditLog
actorResolver IAuditActorResolver
logger ILogger<AuditingMcpServerStore>
Properties
Section titled “Properties”AuditedInner
Section titled “ AuditedInner”Gets the real store instance the decorator wraps.
public object AuditedInner { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”DeleteAsync(string, string, CancellationToken)
Section titled “ DeleteAsync(string, string, CancellationToken)”Deletes a server.
public ValueTask<bool> DeleteAsync(string tenantId, string name, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenantId string
The tenant identifier.
name string
The server name.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”true if the record was deleted.
GetAsync(string, string, CancellationToken)
Section titled “ GetAsync(string, string, CancellationToken)”Fetches a server by name.
public ValueTask<McpServerDefinition?> GetAsync(string tenantId, string name, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenantId string
The tenant identifier.
name string
The server name.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<McpServerDefinition?>
The server; null if none exists.
ListAsync(string, CancellationToken)
Section titled “ ListAsync(string, CancellationToken)”Lists a tenant’s servers, ordered by name.
public ValueTask<IReadOnlyList<McpServerDefinition>> ListAsync(string tenantId, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenantId string
The tenant identifier.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<IReadOnlyList<McpServerDefinition>>
The servers.
SaveAsync(McpServerDefinition, CancellationToken)
Section titled “ SaveAsync(McpServerDefinition, CancellationToken)”Adds or updates a server. The key is the (tenant, name) pair.
public ValueTask<McpServerDefinition> SaveAsync(McpServerDefinition server, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”server McpServerDefinition
The server to write.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<McpServerDefinition>
The persisted record.