Skip to main content

Deterministic correctness testing for MCP servers

Project description

mcp-assert

The testing standard for MCP servers. Lint, test, and fuzz. No SDK required. No LLM required.

This is the PyPI distribution of mcp-assert, a single Go binary that connects to your MCP server over stdio, SSE, or HTTP, runs 24 static analysis rules, calls tools with real arguments, and asserts results against YAML expectations.

Install

pip install mcp-assert

Usage

# Zero-config audit (finds crashes)
mcp-assert audit --server "python my_server.py"

# Static analysis (finds schema issues)
mcp-assert lint --server "python my_server.py"

# Auto-fix schema issues
mcp-assert lint --server "python my_server.py" --fix

# Adversarial fuzzing
mcp-assert fuzz --server "python my_server.py"

# Run YAML assertions
mcp-assert run --suite evals/

# CI with threshold
mcp-assert ci --suite evals/ --threshold 95

Or use as a Python module:

python -m mcp_assert lint --server "python my_server.py"

pytest Integration

pip install pytest-mcp-assert
pytest --mcp-suite evals/

Each YAML file becomes a pytest Item. Configure via pyproject.toml:

[tool.pytest.ini_options]
mcp_suite = "evals/"
mcp_fixture = "fixtures/"

Lint (24 Rules)

mcp-assert lint --server "python my_server.py"

  E  E103   create_user    Required parameter "email" has no description
  W  W109   search         User-facing parameter "query" has no examples
  W  W108   delete_user    Tool name implies mutation but description doesn't acknowledge

# Auto-generate fixes
mcp-assert lint --server "python my_server.py" --fix

# Strict mode for CI
mcp-assert lint --server "python my_server.py" --strict

Links

License

MIT

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

mcp_assert-0.12.0-py3-none-win_arm64.whl (6.0 MB view details)

Uploaded Python 3Windows ARM64

mcp_assert-0.12.0-py3-none-win_amd64.whl (3.4 MB view details)

Uploaded Python 3Windows x86-64

mcp_assert-0.12.0-py3-none-manylinux2014_x86_64.whl (6.7 MB view details)

Uploaded Python 3

mcp_assert-0.12.0-py3-none-manylinux2014_aarch64.whl (6.4 MB view details)

Uploaded Python 3

mcp_assert-0.12.0-py3-none-macosx_11_0_arm64.whl (6.5 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

mcp_assert-0.12.0-py3-none-macosx_10_12_x86_64.whl (6.7 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file mcp_assert-0.12.0-py3-none-win_arm64.whl.

File metadata

  • Download URL: mcp_assert-0.12.0-py3-none-win_arm64.whl
  • Upload date:
  • Size: 6.0 MB
  • Tags: Python 3, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for mcp_assert-0.12.0-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 80f521549a48581e7b78ebe5b8f4a843421dedeb642091c03ade72862afc5454
MD5 c2e9425ed5913b60e49b6b1a17c48eba
BLAKE2b-256 16816a1a8bd631410b2f8d943869b567a9025336e8600da5b07075891a907a23

See more details on using hashes here.

File details

Details for the file mcp_assert-0.12.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: mcp_assert-0.12.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for mcp_assert-0.12.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 1992fd05c90587fc1522375d3e706bc78b113557fdee26bf596d3a6fd7ed1a61
MD5 49fa1467b914378e7f37963b3a2585b1
BLAKE2b-256 d6cd849d936685a5ab7dad1b8a515178817a8d97e7624a82e6903f962767f146

See more details on using hashes here.

File details

Details for the file mcp_assert-0.12.0-py3-none-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mcp_assert-0.12.0-py3-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 afba484a879033bb4c4f79c31f4658dac1aaa71be5cf4ea783d2dbc8749e69c4
MD5 cee62e7239536f61625fc9773b6e581f
BLAKE2b-256 2c3abf7a34c0cbbe60e2b9450690e9746aa874904dde874ac0c85f8afe144de5

See more details on using hashes here.

File details

Details for the file mcp_assert-0.12.0-py3-none-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for mcp_assert-0.12.0-py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 722a7357040b7f0c56d006c77f9e11b2db481906e2a1bd1dd4aa299e6f1c7e02
MD5 9075d477ed4dcca1c8813368d42d9680
BLAKE2b-256 62aa2cdaf73cdb0126d08985316e763f0d48d2c12508fe911e83245a7e2a58a0

See more details on using hashes here.

File details

Details for the file mcp_assert-0.12.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mcp_assert-0.12.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 18fcb2801695942d9db82e62f220fa59c77383ebd4aaa2815e7e2d269728616d
MD5 cdbf1b902d776159992a6139db0cca3b
BLAKE2b-256 fba5bdc98451a201b09183563f23030bfd3e2930b03c01fff7bdea3d56c62a8b

See more details on using hashes here.

File details

Details for the file mcp_assert-0.12.0-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for mcp_assert-0.12.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 eff8551a1b820fa2776ec9d10e9f402d3d652d29b1a8e646a0a18a7944aa9c8b
MD5 beedefae78e2477e86a8490be37b1af4
BLAKE2b-256 87dd73319189b6829877f7f321abdbfdcb7e5a159e7779d1f94e7b2b21870f58

See more details on using hashes here.

Supported by

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