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.3-py3-none-win_arm64.whl (6.0 MB view details)

Uploaded Python 3Windows ARM64

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

Uploaded Python 3Windows x86-64

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

Uploaded Python 3

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

Uploaded Python 3macOS 11.0+ ARM64

mcp_assert-0.12.3-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.3-py3-none-win_arm64.whl.

File metadata

  • Download URL: mcp_assert-0.12.3-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.3-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 4aafa6d7240c59aa359d5896eba2a9732bd72b7e7cce9358eecbccc47b281c39
MD5 b6697e7361b84521e7407d6e930efcfc
BLAKE2b-256 4c4039151f8868843ac1b8d78a216873141b5b35c5db99e86ae69c89962fe8ad

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mcp_assert-0.12.3-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.3-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 aff4cb96224b118c97651027aa5145b3277ac1143f1cfe481492cbe4ffddc236
MD5 8279bdd7e66f2c792f5331b6fdd2f14e
BLAKE2b-256 b4b978d689b8bc724564b741729a1cdd0323eda577ec284f6279971effc20ee5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mcp_assert-0.12.3-py3-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 16edd89e772d893e0c23282c307fcc6279e0c8ed2b108811fec96a8e6b78e407
MD5 c320076624c78c3b5479577e0edb80c7
BLAKE2b-256 fb282115526eac01d212775b2fc2cda51c6eab589fccc995d4a6ee7330f28ec2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mcp_assert-0.12.3-py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 9e6d5188c0564e642be182d1a65c992f85683562699261d271e952a724e30286
MD5 0aa17a5b6819cc135a1afd1b569f8ddc
BLAKE2b-256 92be0b50d6d019af2664fba94326b1af0e3b53f44a2bf2ea4d1e751d45cdf016

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mcp_assert-0.12.3-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9f6bf85abd920ab4727631144c792218b23f3d3ba65f363de64a546eff6b0eb7
MD5 f3561dfbb4558fab6b9bc9c4d2229f00
BLAKE2b-256 8fa96cc344c506a9e9e71427c4af9b3c211076809472dcadc0c4874149e0ed12

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mcp_assert-0.12.3-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0850c08db1fd40e6c26739c8edf32bcbec04e59712be615fd71f1c02554fdc35
MD5 61a5c2b94318d71da33bd269aefe9937
BLAKE2b-256 430d86caac443efe96c1563d07192f52d2d464d3963606d0bacd69dd0e8c33b4

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