Skip to main content
McpEssentials.MongoDB is specified and is not in this repository yet. Use Entity Framework Core if you already map Mongo through EF, or wait for this package for a native collection and change streams.

When it ships

Document hosts that already run MongoDB and want a mcpTasks collection with change streams for elicitation.

Until then

Stay on Entity Framework Core if the host already maps Mongo through EF.

Intended how-to

1

Add the package

Add McpEssentials.MongoDB.
2

Create the collection

Collection mcpTasks, unique index on taskId, compound index { ownerUserId: 1, taskId: 1 }.
3

Compare-and-swap

findOneAndUpdate filtered on current status.
4

Register the store

Singleton, same current-user factory as Authenticated tasks.

Events

Change streams on the collection, filtered to input-request updates. Subscribers raise InputResponseReceived.

TTL

TTL index on the discard stamp (DiscardAfter / CreatedAt + 2×TimeToLive).

Entity Framework Core

Shipped. Use this if you already map Mongo through EF.

Stores

Pick a backing store by the engine you already run.