Sign inTry it

How to test an MCP server before you rely on it

To test an MCP server, check four layers in order: the connection, each tool with good and bad input, the error paths and limits, and a live run against the real service. Wield's server, wield-mcp, has five tools, so the list is short. Start with npx -y wield-mcp doctor, then call each tool once. A failed live run is a finding to read, not a reason to guess.

Updated

What to test

The Model Context Protocol specification defines how a client discovers a server's tools and calls them. Each tool has a name, an input schema and a result. Test all five Wield tools:

ToolInput to testA good result
find_recipetask of 1 to 300 characters, optional site, limit from 1 to 10Ranked results with recipe_id, params_schema and effect. A hint when nothing matches
runrecipe_id, params that match params_schema, optional versionok: true with output, or an error with a code and a hint
list_sitesnoneSites and recipes, with logged_in set to true, false or null
statusnoneexecutor online, registry reachable, telemetry state, signatures verified
request_recipesite, task up to 300 characters, mode set to request or recordA request logged, or a recipe_id in record mode

Layer 1: the connection

Run the doctor first. It checks Node, the bridge, each browser's registration, the extension's connection and version, recipes, signatures, your account and your AI apps. It prints a fix for each problem it finds.

Then call status. You want executor online and signatures verified. If executor is offline, the browser is closed or the extension is not running.

Layer 2: good and bad input

Test each tool with input that should work and input that should fail:

  • find_recipe with an empty task, a 301-character task and limit: 11. Each should fail before any search runs.
  • run with a missing required param, and with a param of the wrong type. The result should be invalid_params, and nothing should be sent to the site.
  • run with a valid recipe_id and params. Check that the defaults from the schema were filled in.

Layer 3: errors and limits

Each error has a code and a hint. Check that the hint tells the agent what to do next:

CodeHow to trigger itExpected behavior
login_requiredRun a login recipe while logged outThe result carries a login_url. The agent asks you to log in
confirmation_deniedRun a write recipe and deny its Allow windowNothing is sent. Use a test account for write tests
origin_blockedNot reproducible by hand; check the logsNothing is sent, and the agent does not retry
recipe_unsignedNot reproducible by handNothing is sent. The agent reports it and does not retry
limit_exceededRun a site more often than its hourly pacing allowsThe message gives the wait time

Limits to confirm: 12 steps, 40 requests, 5 MB per response and 60 seconds per run. Time you spend on an Allow window does not count toward the 60 seconds.

Layer 4: a live check

Run npx -y wield-mcp check. It makes one live, read-only sample through your browser and ends with "Wield is ready" when it works. Then run npx -y wield-mcp speed --runs 10, which times find_recipe and run the way an agent calls them, with p50 and p90 for read recipes.

Open the executor log after a test. It lives at ~/.wield/logs/executor-YYYY-MM-DD.ndjson. It shows each request's method, host, path, status and time. It holds no bodies, no query values and no results, so you can confirm what was sent.

Testing a recipe

Recipe authors add a verify block to each recipe, with example_params and checks written as JMESPath expressions over the output. Run the recipe with its example params before you publish it. See the recipe format.

FAQ

Can I test without a live site?

Use the schema checks in layer 2 and the error table in layer 3. Live behavior needs a live site, and public recipes change when sites change.

Can I test without an AI app?

Yes. npx -y wield-mcp demo runs three sites from the terminal and prints every host your computer contacted. Any MCP client or SDK can call the five tools directly.

Should I test write recipes on a real account?

Test writes only on an account you can afford to change, and deny the Allow window when you test the denial path. Every write needs your click.

Sources

  1. Model Context Protocol specificationmodelcontextprotocol.io