@youzi9601/mcp-testkit-vitest weekly downloads statistics
Vitest plugin for mcp-testkit
@youzi9601/mcp-testkit-vitest has 22 recorded weekly downloads on npm, a decrease of 15.4% over the past 30 days.
About @youzi9601/mcp-testkit-vitest
@youzi9601/mcp-testkit-vitest
Vitest integration plugin, auto-registers MCP-specific custom matchers.
Installation
npm install -D @youzi9601/mcp-testkit-vitest vitest@4
Setup
// vitest.config.ts
import { defineConfig } from 'vitest/config'
import mcpTestkit from '@youzi9601/mcp-testkit-vitest'
export default defineConfig({
plugins: [mcpTestkit()],
test: {
environment: 'node',
},
})
One line — the plugin auto-registers these matchers to Vitest's expect():
| Matcher | Description |
|---|---|
expect(value).toBeValidMcpResponse() | Valid MCP JSON-RPC response |
expect(value).toBeMcpSuccess() | Success response with result |
expect(value).toBeMcpError(code?) | Error response, optionally with specific code |
expect(value).toBeValidJsonRpcRequest() | Well-formed JSON-RPC request |
Example
import { createMcpServer } from '@youzi9601/mcp-testkit'
describe('MCP Server Tests', () => {
let server: Awaited<ReturnType<typeof createMcpServer>>
beforeEach(async () => {
server = await createMcpServer({
command: 'node',
args: ['./dist/server.js'],
})
})
afterEach(() => server.close())
it('should return valid MCP response', async () => {
const result = await server.callTool('echo', { msg: 'hello' })
expect(result).toBeValidMcpResponse()
expect(result).toBeMcpSuccess()
})
it('should handle error responses', async () => {
const result = await server.callTool('invalidTool', {})
expect(result).toBeMcpError(-32601) // MethodNotFound
})
})
Relationship with @youzi9601/mcp-testkit
mcpTestkit()is the accompanying package for@youzi9601/mcp-testkit- Core logic, types, and error classes live in
mcp-testkit - This package only handles Vitest integration
License
MIT
Description from the npm listing.
- mcp
- vitest
- vitest-plugin
- testing
- model-context-protocol
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (122)Similar npm Testing plugins
All 20 @youzi9601/mcp-testkit-vitest alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@youzi9601/mcp-testkit-vitest. First seen Oct 16, 2026; last successful collection Oct 23, 2026. See the methodology.