agentleFS
zhengqiuyangzhengqiuyang/agent-skills/skills/mcp-test-suite/SKILL.md

mcp-test-suite

Skill0 starsChanged 2 months agoMITView on GitHub

Authors test suites for MCP servers using the mcp-test tool: functional YAML assertions, prompt-injection security probes, false-positive tuning, and CI gating. Use when building or maintaining an MCP server that needs more than manual poking in an inspector — especially before exposing it to agent clients you do not control.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the evidence excerpt — which detector, which shape?

    line 49

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Authoring mcp-test Suites

mcp-test runs YAML-defined functional tests and injection probes against a running MCP server over stdio, with CI-ready exit codes (0 pass, 1 findings, 2 config error). This skill covers the parts the README assumes.

Start functional, then arm security

  1. Handshake smoke: listTools: true + toolsContain: [expected-tools] — catches startup config errors instantly.
  2. One call per tool: empty assert: {} asserts "completed" — the cheapest possible coverage. Then add contains/jsonSchema/maxLatencyMs for the tools that matter.
  3. Security section last, on the tools that touch untrusted input (files, web, tickets, notes).

Probe philosophy (where FPs come from)

Probes send known injection payloads (instruction-override and credential-file families — the exact payload table ships in the mcp-test README and probes source) through tool arguments, then run leak detectors (private-key headers, token shapes, env-dump shapes, system-prompt markers) on responses. Two design facts matter when reading results:

  • A tool merely echoing the payload is not a leak — payloads are stripped before detection, including slash-normalized echoes (Windows paths). If you see a leak, look for the detector evidence line: it names what was found.
  • suspicious never fails CI — it means compliance language + echo, worth a look, not a gate.

FP tuning workflow

A detector firing on your legitimate server:

  1. Read the evidence excerpt — which detector, which shape?
  2. Drop that probe for the tool (probes: [ssh-key-exfil, env-exfiltration]) as an immediate unblock, then
  3. Fix the underlying imprecision (usually: severity should follow data flow, not vocabulary — env | grep VAR presence probes are debugging idioms, not dumps), add a regression test with the exact false-positive input.

CI integration

- run: npx mcp-test -c mcp-test.yaml --format github

--format github emits ::error file=...,line=... annotations pointing at the failing YAML entry; the exit code gates the build with no extra steps. Note: .cmd server commands on Windows need command: cmd, args: [/c, ...] (spawn is shell-less).

Schema-drift upgrade gate (companion)

Pin tool versions with mcp-test snapshot; before any upgrade run mcp-test diff --snapshot old.json --new <candidate> — it spins both versions over stdio and classifies breaking (removed tool, +required param, type change) vs additive. Exit 1 on breaking changes gates the upgrade in CI.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.