Skip to main content
McpEssentials.SqlServer is specified and is not in this repository yet. Use Entity Framework Core with UseSqlServer until it ships.
This package exists for hosts that want Azure SQL or SQL Server without an EF model (ADO.NET, Dapper).

When it ships

The host already uses Microsoft.Data.SqlClient and wants rowversion CAS on McpTasks under its own migrations.

Until then

Stay on Entity Framework Core + UseSqlServer when you already have a DbContext.
Service Broker and Query Notifications are heavy; scale-out elicitation pairs Azure SQL with Service Bus as IMcpTaskInputSignalBus.

Intended how-to

1

Add the package

Add McpEssentials.SqlServer.
2

Create the table

McpTasks with rowversion for compare-and-swap, indexes on OwnerUserId and DiscardAfter.
3

Register the store

Singleton, same current-user factory as Authenticated tasks.
4

Optional bus

Register IMcpTaskInputSignalBus for multi-node ElicitAsync.

TTL

Call SweepExpiredAsync from a hosted service, or DELETE WHERE DiscardAfter <= SYSUTCDATETIME(). DiscardAfter is CreatedAt + 2×TimeToLive, stamped at write.

Entity Framework Core

Shipped. Any EF provider, including UseSqlServer.

Stores

Pick a backing store by the engine you already run.