Skip to content

Releases: BuildWithAbid/mcp-testkit

v1.0.0 — Initial Release

17 Apr 07:12

Choose a tag to compare

mcp-testkit v1.0.0

The missing testing framework for MCP (Model Context Protocol) servers.

Features

  • Test Harness — One-line setup for in-memory or stdio MCP testing
  • Custom MatcherstoHaveToolNamed(), toBeSuccessful(), toHaveTextContent(), and more
  • Schema Validation — Validate tool schemas against MCP best practices
  • Input Generation — Generate valid and edge-case inputs from JSON Schema
  • Fuzz Testing — Reproducible fuzz testing with seeded PRNG
  • Snapshot Support — Deterministic snapshot serializer (strips _meta, _timestamp, etc.)
  • Text HelpersgetTexts(), getFirstText(), hasText() utilities

Install

npm install -D mcp-testkit @modelcontextprotocol/sdk zod

Quick Start

import { createHarness } from "mcp-testkit";
import { mcpMatchers } from "mcp-testkit/matchers";

expect.extend(mcpMatchers);

const harness = await createHarness(server);
const result = await harness.callTool("greet", { name: "World" });
expect(result).toBeSuccessful();
expect(result).toHaveTextContent("Hello, World!");

See README for full documentation.