Blok.Server.Mcp
2.1.0
dotnet add package Blok.Server.Mcp --version 2.1.0
NuGet\Install-Package Blok.Server.Mcp -Version 2.1.0
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="Blok.Server.Mcp" Version="2.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Blok.Server.Mcp" Version="2.1.0" />
<PackageReference Include="Blok.Server.Mcp" />
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 Blok.Server.Mcp --version 2.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Blok.Server.Mcp, 2.1.0"
#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 Blok.Server.Mcp@2.1.0
#: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=Blok.Server.Mcp&version=2.1.0
#tool nuget:?package=Blok.Server.Mcp&version=2.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Blok.Server.Mcp
Blok's MCP server inside your ASP.NET Core app. An MCP client can then read and edit Blok documents through your app.
It serves the same six tools as the Node server, @bloklabs/mcp, over stateless streamable HTTP.
Install
It needs .NET 10.
dotnet add package Blok.Server.Mcp
Use
using Blok.Server.Mcp;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddBlokMcp(options =>
{
options.FilesDirectory = "./docs";
// Your own check: may this principal open this document?
options.Authorize = (request, cancellationToken) =>
ValueTask.FromResult(MayOpen(request.Principal, request.DocumentId, request.Write));
});
var app = builder.Build();
app.MapBlokMcp("/mcp");
app.Run();
BlokMcpOptionsholds the same choices as the command line flags: the document source, the principal, the schema, handle limits, comments and OAuth.- Read documents from a folder with
FilesDirectory, or from your own route withDocumentEndpoint. - Without
Authorize, a registeredIBlokAuthorizationdecides. With neither, every caller reaches every document. MapBlokMcptakes a path,/mcpby default.
To run the server on its own instead, use the Blok.Mcp tool.
Docs
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Blok.Server.AspNetCore (>= 2.1.0)
- Microsoft.AspNetCore.Authentication.JwtBearer (>= 10.0.11)
- ModelContextProtocol.AspNetCore (>= 2.3.1)
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 |
|---|---|---|
| 2.1.0 | 99 | 11/8/2026 |