MT MCP Test Harness 4.0.1

Docs / Documentation handbook

Documentation handbook

Version: 4.0.1 Purpose: Single entry point for the full system Source markdown

Concepts, security-first rationale, CI scan report, feature map, operate recipes, and companion Bastion references.

Prefer this handbook over stuffing the root README. The README stays a thin index; this page is the handbook. Companion runtime: MCP-Bastion Documentation handbook.

Visual tour (start here)

CI scan report

Self-contained HTML from mcp-test --report-format html: sticky scan TOC, quality-gate scorecard, full OWASP/MCP findings table, MCP contract coverage %, portal scores. No hosted dashboard required.

Open sample report · SECURITY_TESTING.md

HTML scan report dashboard
Static CI scan artifact — Sonar-like panels without a live server

Scan → Test → Enforce

DiagramWhat it shows
Ecosystem map Position vs Inspector, conformance, evals, Bastion
Harness Bastion pairing Test in CI · enforce at runtime
End to end flow CLI → server → assertions → reports
CI pipeline PR gate with JUnit / SARIF / HTML

Architecture at a glance

Developer / CI
      │  mcp-test
      ▼
┌────────────────────────────┐
│  MCP Test Harness          │  deterministic CI gate
│  fixtures · assertions     │  functional / regression / perf / security
│  quality_gate · manifest   │  SARIF + HTML scan report
└─────────────┬──────────────┘
              ▼
        Your MCP server
              │
              ▼  (production — companion product)
┌────────────────────────────┐
│  MCP-Bastion               │  runtime allow / block / redact / observe
└────────────────────────────┘

How to use this handbook

You want…Go to
Install & first green runGetting started · QUICK_START
Why security-firstPart 2 below
Quality gate / manifest rug-pullSecurity testing · SECURITY_TESTING
Full API / configDEVELOPER_GUIDE
Stateless SEP-2575TUTORIAL_STATELESS
CI artifacts / scan UICI & reports
Ecosystem mapcompare.html · COMPARISON
Runtime enforceBastion handbook

Repos: MCP Test Harness = CI test gate. MCP-Bastion = runtime security engine. They pair; they do not replace each other.

Part 1 — What the harness is

MCP Test Harness is a pytest-style, MCP-aware framework for Model Context Protocol servers. It is deterministic by default, CI-native, and code-first — no LLM judge in the loop.

PropertyChoice
NatureDeterministic, reproducible, MCP-specific
Transportsstdio / SSE / HTTP (incl. stateless SEP-2575)
ModesFunctional · regression · performance · security · resiliency
ReportsConsole · JUnit · JSON · HTML scan · SARIF · PR summary · CRA
DefaultsSafe; quality_gate / manifest_gate opt-in
InfraZero hosted dashboard — artifacts are files

Part 2 — Why security-first

Agentic systems turn MCP tools into programmable privilege. A single compromised tool description, missing auth boundary, or silent schema change can move data, mutate systems, or burn budget — often without a human in the loop.

Security-first means: fail the PR when behavioral defenses or the sanctioned surface regress — before production traffic hits Bastion.

Why “test later” fails for MCP

RealityRisk if you wait
Tools are callable by modelsPrompt injection and confused-deputy abuse
Schemas + descriptions are the APIRug-pull / supply-chain drift after merge
Agents retry and fan outLatency and error rate become outages
Secrets appear in tool I/OLeakage into logs, traces, and model context
Spec revisions land frequentlySilent protocol breakage across clients

What the harness owns (CI)

What Bastion owns (runtime)

See the Bastion Documentation handbook: prompt guard, PII vault/redaction, rate/cost, RBAC, schema validation, replay, proxy boundary, local dashboard.

Scan / config (mcp-shark, Bastion scan)
        →  Test / CI gate (this harness)
        →  Enforce / runtime (MCP-Bastion)

Skipping the middle step is how teams ship green dashboards and still get surprised in production.

Part 3 — CI scan report

The HTML report is a static scan artifact, not a multi-tenant SaaS product — same nature as Bastion docs: rich evidence, no always-on platform to operate.

PanelWhy it exists
Sticky Scan TOCJump Gate → Security → Coverage → Results
Scan overviewGate, findings, contract %, manifest, flaky
Quality gate scorecardPolicy knobs + reasons + severity histogram
Security findings tableFull OWASP/MCP rows (sev, rule, file, help)
Contract coverage% ring + untested / missing-auth issues
Unified portalFunctional / perf / security / resiliency scores
Bastion pairingCI verifies ↔ runtime enforces
mcp-test --report-format html --report-output report.html
mcp-test --sarif-output findings.sarif
mcp-test --pr-summary-output mcp-pr-summary.md
# mcp-test.yaml
quality_gate:
  require_security_tests: true
  fail_on_severity: high
manifest_gate:
  enabled: true
  path: __snapshots__/mcp_manifest.snap

Part 4 — Feature map

FamilyExamples
Protocol fixturesmcp_server, lifecycle, schema validation
Correctnessassert_tool_call, resources, prompts, capabilities
Regressionassert_snapshot, idempotent, manifest snapshot
Performancelatency, throughput, stateless throughput, baselines
Securitypayloads, auth, SARIF, quality_gate, OWASP rules
Resiliency / chaosexperiments catalog, protocol-aware faults
Conformancemcp-test try, RFC-002 / RFC-006
Moat (Tier 1)manifest rug-pull · history/trends (next) · flakiness · version matrix

Do not build: LLM playground, always-on hosted dashboard, out-scanning mcp-scan on general threat intel, datacenter-scale generic load farms. See ROADMAP.md.

Part 5 — Operate

TaskCommand
Scaffoldmcp-test init
Run suitemcp-test / mcp-test -m security
Manifest gatemcp-test manifest check|update|show
Zero-config probemcp-test try · mcp-test doctor
Stateless certifymcp-test conformance stateless --url …
Dockerdocker run --rm ghcr.io/vaquarkhan/mcp-test-harness:latest --version

Part 6 — Learning paths

  1. Developer (30 min): Getting started → feature demos → one HTML report locally
  2. Security reviewer: Part 2 → Security testing → enable gates → SARIF → Bastion handbook
  3. Platform / perf: PERFORMANCE → baselines → RFC-006 stateless
  4. Compliance: CRA_COMPLIANCE → ENTERPRISE_GOVERNANCE → evidence packs

Asset index

AssetPath
Feature overviewdocs/images/mcp-testobarness-feature.png
Ecosystem mapdocs/images/ecosystem-map.png
Harness ↔ Bastiondocs/images/harness-bastion-pairing.png
Sample HTML reporthtml/reports/sample_mcp_test_report.html
Source handbookdocs/HANDBOOK.md
Docs sitehtml/guide/

Related published pages & end references

This project

Companion & external references

ReferenceWhy it matters
MCP-Bastion Documentation handbook Canonical runtime security handbook — attack→defense, dashboard, pillars
MCP-Bastion Enforce in production what CI verified
Bastion attack demos Runnable ATTACK → BLOCK/REDACT stories
Bastion feature deep dive Issue → control → benefit for every pillar
mcp-shark IDE / config-time MCP security scanning
OWASP Top 10 for LLMs Shared taxonomy for findings (OWASP-LLM)
Model Context Protocol Protocol specification the harness exercises
EU Cyber Resilience Act CRA evidence packaging context
SARIF standard GitHub Code Scanning upload format