Skip to main content

MCP Server Fuzzer

CLI security and robustness testing for Model Context Protocol (MCP) servers.

CI Lint Codecov PyPI version PyPI downloads MCP versions Docker pulls License: MIT Python 3.10+

Documentation | Getting started | CLI reference | Releases

What it tests

MCP Server Fuzzer exercises live servers through:

  • Tool argument generation and mutation, including realistic and aggressive inputs.
  • Protocol request fuzzing and schema-aware checks.
  • Resources and prompts workflows.
  • HTTP, HTTPS, SSE, Streamable HTTP, and stdio transports.
  • Authentication and OAuth metadata checks for authorized remote testing.
  • Tool metadata and schema security checks, including hidden instructions, tool shadowing, unsafe capability combinations, and output injection indicators.
  • Optional runtime monitoring for stdio servers through mcpfz-probe.

The default protocol version is 2025-11-25. Schema-driven testing supports 2024-11-05, 2025-03-26, 2025-06-18, 2025-11-25, and 2026-07-28; select a target version with --spec-schema-version.

Install

Requires Python 3.10 or newer.

python -m pip install mcp-fuzzer

For optional runtime monitoring:

python -m pip install "mcp-fuzzer[mcpfz-probe]"

Docker images are published to princekrroshan01/mcp-fuzzer:

docker pull princekrroshan01/mcp-fuzzer:latest
docker run --rm princekrroshan01/mcp-fuzzer:latest --help

Quick start

Run a local or remote MCP server, then point the fuzzer at its endpoint:

mcp-fuzzer \
  --mode tools \
  --protocol streamablehttp \
  --endpoint http://localhost:8000/mcp \
  --runs 10 \
  --security-audit \
  --output-dir reports

For a local stdio server:

mcp-fuzzer \
  --mode all \
  --protocol stdio \
  --endpoint "python my_server.py" \
  --enable-safety-system \
  --fs-root "$PWD/fuzz-sandbox" \
  --output-dir reports

Only test servers and endpoints you are authorized to assess. Use low run counts first, configure timeouts, and isolate local servers with --fs-root, --no-network, or a container.

Findings and reports

Completed sessions write reports to the selected output directory:

  • findings.json: normalized security and reliability findings with evidence, severity, target, run, and source links.
  • run_summary.json: machine-readable completion status and session counts.
  • crashes/: crash reproductions and related server output when available.
  • Optional CSV, XML, HTML, and Markdown exports from the --export-* options.

Findings can include crashes, hangs, malformed-input acceptance, internal errors, error leakage, oversized responses, authentication exposure, injection reflection, nondeterminism, performance outliers, tool poisoning, and runtime observations such as process execution, network activity, credential reads, filesystem mutation, or ptrace.

Security findings include links to the relevant OWASP MCP Top 10 category where applicable. The fuzzer reports evidence; it does not prove exploitability in every environment.

Security audits

Add --security-audit to inspect tool descriptions and schemas and to evaluate security-relevant fuzz output. Add --auth-audit for OAuth metadata and authorization checks. Intrusive authorization probes require --auth-audit-intrusive and explicit authorization.

For CI, use --fail-if-no-tools, store findings.json as an artifact, and gate the job on the finding policy appropriate for your project.

Runtime monitoring

Runtime monitoring is opt-in and fail-open. It applies to stdio server processes and uses the external mcpfz-probe sidecar; it is disabled by default and never required for normal fuzzing.

mcp-fuzzer \
  --mode tools \
  --protocol stdio \
  --endpoint "python my_server.py" \
  --runtime-probe \
  --runtime-probe-backend auto \
  --runtime-probe-bin /path/to/mcpfz-probe \
  --runs 3 \
  --output-dir reports

Use the fake backend for portable development and tests. The ebpf backend is Linux-specific and may require the capabilities documented by mcpfz-probe. Use allowlists for expected helper executables and hosts. Never use runtime monitoring against a server or host you do not control.

Documentation

Architecture pages remain available for contributors who need implementation context.

License

MIT. See LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_fuzzer-0.5.0.tar.gz (502.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_fuzzer-0.5.0-py3-none-any.whl (661.3 kB view details)

Uploaded Python 3

File details

Details for the file mcp_fuzzer-0.5.0.tar.gz.

File metadata

  • Download URL: mcp_fuzzer-0.5.0.tar.gz
  • Upload date:
  • Size: 502.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.20

File hashes

Hashes for mcp_fuzzer-0.5.0.tar.gz
Algorithm Hash digest
SHA256 e79b48a492e66126421cdbb15270e94cc63f540fefc40baa71e3541480d3641c
MD5 7475c29b7cb437917d3174766aa5bb00
BLAKE2b-256 dc82ef7194abb327ee1f99daf5f27ca8ca824793d26e0ce6ea91777c39172cb7

See more details on using hashes here.

File details

Details for the file mcp_fuzzer-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: mcp_fuzzer-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 661.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.20

File hashes

Hashes for mcp_fuzzer-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 99e59c45375c3acdee9b8dba7d6c245de5b4af6e638b7fbd66cc89a51ccf0aac
MD5 504f330bed7b7345e9eb75d42563e49c
BLAKE2b-256 a0d7a2bf5c3961d34a630ba7991fb426073bcd22bfabe2acef0e63a5e3070e71

See more details on using hashes here.

Release history Release notifications | RSS feed

0.7.0

2 files

0.6.0

2 files

This release

0.5.0 This release

2 files

0.4.3

2 files

0.4.2

2 files

0.4.0

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.9

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page