# Testing

Write, run, place and fix tests in this repo.

- Repository: https://github.com/modelcontextprotocol/inspector (11208 stars)
- Category: Testing
- License: see repository
- Last updated: 2026-10-29
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add modelcontextprotocol/inspector --skill testing -g -a claude-code -y`
Codex: `npx skills add modelcontextprotocol/inspector --skill testing -g -a codex -y`
Cursor: `npx skills add modelcontextprotocol/inspector --skill testing -g -a cursor -y`
Gemini CLI: `npx skills add modelcontextprotocol/inspector --skill testing -g -a gemini-cli -y`

## Description

Write, run, place and fix tests in this repo. Use when adding a test, or end-to-end or integration coverage of an MCP operation (listing, paginating or calling tools); when choosing which npm command runs a given suite (web unit, web integration, Storybook, cli, mcpdo, tui, launcher, scripts); when deciding where a new test file belongs, beside its source, under src/test/, or in a client's __tests__/; when a per-file coverage check fails or a v8 ignore is in question; when asking which test tier spawns the built binary rather than importing it; or when rendering, mounting or asserting on Mantine components and their transitions in a test.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Testing

**Every change needs tests, and every file must clear ≥90% on lines,
statements, functions, and branches.** That rule and the React/Mantine
conventions live in [`AGENTS.md`](../../../AGENTS.md); this skill is where a
test goes, how to run it, and how to clear the gate.

## Before you write it: does the test use a `test-servers/` fixture?

**If it does, load the `test-servers` skill now, that is step one, before
choosing a location or writing a line.**

⚠️ **Load it before searching the code, not after.** A task phrased as
end-to-end or integration coverage of an MCP operation, listing tools,
paginating a list, calling a tool, reading a resource, almost always stands a
fixture up, so treat that phrasing as the answer to the question above and load
`test-servers` _first_. Grepping for an existing test to copy is not a
substitute: the fixture you find that way (a config under
`test-servers/configs/`) does not tell you which of the three shapes below
drives it, or that it can be stale. If the skill then shows the case needs no
fixture, you have lost one skill load.

The condition is **"does this test depend on a fixture from `test-servers/`?"**, not which tier it lands in, and not which directory it lands in. There are two
ways to depend on one, and they need different halves of that skill:

The rest: https://github.com/modelcontextprotocol/inspector/blob/HEAD/.claude/skills/testing/SKILL.md
