MTMCP Test Harness5.3.0

Docs / Security testing

Testing mode

Security testing

MCP Test Harness owns the CI gate: deterministic security payloads, cyber suites A–D, incident E–K, audit-chain verify, load resilience, authz hooks, and AGENTS.md Unicode scan. Runtime enforcement stays with MCP-Bastion. Green means the encoded corpus is caught reproducibly — not novel adaptive adversaries.

CI gate
quality_gate + SARIF
Suites A–D
egress · capacity · attest · quarantine
Incident E–K
recorded-verdict fixtures
Audit
mcp-test audit verify
injection Suite A–D load resilience audit chain agents_md scan OSCAL evidence
Canonical backlog: CYBER_SECURITY_SUITES.md · Handbook: Why security-first

What to enable

quality_gate:
  require_security_tests: true
  fail_on_severity: high
manifest_gate:
  enabled: true
  path: __snapshots__/mcp_manifest.snap
agents_md_gate:
  enabled: true
  fail_on: high

Cyber suites (shipped)

Payload & suite helpers

from mcp_test_harness import (
    marker,
    assert_egress_quarantined,
    assert_audit_chain_intact,
    assert_control_engages_under_load,
)

@marker(tags=["security", "semantic-egress"])
async def test_egress(mcp_server):
    await assert_egress_quarantined(mcp_server, "send_message")

@marker(tags=["security", "audit"])
def test_audit(chain_path):
    assert_audit_chain_intact(chain_path)

Commands

mcp-test -m security
mcp-test --sarif-output findings.sarif
mcp-test manifest check
mcp-test scan-agents
mcp-test audit verify chain.json
mcp-test --report-format html --report-output report.html

Markers semantic_live and adaptive are reserved for nightly detection-quality runs — they must not gate PRs.

Lifecycle

Scan / config → Test / CI (this harness) → Enforce / runtime (Bastion)

Canonical guide: SECURITY_TESTING.md · Cyber suites: CYBER_SECURITY_SUITES.md · Tutorial: TUTORIAL.md