Tests
Run your first test
Test an MCP server's tools from your account, choose which test categories to run, and read the results.
A test lists the tools your MCP server offers and then calls them, checking that each one handles both valid and invalid input the way it should. Tests run from MCP Test in the Samurai Quality menu, and every run is saved to your test history.
Before you start
- Add the server first, as a production server. MCP Test lists your production servers. Add one on MCP Servers with Production server checked, as described in Run your first scan. It must be reachable by URL from the internet. Local (stdio) servers are never started, so they show as "Not tested".
- Only test servers you own or have permission to test. Tests make real calls. If a tool changes data, sends messages or makes payments, that action will happen.
- Pick a safe environment. Point tests at a staging or test deployment when your tools have side effects.
Run a test
- Go to MCP Test in the Samurai Quality menu on the left.
- Find your server in the Production servers table.
- In its Test categories column, check the categories you want to run. Each one shows its average run time, and the estimated total underneath adds up the ones you've checked.
- Select Test on its row. Categories run one after another, so the more you check, the longer the run takes.
- When the run finishes, the results appear below the table, the row's Last tested and Tested by update, and the run is added to Test history.
A test calls the tools that only read data, using the token saved with the server. It calls tools that change data only on a server marked production. A server on your company's email domain is confirmed automatically, with no paid plan or terms needed. Any other server needs its ownership confirmed (select Confirm ownership on the MCP Servers page), a paid plan, and an Admin's acceptance of the mutable-tests terms. Otherwise those tools are skipped and listed as "skipped because they change data".
Safe mode
Each server row has a Safe mode switch next to Test. It is on by default.
- On: the row shows Read-only tools. Only tools marked read-only are called.
- Off: the row shows All tools. Tools that change data can also be called.
You can only turn Safe mode off for a server whose ownership is confirmed. On any other row it stays on and can't be changed. Each member sets Safe mode for themselves on each server, and saving any change to the server turns it back on.
Even with Safe mode off, tools that change data can still be skipped for the reasons above.
Test categories
Guardian Samurai builds the test cases from each tool's input schema, so you don't need to write any.
Functional
Calls each tool once with a valid value for every property its schema declares. It checks that the tool accepts a correct call and returns a result. The free test page runs functional tests only, and your account runs every category.
Negative
Sends calls the server should reject, and passes when the server rejects them. For each tool, Guardian Samurai:
- leaves out each required property, one at a time
- replaces a property with a value of the wrong JSON type
- adds a property the schema disallows (
additionalProperties: false) - passes an unexpected argument to a tool that declares no input properties
A tool that accepts any of these calls fails the test, because it isn't validating its input.
Performance
Calls each tool several times in a row with the same valid arguments and records the latency of each call. Use it to spot slow tools and inconsistent response times.
Reading the results
Results are grouped by tool, with a count of each outcome at the top and for every tool. Each test case has one of these outcomes:
- Pass: the tool behaved as expected. A valid call succeeded, or an invalid call was rejected.
- Fail: the call ran, but the outcome wasn't what the test expected. For example, an invalid call was accepted or a valid call was rejected.
- Skipped: the test case wasn't run against this tool.
- Couldn't run: the call didn't complete. The server couldn't be reached, the request was blocked or timed out, or the response couldn't be read. These cases never count as failures.