MCP servers
Add an MCP server
Save an MCP server to your organization, mark it as a production server, and confirm that you own it so tests can call tools that change data.
A saved MCP server keeps a server's address and credentials so you don't paste them again. Add one on the MCP Servers page, then confirm ownership if you want tests to call tools that change data.
Before you start
- Who can change saved servers. Admins, Managers, Engineers and Security members can add, edit, delete and verify saved servers. Other roles can view them only.
- Shared or private. A server you add on this page is saved to My Servers, so only you can see it. Select Share with everyone to move it to Shared Servers. Then teammates who can run scans and tests use the credentials you saved without seeing them. Servers the CLI saves after a test are also private to you until you share them. A stdio server, or a save that matches a server that is already shared, stays shared. See Private and shared servers.
- Secrets are stored encrypted. Header values and the full address you entered are stored encrypted. The Label and the address, without credential-named query values, are also kept readable so they can be listed. When you edit a server you see the secrets you typed yourself; your teammates see
••••••••in place of header values. The server's address stays visible to everyone in your organization, so put tokens in the headers, not in the URL's path or query.
Add the server
- Select Samurai Quality in the header. It opens MCP Servers.
- Select Add new.
- Enter a Label, which is the name the server goes by in your lists and history.
- Paste the server's URL, or its JSON configuration, such as
{"mcpServers":{"github":{"url":"https://example.com/mcp","headers":{"Authorization":"Bearer <token>"}}}}. Put tokens in the headers, not in the URL. - Check Production server if this is a deployed endpoint.
- Optionally check Set as CLI default. See Add your first MCP server for what it does.
- Select Save server. The server appears in My Servers.
Saving a production server may make Guardian contact it right away to check ownership, and Guardian may send the credentials you saved. This can take a few seconds.
Production and development servers
Only saved servers marked Production can be scanned or tested from the MCP Servers page. Guardian never contacts a development server when you save it. Test those from your own machine with the CLI.
To promote a development server later, select Edit, check Production server, and save.
Ownership states
Each production server shows one of three chips. The Production chip appears once ownership is confirmed:
- Read-only: until you confirm ownership, tests skip every tool that Guardian judges could change data, based on the tool's annotations, name and description.
- Production: ownership is confirmed. Tests may call tools that change data. Safe mode is still on by default; each member who runs tests switches it off for themselves on each server.
- Blocked: Guardian won't run this server.
How ownership is confirmed
Guardian checks ownership when you save a production server and again when you select Verify now. Test runs only read the stored result. Only servers with an https address can be confirmed.
Your company's email domain. If the server's address is under the same domain as the email address of an active member of your organization (for example, a member at example.com covers mcp.eu.example.com), ownership is confirmed automatically once Guardian reaches the server. No paid plan or terms are needed.
Any other production server needs a paid plan and an Admin's acceptance of the mutable-tests terms, and then one proof:
- Serve a file. Make the File address shown under Confirm ownership (usually
https://<your-host>/.well-known/guardian-verification) return exactlygdn-verify=<your-code>as the whole body, with status 200, over https and with no redirect. For example, in nginx:
location = /.well-known/guardian-verification {
default_type text/plain;
return 200 'gdn-verify=<your-code>';
}
- Add a line to the server's instructions. Put a line that is exactly
gdn-verify=<your-code>in theinstructionsyour MCP server returns frominitialize. Guardian asks without your credentials, so the server must return these instructions to aninitializerequest that carries no credentials. This doesn't count on multi-tenant SaaS hosts. - Credential check. This is automatic when you saved a credential, and needs no setup. It doesn't run on multi-tenant SaaS or shared hosting hosts, or when the URL's path looks like it holds a key. Guardian confirms that the server refuses a request with no credential and a request with a random credential (401 or 403), and only then sends the credential you saved.
To confirm a server:
- Select Confirm ownership on the server's row. Saving a server doesn't open it.
- Copy the Verification code. It is the value you publish on your server to prove you own it, not a credential to give Guardian. It is shown once, so copy it before you close the dialog. Show a new code replaces it, and a code expires after 30 days. Only an Admin or the member who entered the server's credentials can get a code.
- Set up a proof.
- Select Verify now.
When ownership is checked again
Saving any change to a server, including its credentials or the Production flag, sets it back to Read-only (until you confirm ownership) and turns Safe mode back on. Guardian then checks it again right away. Guardian staff can also block a server.
Verify now results
- Ownership confirmed. The server is confirmed and shows the Production chip.
- Guardian didn't find the verification code. Check the file or the instructions, then try again.
- Guardian couldn't reach the server. Try again later.
- Not everything is in place yet. Unless the server is on your company's email domain, it needs a paid plan, an Admin's acceptance of the mutable-tests terms, and an https address that can be confirmed.
- The owner of this server has opted out. Guardian can't confirm it.
- This server is blocked. Guardian won't run it.
If you own a server and don't want it tested
If you own a server and don't want Guardian to run tests that change data against it, serve the body deny at https://<your-host>/.well-known/guardian-verification with status 200 and no redirect. Guardian then won't confirm ownership of that server, so its customers can't run tests that change data on it. Guardian may still save it and run read-only checks. To stop all traffic, or if the server is already confirmed, see Report Guardian traffic.