McpEssentials.EntityFrameworkCore
1.0.0-preview.7
dotnet add package McpEssentials.EntityFrameworkCore --version 1.0.0-preview.7
NuGet\Install-Package McpEssentials.EntityFrameworkCore -Version 1.0.0-preview.7
<PackageReference Include="McpEssentials.EntityFrameworkCore" Version="1.0.0-preview.7" />
<PackageVersion Include="McpEssentials.EntityFrameworkCore" Version="1.0.0-preview.7" />
<PackageReference Include="McpEssentials.EntityFrameworkCore" />
paket add McpEssentials.EntityFrameworkCore --version 1.0.0-preview.7
#r "nuget: McpEssentials.EntityFrameworkCore, 1.0.0-preview.7"
#:package McpEssentials.EntityFrameworkCore@1.0.0-preview.7
#addin nuget:?package=McpEssentials.EntityFrameworkCore&version=1.0.0-preview.7&prerelease
#tool nuget:?package=McpEssentials.EntityFrameworkCore&version=1.0.0-preview.7&prerelease
McpEssentials.EntityFrameworkCore
Authenticated MCP task store backed by Entity Framework Core. Same per-user isolation as InMemoryMcpTaskStorePlus, persisted on any EF Core database.
The host owns the DbContext, the connection, and migrations. This package ships the entity, the IEntityTypeConfiguration, and a singleton store that opens a scope per operation so a standard scoped AddDbContext works.
Install
dotnet add package McpEssentials.EntityFrameworkCore
Usage
builder.Services.AddHttpContextAccessor();
builder.Services.AddDbContext<AppDbContext>(o => o.UseSqlServer(connectionString));
builder.Services.AddMcpServer()
.WithHttpTransport()
.WithTools<MyTools>()
.WithTasksPlus<AppDbContext>(
sp => sp.GetRequiredService<IHttpContextAccessor>().HttpContext?.User,
o => o.DefaultTimeToLive = TimeSpan.FromMinutes(5));
Map the table
Pick one. Both map McpTaskEntity onto the same host DbContext. Default table McpTasks; pass a name and schema to change it (AddMcpTasksTable("AppTasks", "mcp")). The host does not need a DbSet.
OnModelCreating — the project that owns AppDbContext already references this package. Mapping lives with the rest of the model. dotnet ef migrations add from that project sees the table.
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.AddMcpTasksTable();
}
AddDbContext — AppDbContext lives in a class library that must stay free of MCP. Only the application project takes this package. Call AddMcpTasksTable on the options next to UseSqlServer. The mapping runs after OnModelCreating. Run migrations with the application as --startup-project. A migration from the context project alone will not see McpTasks and can emit a drop.
builder.Services.AddDbContext<AppDbContext>(o =>
{
o.UseSqlServer(connectionString);
o.AddMcpTasksTable();
});
The host owns the database.
Single-instance hosts can skip a signal bus. Multi-node hosts that wait on ElicitAsync register an IMcpTaskInputSignalBus (Redis, Service Bus, …) in DI; the store publishes after a successful resolve and subscribes so the originating process wakes up.
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.
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)
- Microsoft.EntityFrameworkCore (>= 10.0.14)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.14)
-
net11.0
- McpEssentials.Core (>= 1.0.0-preview.7)
- Microsoft.EntityFrameworkCore (>= 11.0.0-rc.3.26522.148)
- Microsoft.EntityFrameworkCore.Relational (>= 11.0.0-rc.3.26522.148)
-
net8.0
- McpEssentials.Core (>= 1.0.0-preview.7)
- Microsoft.EntityFrameworkCore (>= 8.0.33)
- Microsoft.EntityFrameworkCore.Relational (>= 8.0.33)
-
net9.0
- McpEssentials.Core (>= 1.0.0-preview.7)
- Microsoft.EntityFrameworkCore (>= 9.0.22)
- Microsoft.EntityFrameworkCore.Relational (>= 9.0.22)
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 | 34 | 10/31/2026 |
| 1.0.0-preview.6 | 43 | 10/31/2026 |
| 1.0.0-preview.5 | 38 | 10/30/2026 |
| 1.0.0-preview.4 | 42 | 10/29/2026 |
| 1.0.0-preview.3 | 46 | 10/28/2026 |
| 1.0.0-preview.2 | 55 | 10/27/2026 |
| 1.0.0-preview.1 | 46 | 10/27/2026 |