Isolate
WithTasksPlus records the owner. Another user sees not found.Elicit
await server.ElicitAsync(form) parks the form on the task. The SDK interceptor resumes when the client answers.Swap
Same identity factory. EF, Redis, Cosmos, or native Postgres.
Install
Core is enough for a single process. HTTP hosts also take the ASP.NET Core MCP package.Analyzers ship in Core. A rebuild (and sometimes an IDE restart) is enough for squiggles.
Wire the server
Same identity factory on every host. HTTP reads Register the store as a singleton. Stateless HTTP creates a fresh
HttpContext.User. Stdio uses a constant user id.- HTTP
- Stdio
McpServer per POST; a scoped store looks empty on the next tasks/get.Write a task tool
Return Claim lookup is
Task<string> so a task-capable client can poll. Read the user from the principal the host already stamped.NameIdentifier, then sub, UPN, Name. No user on a client-facing call throws McpTaskUserRequiredException.Ask the client for a form
await server.ElicitAsync(form) is enough inside a task. The SDK interceptor parks the form and resumes when the client answers.Create, From<T>(), and metadata-driven builders are in Form elicitation. Broken From<T>() shapes are compiler diagnostics in Analyzers.Run it
The in-memory sample is a complete Streamable HTTP host. Fake auth is the MCP is at
X-User-Id header.http://localhost:5280/. Send X-User-Id: alice.Prove isolation
Prove isolation
- Call
HelloWorldasalicewith the Tasks extension. Keep the task id. tasks/getasalicereturns the task.tasks/getasbobreturns not found.- Omit
X-User-Idand client-facing task operations throwMcpTaskUserRequiredException.
Runnable samples
Runnable samples
samples/CloudNimble.McpEssentials.Samples.Basic is in-memory.Entity Framework Core (localhost:5290), Redis (5300), Cosmos DB (5310), and PostgreSQL (5320) each have a host in the same folder. The store is the only thing that changes.Swap the store
Identity stays on the platform accessor. Production registers a durable store with the same factory.
Map
McpTasks with AddMcpTasksTable when you stay on Entity Framework Core. Redis and native Postgres are the buses for multi-node ElicitAsync. EF and Cosmos take an optional IMcpTaskInputSignalBus.Next steps
Why MCP Essentials?
How this layer extends the official SDK for real-world servers.
Authenticated tasks
Isolation rules, overloads, and every sample.
Form elicitation
Field-by-field,
From<T>(), and parking a form on a task.Analyzers
MCPESS001–006 so a broken form fails the build.
Choose a store
EF Core, Redis, Cosmos, native Postgres, and the specified family.