Cadenza.Mcp 1.0.15

Requires NuGet 5.0 or higher.

<Sdk Name="Cadenza.Mcp" Version="1.0.15" />
                    
For projects that support Sdk, copy this XML node into the project file to reference the package.
#:sdk Cadenza.Mcp@1.0.15
                    
#:sdk 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.

Cadenza.Mcp

Read this in 한국어.

Cadenza.Mcp is the MCP-server variant of the Cadenza SDK family — a single-file scripting MSBuild SDK that wraps the official ModelContextProtocol C# SDK (maintained jointly by Anthropic and Microsoft).

Quick start

Create a server.cs file:

#!/usr/bin/env dotnet run
#:sdk Cadenza.Mcp@1.0.15

Tool("read_file", "Read a UTF-8 text file from disk",
    (string path) => ReadText(path));

Tool("list_files", "List files matching a glob pattern",
    (string pattern) => Glob(pattern).ToArray());

await Run();

Run iteratively:

dotnet run server.cs

Register with Claude Desktop (or another MCP client) by adding to its config:

{
  "mcpServers": {
    "cadenza-files": {
      "command": "dotnet",
      "args": ["run", "/absolute/path/to/server.cs"]
    }
  }
}

Publish as a self-contained single binary:

dotnet publish server.cs -r linux-x64 -c Release

Important: stdout is owned by the protocol

Stdio MCP servers carry JSON-RPC over stdout, so the System.Console bare names (WriteLine, Write, ReadLine) are intentionally not part of the Cadenza.Mcp Tier 1 surface. Writing to stdout from user code corrupts the protocol stream and disconnects the client. Use the Log.* helpers for diagnostics — they route through ILogger to stderr.

See the project repository for the full specification, security boundary notes, and additional samples.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

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
1.0.15 132 5/28/2026
1.0.14 124 5/26/2026
1.0.13 118 5/26/2026
1.0.12 124 5/26/2026
1.0.7 139 5/25/2026
1.0.6 128 5/25/2026