Getting started

Quick Start

Install the Guardian CLI, sign in to get your token, and run your first test, with copy-ready commands for macOS, Windows and Linux.

Only 3 steps to get your first test result

  1. Download the CLI tool
  2. Get your token
  3. Run a test

You need a Guardian Samurai account with the Admin, Manager or Engineer role, and an MCP server you own or have permission to test. A test makes real tool calls. The commands use the latest CLI version.

macOS

1. Download the CLI tool

Open Terminal and run the installer. It puts guardian in ~/.local/bin:

curl -q --proto '=https' --tlsv1.2 -fsS https://get.guardiansamur.ai/cli/vX.Y.Z/install.sh | sh

If the installer says ~/.local/bin isn't on your PATH, add it for this terminal:

export PATH="$HOME/.local/bin:$PATH"

Check that it works:

guardian version

The one-line installer trusts get.guardiansamur.ai. To check the release signature yourself first, follow Install the CLI instead.

2. Get your token

guardian login

Your browser opens the Approve CLI login page. Type the code the terminal printed from login, check the details, and select Approve. The CLI saves your token in the macOS keychain and never prints it.

3. Run a test

Test your MCP server. Replace HOST in both places with your server's host name, such as mcp.example.com (no https://, port or path), and /mcp with its path if it's different. Type y when asked to confirm:

guardian test --target-url https://HOST/mcp --allow-target HOST

Guardian plans the test from the server's tools, runs it from your machine, and uploads the result to Test history. If you've set a CLI default server, guardian test on its own tests that one.

4. Run a scan

Scan your MCP server. Replace HOST in both places with your server's host name, such as mcp.example.com (no https://, port or path), and /mcp with its path if it's different. Type y when asked to confirm:

guardian scan --target-url https://HOST/mcp --allow-target HOST

Guardian scans the server from your machine and uploads the result to Scan history. If you've set a CLI default server, guardian scan on its own scans that one.

Windows

1. Download the CLI tool

Open PowerShell and run the installer. It puts guardian.exe in %LOCALAPPDATA%\Programs\guardian and adds that folder to your PATH:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; & ([scriptblock]::Create((irm https://get.guardiansamur.ai/cli/vX.Y.Z/install.ps1))) -AddToPath

Open a new PowerShell window so it picks up the new PATH, then check that it works:

guardian version

The one-line installer trusts get.guardiansamur.ai. To check the release signature yourself first, follow Install the CLI instead.

2. Get your token

guardian login

Your browser opens the Approve CLI login page. Type the code the terminal printed from login, check the details, and select Approve. The CLI saves your token in Windows Credential Manager and never prints it.

3. Run a test

Test your MCP server. Replace HOST in both places with your server's host name, such as mcp.example.com (no https://, port or path), and /mcp with its path if it's different. Type y when asked to confirm:

guardian test --target-url https://HOST/mcp --allow-target HOST

Guardian plans the test from the server's tools, runs it from your machine, and uploads the result to Test history. If you've set a CLI default server, guardian test on its own tests that one.

4. Run a scan

Scan your MCP server. Replace HOST in both places with your server's host name, such as mcp.example.com (no https://, port or path), and /mcp with its path if it's different. Type y when asked to confirm:

guardian scan --target-url https://HOST/mcp --allow-target HOST

Guardian scans the server from your machine and uploads the result to Scan history. If you've set a CLI default server, guardian scan on its own scans that one.

Linux

1. Download the CLI tool

Open a terminal and run the installer. It picks the build for your processor and puts guardian in ~/.local/bin:

curl -q --proto '=https' --tlsv1.2 -fsS https://get.guardiansamur.ai/cli/vX.Y.Z/install.sh | sh

If the installer says ~/.local/bin isn't on your PATH, add it for this terminal:

export PATH="$HOME/.local/bin:$PATH"

Check that it works:

guardian version

The one-line installer trusts get.guardiansamur.ai. To check the release signature yourself first, follow Install the CLI instead.

2. Get your token

guardian login

Your browser opens the Approve CLI login page. Type the code the terminal printed from login, check the details, and select Approve. On a machine with no browser, such as over SSH, run guardian login --no-browser and open the page on any device. The CLI saves your token in the Secret Service and never prints it.

3. Run a test

Test your MCP server. Replace HOST in both places with your server's host name, such as mcp.example.com (no https://, port or path), and /mcp with its path if it's different. Type y when asked to confirm:

guardian test --target-url https://HOST/mcp --allow-target HOST

Guardian plans the test from the server's tools, runs it from your machine, and uploads the result to Test history. If you've set a CLI default server, guardian test on its own tests that one.

4. Run a scan

Scan your MCP server. Replace HOST in both places with your server's host name, such as mcp.example.com (no https://, port or path), and /mcp with its path if it's different. Type y when asked to confirm:

guardian scan --target-url https://HOST/mcp --allow-target HOST

Guardian scans the server from your machine and uploads the result to Scan history. If you've set a CLI default server, guardian scan on its own scans that one.

Next steps