Master TestSession and TestAgent for orchestrating tests, assertions, and metrics collection.
The Session API is the heart of mcp-eval testing. It manages your agent’s lifecycle, collects metrics, runs assertions, and produces comprehensive test results.
generate()
and assert_that()
async with test_session()
to ensure proper cleanup, even if tests fail.