New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@blackwell-systems/jest-mcp-assert

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blackwell-systems/jest-mcp-assert

Jest integration for mcp-assert: run MCP server assertion YAML files as Jest tests

latest
Source
npmnpm
Version
0.12.3
Version published
Maintainers
1
Created
Source

@blackwell-systems/jest-mcp-assert

Jest integration for mcp-assert. Run MCP server assertion YAML files as Jest tests.

Same YAML files work across Jest, Vitest, pytest, and the CLI.

Install

npm install -D @blackwell-systems/jest-mcp-assert @blackwell-systems/mcp-assert

Usage

Suite mode (auto-discover YAML files)

// mcp.test.ts
import { describeMcpSuite } from '@blackwell-systems/jest-mcp-assert'

describeMcpSuite('my mcp server', 'evals/')

Each YAML file in evals/ becomes a Jest test case.

Single assertion mode

import { runMcpAssert } from '@blackwell-systems/jest-mcp-assert'

test('echo tool returns message', () => {
  runMcpAssert('evals/echo.yaml')
})

test('greet tool with timeout', () => {
  runMcpAssert('evals/greet.yaml', { timeout: '60s' })
})

Options

runMcpAssert('evals/echo.yaml', {
  timeout: '30s',           // per-assertion timeout
  fixture: 'test/fixtures', // {{fixture}} substitution
  server: 'node server.js', // server override
  binary: '/path/to/mcp-assert', // explicit binary path
})

How it works

@blackwell-systems/jest-mcp-assert is a thin bridge (~100 lines). It shells out to the mcp-assert Go binary with --json, parses the result, and maps it to Jest pass/fail outcomes. The Go binary handles all MCP protocol logic.

Binary resolution (in order):

  • Explicit binary option
  • mcp-assert on PATH (brew, go install, curl install)
  • @blackwell-systems/mcp-assert npm package

Writing assertions

Assertions are YAML files. See the mcp-assert docs for the full reference.

name: echo returns the input message
server:
  command: node
  args: ["server.js"]
assert:
  tool: echo
  args:
    message: "hello"
  expect:
    not_error: true
    contains: ["hello"]

License

MIT

Keywords

jest

FAQs

Package last updated on 04 Jun 2026

Related posts