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

Uploaded Python 3Windows ARM64

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

Uploaded Python 3Windows x86-64

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

Uploaded Python 3

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

Uploaded Python 3macOS 11.0+ ARM64

mcp_assert-0.12.1-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.1-py3-none-win_arm64.whl.

File metadata

  • Download URL: mcp_assert-0.12.1-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.1-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 0025b2b95ea5684e26885ea6d40e1558d95bcec22fb5cd7f937af8deaae0e66e
MD5 8064d7cfd40ee2516450163ff491ea76
BLAKE2b-256 916d966d0048ffc1223d5e54050863d8b2e1626073e7242a447c8f67add025c8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mcp_assert-0.12.1-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.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 e169e593cc2295d0a5ff6c190c8634767ba81d777eeff1354d27ff43bfc89105
MD5 5b1e1b64b893793802a290c897b1b93a
BLAKE2b-256 ec8a6f0ced4f45d792f7a4cbbf2dd5d586583e8b22d253460630dc92afed7bf9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mcp_assert-0.12.1-py3-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c4f4a0f40459863fc2596ea8763acc4f3333f193d9cce3c66d53786bda5e12ee
MD5 14bb019a1ea751d3f1cded2d1d2c3d31
BLAKE2b-256 1886e8bdf4c7e84d17dcb456be7fda87c4e2c632df19bd73353096e905e86dd9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mcp_assert-0.12.1-py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 6b773cd00d4bf4c120bff63d316df9869c6956ccf252ea79089e3d00ec0ba0ad
MD5 d4788c9379428a07b5eb0b8b978ff580
BLAKE2b-256 8edbe95ac005cd39800a787659e58bf8f97b1b0572935844d115a5f348ea43f9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mcp_assert-0.12.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 986ae96cd250ca0c48d0bf812a10b32ab8e0816f55031732a06809ae10d0b702
MD5 e091c06ca6ceb4a49f58d6bde7a645aa
BLAKE2b-256 518069aa402124e4c568c39e01fef29c881b0350e53829baab4993d7c6e4a4e7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mcp_assert-0.12.1-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 14abe3cf822f995a859fc87214a0cb2b87eb204fae69d2af19ed9f122ca019ee
MD5 751b030611b0bbedfaa95e4474d522d9
BLAKE2b-256 5a0aa19e4dfda649e2039c5d5fd7dc8434fef324c087382efa8ad16e348e9a07

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