McpEssentials.Redis
1.0.0-preview.7
dotnet add package McpEssentials.Redis --version 1.0.0-preview.7
NuGet\Install-Package McpEssentials.Redis -Version 1.0.0-preview.7
<PackageReference Include="McpEssentials.Redis" Version="1.0.0-preview.7" />
<PackageVersion Include="McpEssentials.Redis" Version="1.0.0-preview.7" />
<PackageReference Include="McpEssentials.Redis" />
paket add McpEssentials.Redis --version 1.0.0-preview.7
#r "nuget: McpEssentials.Redis, 1.0.0-preview.7"
#:package McpEssentials.Redis@1.0.0-preview.7
#addin nuget:?package=McpEssentials.Redis&version=1.0.0-preview.7&prerelease
#tool nuget:?package=McpEssentials.Redis&version=1.0.0-preview.7&prerelease
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
- Docs: https://easyaf.dev/mcpessentials
- Spec: Authenticated Task Stores
- Source: https://github.com/CloudNimble/McpEssentials
License
MIT © CloudNimble, Inc.
| Product | Versions 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. |
-
net10.0
- McpEssentials.Core (>= 1.0.0-preview.7)
- StackExchange.Redis (>= 2.13.17)
-
net11.0
- McpEssentials.Core (>= 1.0.0-preview.7)
- StackExchange.Redis (>= 2.13.17)
-
net8.0
- McpEssentials.Core (>= 1.0.0-preview.7)
- StackExchange.Redis (>= 2.13.17)
-
net9.0
- McpEssentials.Core (>= 1.0.0-preview.7)
- StackExchange.Redis (>= 2.13.17)
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 |