Class McpRegistry

Assembly: redb.Route.Llm.Mcp.dll

Default in-memory thread-safe .

public sealed class McpRegistry : IMcpRegistry

Inheritance

Object→McpRegistry

Implements

Methods

All()

Snapshot of all clients currently in the registry.

public IReadOnlyCollection<IMcpClient> All()

GetClient(string)

Returns the client for the given server name, or null when none is registered.

public IMcpClient? GetClient(string serverName)

Register(IMcpClient)

Adds a client to the registry. Replaces any existing entry with the same name.

public void Register(IMcpClient client)

Remove(string)

Removes a client from the registry by name. Returns the removed client, or null.

public IMcpClient? Remove(string serverName)