How to run
Use native pytest to execute pytest-style tests. With uv:mcp-eval run
executes decorator- and dataset-style tests. Use pytest
for plain pytest tests.
Fixtures
mcp_session
: access the session (metrics, assertions)mcp_agent
: aTestAgent
bound to the session
Markers
@pytest.mark.mcp_agent(<Agent|AgentSpec|name>)
: per‑test agent override@pytest.mark.network
,@pytest.mark.slow
Example
Per-test agent override
Parametrization
Parametrization
Use standard@pytest.mark.parametrize
for breadth, or mix with mcp-eval’s @parametrize
in decorator tests.