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
- Documentation
- GitHub
- Error Reference (24 error codes)
- Scorecard (102 servers scanned, 4,794 issues found)
- pytest plugin
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_assert-0.12.2-py3-none-win_arm64.whl.
File metadata
- Download URL: mcp_assert-0.12.2-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9deb12176fedde184df0c299f0b54d3362a37abeaf3d6bd983c335ed781c2e1c
|
|
| MD5 |
94bc93b9da79a5076ffc7bdd601ef999
|
|
| BLAKE2b-256 |
3566a8634c0c5dfd1cc08092e9bb69452ab4726e8250c056371245a204c2ad0b
|
File details
Details for the file mcp_assert-0.12.2-py3-none-win_amd64.whl.
File metadata
- Download URL: mcp_assert-0.12.2-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca7caf3cf88611a75a80819e42c73a31f7df4cc25fa57786057b636d01d32b55
|
|
| MD5 |
8d97949257e7842934a001bd388c6eb0
|
|
| BLAKE2b-256 |
350dd2924db57957371ca9e58600ab25b8df05ea6cbe02e508dd403a07e43db5
|
File details
Details for the file mcp_assert-0.12.2-py3-none-manylinux2014_x86_64.whl.
File metadata
- Download URL: mcp_assert-0.12.2-py3-none-manylinux2014_x86_64.whl
- Upload date:
- Size: 6.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae7a7b1b37c369e2962a7061827fa5b23bfc2c4bb9b345c8b8e8cd2decadd289
|
|
| MD5 |
6017a5da2754117827fd64de312a72f0
|
|
| BLAKE2b-256 |
97ee5afb932d5f0682a20ceedf3b1b411bcabce55664a57943a072baa34cbb8e
|
File details
Details for the file mcp_assert-0.12.2-py3-none-manylinux2014_aarch64.whl.
File metadata
- Download URL: mcp_assert-0.12.2-py3-none-manylinux2014_aarch64.whl
- Upload date:
- Size: 6.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8374542a889735cb0f6d9b419fe60b10729e1c614be14813c9f941f7edce4cd
|
|
| MD5 |
7e378b2ea3c4f343901f5b191120c5b3
|
|
| BLAKE2b-256 |
47b78da386a534005f1b76de27868fad32bcc86d999d54ad3a714d7437e725c5
|
File details
Details for the file mcp_assert-0.12.2-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: mcp_assert-0.12.2-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 6.5 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
873de2d5d2a2f0bfbba9b267d4db08f422ee30cd6632ff8243d29605049d247f
|
|
| MD5 |
3a551a5331d56540b1a592d763fa51ad
|
|
| BLAKE2b-256 |
ef20be8cafb74750cc460f740f165c48a20a8161e3ef162b2b91d71f950cb984
|
File details
Details for the file mcp_assert-0.12.2-py3-none-macosx_10_12_x86_64.whl.
File metadata
- Download URL: mcp_assert-0.12.2-py3-none-macosx_10_12_x86_64.whl
- Upload date:
- Size: 6.7 MB
- Tags: Python 3, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f877ed994e088c43a3ee2bd59ea425a2148b41d90aeeb00bb9c6508131006d5b
|
|
| MD5 |
7369076c2b551f38a4bd852570e303f4
|
|
| BLAKE2b-256 |
d06f9b694a06520f9eda0c6595b8076469603894644e814355d827ee277f1351
|