# SLF Guardian

Pre-action security checks for AI agents. Call a check before the agent acts: open a link, install a package, run a shell or SQL command, follow untrusted text, or deliver code.

- Homepage: https://slfguardian.com
- MCP endpoint: https://mcp.slfguardian.com/mcp (streamable HTTP, JSON-RPC 2.0)
- Price: 0.01 USDC per call (x402, Base mainnet, eip155:8453)
- Pay to: 0x10aCe92514ca10242a5738C3B108f3195eF50974
- Discovery: https://mcp.slfguardian.com/.well-known/x402 · https://mcp.slfguardian.com/.well-known/mcp.json · https://mcp.slfguardian.com/.well-known/agent-card.json · https://mcp.slfguardian.com/openapi.json
- Support: team@slfguardian.com

## How to call (x402)

1. POST the tool arguments to `https://mcp.slfguardian.com/mcp/<tool>` without payment. You get HTTP 402 with a base64 `PAYMENT-REQUIRED` header (JSON: x402Version, accepts, resource, extensions.bazaar).
2. Sign an EIP-3009 transferWithAuthorization for exactly `accepts[0].amount` to `accepts[0].payTo` on `accepts[0].network`, using `accepts[0].asset` and `accepts[0].extra` as the token domain.
3. Retry the same request with the base64 payment payload in the `PAYMENT-SIGNATURE` header. The response is 200 with the tool result and a `PAYMENT-RESPONSE` header.

You are charged only when the tool succeeds. A repeated signature is never charged twice (24h). Invalid arguments return 402 before any work is done.

```bash
curl -s -X POST https://mcp.slfguardian.com/mcp/check_domain \
  -H 'content-type: application/json' \
  -d '{"domain":"example.com"}'
# 402 + PAYMENT-REQUIRED -> sign -> retry with PAYMENT-SIGNATURE
```

Free trial: 50 calls per IP per day, no signup (response headers `X-SLF-Free-Trial: true` and `X-SLF-Free-Trial-Remaining`). It resets daily at UTC midnight; after the daily quota the endpoint returns 402 and needs an x402 payment of 0.01 USDC.

## Tools

### audit_code

Call before running code you or another agent generated, or before delivering a repo as done: static audit returns a verdict plus line-numbered findings.

Endpoint: `POST https://mcp.slfguardian.com/mcp/audit_code`

```json
{
  "type": "object",
  "oneOf": [
    {
      "required": [
        "code"
      ]
    },
    {
      "required": [
        "files"
      ]
    }
  ],
  "properties": {
    "code": {
      "type": "string",
      "minLength": 1,
      "description": "Source code to audit (single file or snippet)."
    },
    "path": {
      "type": "string",
      "description": "Optional file name for the snippet."
    },
    "files": {
      "type": "array",
      "minItems": 1,
      "maxItems": 40,
      "description": "Several files instead of one snippet.",
      "items": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "minLength": 1
          },
          "content": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "path",
          "content"
        ]
      }
    }
  }
}
```

### check_package

Call before npm/pip install or when an agent names a dependency: verifies the package exists, is maintained, and is not a typosquat, returns safe_to_install.

Endpoint: `POST https://mcp.slfguardian.com/mcp/check_package`

```json
{
  "type": "object",
  "oneOf": [
    {
      "required": [
        "name"
      ]
    },
    {
      "required": [
        "packages"
      ]
    }
  ],
  "properties": {
    "ecosystem": {
      "type": "string",
      "enum": [
        "pypi",
        "npm"
      ]
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "description": "Package name."
    },
    "version": {
      "type": "string",
      "description": "Optional exact version to check."
    },
    "packages": {
      "type": "array",
      "minItems": 1,
      "maxItems": 20,
      "description": "Check several packages in one call.",
      "items": {
        "type": "object",
        "properties": {
          "ecosystem": {
            "type": "string",
            "enum": [
              "pypi",
              "npm"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "ecosystem",
          "name"
        ]
      }
    }
  }
}
```

### check_prompt

Call on any untrusted text, HTML or URL an agent is about to follow: returns a prompt-injection verdict and the exact matched span, so the agent can stop before acting.

Endpoint: `POST https://mcp.slfguardian.com/mcp/check_prompt`

```json
{
  "type": "object",
  "oneOf": [
    {
      "required": [
        "text"
      ]
    },
    {
      "required": [
        "html"
      ]
    },
    {
      "required": [
        "url"
      ]
    }
  ],
  "properties": {
    "text": {
      "type": "string",
      "minLength": 1,
      "description": "Plain text to check."
    },
    "html": {
      "type": "string",
      "minLength": 1,
      "description": "HTML including hidden markup."
    },
    "url": {
      "type": "string",
      "minLength": 1,
      "description": "Public page to fetch and check."
    }
  }
}
```

### check_command

Call before executing a shell or SQL command, especially destructive or irreversible ones: returns risk, reversibility and whether human approval is required.

Endpoint: `POST https://mcp.slfguardian.com/mcp/check_command`

```json
{
  "type": "object",
  "oneOf": [
    {
      "required": [
        "command"
      ]
    },
    {
      "required": [
        "commands"
      ]
    }
  ],
  "properties": {
    "command": {
      "type": "string",
      "minLength": 1,
      "description": "Command or statement to check."
    },
    "kind": {
      "type": "string",
      "enum": [
        "shell",
        "sql",
        "auto"
      ],
      "description": "Defaults to auto."
    },
    "commands": {
      "type": "array",
      "minItems": 1,
      "maxItems": 20,
      "description": "Check a sequence in one call.",
      "items": {
        "type": "object",
        "properties": {
          "command": {
            "type": "string",
            "minLength": 1
          },
          "kind": {
            "type": "string",
            "enum": [
              "shell",
              "sql",
              "auto"
            ]
          }
        },
        "required": [
          "command"
        ]
      }
    }
  }
}
```

### check_domain

Call before an agent opens a link, calls a webhook or trusts a login page: returns domain age, resolution and reputation with a safe_to_trust verdict.

Endpoint: `POST https://mcp.slfguardian.com/mcp/check_domain`

```json
{
  "type": "object",
  "oneOf": [
    {
      "required": [
        "domain"
      ]
    },
    {
      "required": [
        "domains"
      ]
    }
  ],
  "properties": {
    "domain": {
      "type": "string",
      "minLength": 1,
      "description": "Domain or full URL."
    },
    "domains": {
      "type": "array",
      "minItems": 1,
      "maxItems": 20,
      "items": {
        "type": "string",
        "minLength": 1
      },
      "description": "Check several in one call."
    }
  }
}
```

### scan_site

Call when you need a quick outside-in check of a website an agent will interact with: passive TLS, header and exposure findings with a 0-100 score.

Endpoint: `POST https://mcp.slfguardian.com/mcp/scan_site`

```json
{
  "type": "object",
  "properties": {
    "domain": {
      "type": "string",
      "minLength": 1,
      "description": "Domain or URL, e.g. example.com"
    }
  },
  "required": [
    "domain"
  ]
}
```
