McpEssentials.Redis 1.0.0-preview.7

This is a prerelease version of McpEssentials.Redis.
dotnet add package McpEssentials.Redis --version 1.0.0-preview.7
                    
NuGet\Install-Package McpEssentials.Redis -Version 1.0.0-preview.7
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="McpEssentials.Redis" Version="1.0.0-preview.7" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="McpEssentials.Redis" Version="1.0.0-preview.7" />
                    
Directory.Packages.props
<PackageReference Include="McpEssentials.Redis" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add McpEssentials.Redis --version 1.0.0-preview.7
                    
#r "nuget: McpEssentials.Redis, 1.0.0-preview.7"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package McpEssentials.Redis@1.0.0-preview.7
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=McpEssentials.Redis&version=1.0.0-preview.7&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=McpEssentials.Redis&version=1.0.0-preview.7&prerelease
                    
Install as a Cake Tool

McpEssentials.Redis

Authenticated MCP task store backed by Redis. Same per-user isolation as InMemoryMcpTaskStorePlus, persisted as strings with native PEXPIREAT from DiscardAfter and pub/sub for multi-node elicitation.

The host owns IConnectionMultiplexer. This package ships the store and registration. Redis expires keys; the request-path sweep is off by default.

Install

dotnet add package McpEssentials.Redis

Usage

Register a multiplexer, then the store:

builder.Services.AddHttpContextAccessor();
builder.Services.AddSingleton<IConnectionMultiplexer>(
    _ => ConnectionMultiplexer.Connect(connectionString));

builder.Services.AddMcpServer()
    .WithHttpTransport()
    .WithTools<MyTools>()
    .WithRedisTasks(
        sp => sp.GetRequiredService<IHttpContextAccessor>().HttpContext?.User,
        o =>
        {
            o.DefaultTimeToLive = TimeSpan.FromMinutes(5);
            o.KeyPrefix = "mcp";          // keys: mcp:task:{taskId}
            o.WaitReplicas = 1;           // WAIT after create on a replica set
        });

Stdio / single user

builder.Services.AddSingleton<IConnectionMultiplexer>(
    _ => ConnectionMultiplexer.Connect("localhost:6379"));
builder.Services.AddMcpServer()
    .WithRedisTasks("local-user");

Store only, without IMcpServerBuilder:

builder.Services.AddMcpEssentialsRedisTasks(
    sp => sp.GetRequiredService<IHttpContextAccessor>().HttpContext?.User,
    o => o.DefaultTimeToLive = TimeSpan.FromMinutes(5));

Keys and TTL

Key / channel Role
{prefix}:task:{taskId} JSON snapshot, including OwnerUserId
{prefix}:task:input Pub/sub for resolved input (taskId + requestId)

DiscardAfter is stamped at write as CreatedAt + 2×TimeToLive. Redis PEXPIREAT uses that instant. Unlimited TTL (null) leaves the key until a terminal owner get (ServeAndDrop) or an explicit delete.

AutoSweep defaults to false. SweepExpiredAsync is a no-op; Redis owns expiry. Per-row get still honors ShouldDiscard so a custom clock can drop a key before Redis does. A custom ShouldDiscard that disagrees with DiscardAfter should also override SweepExpiredCoreAsync and skip native expiry.

Replica sets: set WaitReplicas so CreateTaskAsync does not return until a later get on another node can see the key. Standalone Redis leaves this at 0.

Isolation

CreateTaskAsync stamps OwnerUserId. Client-facing get/cancel/resolve require that user. Server-side complete/fail/input-request skip the live-user check. Another user's task is not found. A missing key is not found; get does not distinguish expiry from isolation.

Documentation

License

MIT © CloudNimble, Inc.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-preview.7 0 10/31/2026
1.0.0-preview.6 0 10/31/2026
1.0.0-preview.5 0 10/30/2026
1.0.0-preview.4 43 10/29/2026