MeshWeaver.Mcp 3.0.0-rc2

This is a prerelease version of MeshWeaver.Mcp.
dotnet add package MeshWeaver.Mcp --version 3.0.0-rc2
                    
NuGet\Install-Package MeshWeaver.Mcp -Version 3.0.0-rc2
                    
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="MeshWeaver.Mcp" Version="3.0.0-rc2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MeshWeaver.Mcp" Version="3.0.0-rc2" />
                    
Directory.Packages.props
<PackageReference Include="MeshWeaver.Mcp" />
                    
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 MeshWeaver.Mcp --version 3.0.0-rc2
                    
#r "nuget: MeshWeaver.Mcp, 3.0.0-rc2"
                    
#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 MeshWeaver.Mcp@3.0.0-rc2
                    
#: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=MeshWeaver.Mcp&version=3.0.0-rc2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=MeshWeaver.Mcp&version=3.0.0-rc2&prerelease
                    
Install as a Cake Tool

MeshWeaver.Mcp

Exposes MeshWeaver mesh operations as a Model Context Protocol (MCP) server, enabling external AI tools (Claude Code, GitHub Copilot, Claude Desktop, etc.) to interact with the mesh over HTTP.

This is the transport-layer MCP module — independent of Blazor (it was previously MeshWeaver.Blazor.AI; that name was a misnomer — none of its files are Blazor components). It depends only on ASP.NET Core (ModelContextProtocol.AspNetCore) and the mesh feature modules, so any ASP.NET host — Blazor or not — can host it.

Features

  • MCP server with HTTP transport via ModelContextProtocol.AspNetCore
  • Tools (thin, reactive wrappers over MeshOperations and the mesh hub): Get, Search, Create, Update, Patch, Delete, Move, Copy, Upload, NavigateTo, Compile, ExecuteScript, StartThread, SubmitMessage, Mirror, Sync (instance sync), GitHubSync, RenderArea, and the LSP/chunk tools
  • Per-caller × session hub resolution (SessionHubResolver) — shared with the REST endpoint module so both transports route identically
  • Path/@-reference autocomplete provider (McpCompletionProvider)
  • API-token authentication via RequireAuthorization("McpAuth")
  • Configurable base URL for generating NavigateTo links to the MeshWeaver UI

Argument validation

Tool schemas change between releases (create nodes became create node, delete path became delete paths). A caller still speaking the older dialect used to get nothing useful: the SDK leaves UnmappedMemberHandling at Skip, so an unknown argument was silently dropped — and when the renamed parameter had a default, the call ran with that default and reported success. Anything the binder did throw on was flattened by the SDK into the fixed text An error occurred invoking 'create'., which names nothing.

McpArgumentValidation closes that. It registers one CallToolFilter in AddMeshMcp, so every tool — present and future — is checked against its own published InputSchema before the binder runs, and the call is answered with the offending argument named:

  • Error: unknown argument 'nodes' for tool 'create' — expected one of: node. Did you mean 'node'? (Tool schemas change between releases — call tools/list for the current shape.)
  • Error: missing required argument 'node' for tool 'create' — required: node.
  • Error: argument 'limit' for tool 'search' expects integer, got string ("twenty").

The check is deliberately conservative — it must never reject a call the binder would have accepted: JSON null passes through, numeric strings bind to integer/number (NumberHandling = AllowReadingFromString), and a parameter whose schema declares no type is not judged. The messages are model-facing and stay English by design (AGENTS.md: LLM-facing tool text is not localized).

The GitHubSync tool

github_sync triggers a Space's GitHub sync headlessly — the same one-click Commit / Update / Check the browser's GitHubAction layout area runs. Each op runs as a mesh Activity (progress / cancel / persisted log) via MeshWeaver.GitSync.GitHubActivityExtensions; the tool fires the activity under the caller's identity and returns the activity handle immediately (it never blocks the MCP handler on the long-running GitHub I/O). Requires the Space's _GitSync config to exist.

Usage

// In MeshBuilder setup
builder.AddMcp();

// In service registration
services.AddMeshMcp();

// In endpoint mapping
app.MapMeshMcp("/mcp");

Dependencies

  • MeshWeaver.AIMeshOperations for CRUD on mesh nodes
  • MeshWeaver.Graph — node type system and API token support
  • MeshWeaver.GitSync — the reactive GitHub sync activities behind github_sync
  • MeshWeaver.InstanceSync — instance-sync registration behind the Sync tool
  • MeshWeaver.Messaging.Hub — message hub for request routing
  • ModelContextProtocol / ModelContextProtocol.AspNetCore — MCP server SDK
Product 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.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on MeshWeaver.Mcp:

Package Downloads
MeshWeaver.Hosting.Blazor

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.0-rc2 45 8/14/2026
3.0.0-rc1 54 8/13/2026