Skip to main content

How to run

Use native pytest to execute pytest-style tests. With uv:
Note: 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: a TestAgent bound to the session
Source: pytest_plugin.py

Markers

  • @pytest.mark.mcp_agent(<Agent|AgentSpec|name>): per‑test agent override
  • @pytest.mark.network, @pytest.mark.slow

Example

Full examples: test_pytest_style.py

Per-test agent override

Parametrization

Parametrization

Use standard @pytest.mark.parametrize for breadth, or mix with mcp-eval’s @parametrize in decorator tests.