McpEssentials.EntityFrameworkCore 1.0.0-preview.7

This is a prerelease version of McpEssentials.EntityFrameworkCore.
dotnet add package McpEssentials.EntityFrameworkCore --version 1.0.0-preview.7
                    
NuGet\Install-Package McpEssentials.EntityFrameworkCore -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.EntityFrameworkCore" 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.EntityFrameworkCore" Version="1.0.0-preview.7" />
                    
Directory.Packages.props
<PackageReference Include="McpEssentials.EntityFrameworkCore" />
                    
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.EntityFrameworkCore --version 1.0.0-preview.7
                    
#r "nuget: McpEssentials.EntityFrameworkCore, 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.EntityFrameworkCore@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.EntityFrameworkCore&version=1.0.0-preview.7&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=McpEssentials.EntityFrameworkCore&version=1.0.0-preview.7&prerelease
                    
Install as a Cake Tool

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

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 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