ZeroMcp.TestKit 0.1.3.4

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

ZeroMcp.TestKit

A fluent .NET API for testing MCP (Model Context Protocol) servers. Define expectations in code and run them against any MCP endpoint — HTTP, WebSocket, or stdio.

Powered by the mcptest engine (bundled as native assets).

Install

dotnet add package ZeroMcp.TestKit

For xUnit integration (recommended):

dotnet add package ZeroMcp.TestKit.Xunit

Quick Start

using ZeroMcp.TestKit;

await McpTest
    .Server("http://localhost:8000/mcp")
    .Tool("search")
        .WithParams(new { query = "hello" })
        .ExpectSchemaMatch()
        .ExpectDeterministic()
    .RunAsync();

RunAsync() throws McpTestException with detailed error messages if any check fails — integrates naturally with any test framework.

What You Can Test

Expectation Method
Output matches declared JSON Schema .ExpectSchemaMatch()
Identical output across N runs .ExpectDeterministic()
Tool returns an error response .ExpectError() / .ExpectErrorCode(code)
Streaming produces enough chunks .ExpectMinStreamChunks(n)
Tool completes within a deadline .WithTimeout(TimeSpan)

Fluent API

await McpTest
    .Server("http://localhost:8000/mcp")
    .WithTimeout(TimeSpan.FromSeconds(30))
    .WithDeterminismRuns(5)
    .Tool("search")
        .WithParams(new { query = "hello" })
        .ExpectSchemaMatch()
        .ExpectDeterministic()
        .WithIgnorePaths("$.result.timestamp")
    .Tool("echo")
        .WithParams(new { text = "world" })
        .ExpectSchemaMatch()
    .RunAsync();

Inspect Responses

Use RunWithoutThrowAsync() to get the result without throwing, then inspect tool responses:

var result = await McpTest
    .Server("http://localhost:8000/mcp")
    .Tool("get_customer")
        .WithParams(new { id = 1 })
    .RunWithoutThrowAsync();

result.ForTool("get_customer")
    .Passed()
    .HasReturnProperty("id")
    .HasReturnProperty("name")
    .HasReturnValue("email", "alice@example.com");

Engine Resolution

The mcptest binary is located automatically:

  1. MCPTEST_PATH environment variable
  2. NuGet native assets (runtimes/{rid}/native/mcptest) — bundled with this package
  3. System PATH
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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.
  • net8.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on ZeroMcp.TestKit:

Package Downloads
ZeroMcp.TestKit.Xunit

xUnit integration for ZeroMcp.TestKit — adds [McpFact] and [McpTheory] attributes, McpAssert static helpers, and fluent assertion chains for testing MCP servers in Visual Studio Test Explorer.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.3.4 109 3/10/2026
0.1.2.7 110 3/10/2026
0.1.2.6 102 3/10/2026
0.1.2.4 89 3/10/2026

Initial preview release — fluent DSL, engine resolver, native asset bundling.