Minotaur

I spent a few days looking for a Playwright for MCP servers, and found that the hard part isn't calling the tools but proving that the many routes an agent can take all end in the same place.

Looking for a Playwright for MCP

The last few days, I've been using my spare brain multi-tasking capacity to try and work out how you really scale MCP server testing end to end, locally and in CI, in the same way you would use Playwright to test a web app.

Unit testing the tools is fine, that's easy enough. What I want is to test the whole system, so a real model connected to the real server, given a real request, and then a check that the right thing actually happened. I want to be able to run that locally before I push and then have it run again in CI on every pull request.

Promptfoo and Inspect

I started with promptfoo. It has an MCP provider that calls a server's tools directly, so you can test or red team the server itself, and its other integrations will hand the same tools to a model you're testing. It's all config driven and it's good at comparing models side by side.

The issue for us is that our main MCP repo is Python and promptfoo is very much a Node thing, so I moved on to Inspect, which is the evaluation framework from the UK AI Security Institute. It's open source, Python first, and it treats MCP servers as ordinary tools. There's mcp_server_stdio() for a local server, mcp_server_http() for a remote one, mcp_server_sandbox() if you want to run one inside a container, and mcp_tools() if you only want to give the agent some of a server's tools. It also already has datasets of samples, solvers, scorers and a log viewer, which is most of what you need for a test suite.

Lots of routes to the same place

Now the thing that makes this different from UI or API testing is that a Playwright test follows one route, click this, type that, expect this page, and an API test sends one request and checks one response. With an agent in the middle the same request can come in phrased a dozen ways, and the agent can call the tools in a different order, go off on a detour, retry or ask a clarifying question, and all of those are fine as long as it ends up in the right place.

So rather than checking the route you check where it ends up, and then try enough of the routes that you trust it. It's basically a maze of tests, which is why I've codenamed the project Minotaur.

Five test cases, each the same request phrased differently with a starting state. Four take different routes: direct, a detour through the wrong report, a retry after a timeout, and a clarifying question. All four reach the target end state of report archived, so they pass. The fifth deletes the report instead, a dead end that fails.Five test cases, each the same request phrased differently with a starting state. Four take different routes: direct, a detour through the wrong report, a retry after a timeout, and a clarifying question. All four reach the target end state of report archived, so they pass. The fifth deletes the report instead, a dead end that fails.

An illustrative maze. The routes differ, and the test only cares where each one ends.

Generating the combinations

The part I'm most interested in is generating the routes rather than writing them all by hand. If you think of a test case as a set of dimensions, the different ways a user might phrase the request, the state the system starts in, the tools the agent can see, then you can test the combinations and every one of them should reach the same outcome.

In Inspect that's just a dataset built from a product of those dimensions, something like this (the names are made up):

from itertools import product
from inspect_ai.dataset import Sample

phrasings = [
    "Archive the Q3 report",
    "Can you move the Q3 report into the archive?",
    "Q3 report is done, put it away",
]
starting_states = [
    "report_open",
    "report_closed",
    "report_already_archived",
]

dataset = [
    Sample(
        input=phrasing,
        target="report_archived",
        metadata={"start": start},
    )
    for phrasing, start
    in product(phrasings, starting_states)
]

Three phrasings and three starting states gives nine routes, all with the same target. Every dimension you add multiplies it, so this is where pairwise testing comes in, you don't need every combination, just enough that every pair of values meets at least once.

The closest thing to Playwright I found was mcp-eval, but its strongest assertions are about the route, was this tool called and in what order. τ-bench seems to go the other way. It scores an agent by comparing the state at the end of the conversation with a goal state, so the route is free to vary. I think that's the right approach: check where the agent ended up and then walk as many routes as you can afford to.

Next

Project Minotaur is where I'm putting this together, Inspect for the harness, generated combinations for the routes and a check on the end state for each of them. I'll post more once I have it running in CI.