Skip to content

NEWFree MCP Security Scanner: score any public MCP server against the OWASP MCP Top 10.Scan a server

Docs

Build with Ametriq

Check AI requests and agent actions with the AIGuard API, and scan your code with the Spectra CLI from your terminal or CI. Both write every decision and finding to your console, where your team reviews them.

  • AIGuard: call one endpoint before each model or tool step. Start here.
  • Spectra: run npx @ametriq/spectra scan . in any repository. Start here.
  • CyberShield: installed per device and managed from its dashboard. Setup guides are shared during your pilot. See where it runs.
  • Free MCP Security Scanner: no account needed. Paste a public Git URL for an MCP server and get a report mapped to the OWASP MCP Top 10. Scan a server.

Consoles and sign-in

Each product has its own console. Accounts are set up for your organisation when your pilot or plan starts.

AIGuard: evaluate a request

Send each prompt, and each tool call an agent wants to make, to POST /api/ai/evaluate before it runs. AIGuard checks it against your policy and returns a decision. Authenticate with a bearer token; your endpoint URL and credentials are issued when your workspace is set up.

Request
curl -X POST "$AIGUARD_URL/api/ai/evaluate" \
  -H "Authorization: Bearer $AIGUARD_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "tenantId": "acme",
    "userId": "u-4821",
    "prompt": "Refund order 7731 in full",
    "chatContext": { "appId": "support-agent" },
    "requestedTools": [{
      "type": "mcp",
      "server": "payments",
      "toolName": "refund",
      "arguments": { "orderId": "7731", "amount": 18400 }
    }]
  }'
Example response
{
  "requestId": "5c0e9a2f-…",
  "decision": "EscalateForApproval",
  "riskSummary": { "totalScore": 0.82, "riskLevel": "High" },
  "triggeredPolicies": ["payments.refund.above-agent-limit"],
  "reasons": ["Refund is above the amount this agent may approve"],
  "recommendedUserMessage": "This refund needs a person to approve it."
}

Request fields

All fields are JSON, in camelCase. Send the ones that apply to the step you are checking.

FieldTypeWhat it is
tenantIdstringYour workspace. Policies, evidence and approvals are kept separate per tenant.
userIdstringThe person or service the request is for.
sessionIdstringGroups requests from one session.
promptstringThe prompt or instruction to check.
chatContextobjectconversationId and appId, so decisions are tied to the right app.
requestedToolsarrayTool calls the agent wants to make: type (for example mcp), server, toolName and arguments.
browserSignalsobjectOptional. Set by CyberShield when it is deployed alongside AIGuard.

Response fields

FieldTypeWhat it is
requestIdstringUse it to find the decision and its evidence in the console.
decisionstringOne of the five decisions below.
blockedbooleanTrue when the request must not go ahead.
riskSummaryobjectAn overall risk score and level for the request.
triggeredPoliciesstring[]The policies that matched.
reasonsstring[]Plain-language reasons for the decision.
recommendedUserMessagestringA message you can show the user.
modelOutputstring | nullWhen AIGuard is your model gateway: the answer, after output checks. Null when blocked or escalated.
redactedOutputstring | nullThe answer with sensitive data masked, when the decision is Redact.
processedAttimestampWhen the decision was made.

Decisions

Act on the decision before running the model or the tool.

DecisionWhat your app should do
AllowIn policy. Go ahead.
AllowWithWarningGo ahead, and show the user the recommended message.
RedactGo ahead with redactedOutput instead of the raw answer.
BlockStop. Show the user the recommended message.
EscalateForApprovalHold the action until a person approves it in the console.

Streaming

POST /api/ai/evaluate/stream takes the same request. When AIGuard is your model gateway, it streams the answer as it is generated and checks the output on the way. Each event has a type and a sequence number; text events carry text, and the final event carries the full decision in result.

Spectra CLI: install and scan

The Spectra CLI (@ametriq/spectra on npm, Apache 2.0, no runtime dependencies) packages the source code in a folder, uploads it to Spectra, starts a scan and can wait for the result. You need Node.js 20 or newer and a Spectra account with the Member, Admin or Owner role.

  1. In the Spectra console, open Settings → API tokens and create a token. It starts with spk_ and is shown once.
  2. Preview the upload. A dry run needs no token and uploads nothing.
  3. Put the token in SPECTRA_TOKEN and run the scan. The CLI reads the token only from the environment, so it never lands in your shell history.
Terminal
npx @ametriq/spectra scan . --dry-run

export SPECTRA_TOKEN=spk_...
npx @ametriq/spectra scan . --wait
Output
Packaging 412 files (3.1 MB) from /home/alex/code/my-service
  upload complete; the server is unpacking it
Scan started: run 96fd0fd8-953c-4c18-81cf-3894e644ff49
  scanning
  completed
Scan completed: run 96fd0fd8-953c-4c18-81cf-3894e644ff49
  25 findings. Review them in the Spectra console.

Inside a git repository, only tracked and untracked-but-not-ignored source files are uploaded. Vendored, generated and minified code, binaries and symbolic links are left out. Add --list to a dry run to see every file and why.

Options

Usage: spectra scan [folder] [options]. The folder defaults to the current folder.

OptionWhat it does
--dry-runShow what would be uploaded, then exit. No token, no upload.
--listWith --dry-run, list every file and why it was included or excluded.
--waitWait for the scan to finish and report the result.
--timeout <time>How long --wait waits, such as 90s, 30m or 1h. Default 30m.
--llm <mode>LLM verification of findings: off (default), cloud, council or local.
--name <name>The project name shown in the console. Default: the folder's name.
--help, --versionShow help, or the CLI's version.

Run in CI

Store the token as a CI secret named SPECTRA_TOKEN, never in the repository. A scan with findings does not fail the job; the CLI exits 0 whenever the scan completes. Review findings in the console.

GitHub Actions
# .github/workflows/spectra.yml
name: Spectra scan
on:
  push:
    branches: [main]
  workflow_dispatch:
jobs:
  scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: "20"
      - run: npx @ametriq/spectra@0.1.3 scan . --wait --timeout 45m
        env:
          SPECTRA_TOKEN: ${{ secrets.SPECTRA_TOKEN }}
GitLab CI
# .gitlab-ci.yml
spectra-scan:
  image: node:20
  script:
    - npx @ametriq/spectra@0.1.3 scan . --wait --timeout 45m

Exit codes

CodeMeaning
0The scan started (without --wait), completed (with --wait), or the dry run finished.
2The scan failed or was cancelled. The reason is printed.
3--wait ran out of time. The scan is still running in Spectra.
4The scan couldn't start or be followed: a usage mistake, a missing or rejected token, or a network problem.
130You interrupted the CLI. A scan that had already started keeps running.

Support and security

Questions, or something not working? Write to contactus@ametriq.ai and include the request ID or scan run ID. To report a security issue in Ametriq, write to the same address; see the trust center for how we handle your data.