Docs

Use AppSafe from your AI coding tool

Connect AppSafe to Claude Code, Cursor or any other MCP client, or call the REST API from your own scripts. Your agent can scan a verified site, read each finding's fix prompt, apply the fix and recheck it, all in one loop.

The API, the MCP server and report exports are included in the Pro, Agency and Team plans.

1. Create an API key

Go to Dashboard → Account → API keys, name a key and copy it. It's shown only once, and AppSafe stores just a hash. Keys start with appsafe_ and only work on your own sites.

2. Connect the MCP server

The server uses Streamable HTTP at the URL below and authenticates with your API key as a bearer token. Replace YOUR_KEY with your key.

https://appsafe.dev/api/mcp

Claude Code

Run this once, or add the JSON to .mcp.json in your project:

claude mcp add --transport http appsafe https://appsafe.dev/api/mcp \
  --header "Authorization: Bearer YOUR_KEY"
{
  "mcpServers": {
    "appsafe": {
      "type": "http",
      "url": "https://appsafe.dev/api/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_KEY"
      }
    }
  }
}

Cursor

Add this to ~/.cursor/mcp.json, or to .cursor/mcp.json in your project:

{
  "mcpServers": {
    "appsafe": {
      "url": "https://appsafe.dev/api/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_KEY"
      }
    }
  }
}

Other MCP clients: use the same URL and Authorization header.

Tools

The loop

  1. Ask your agent to scan your site with AppSafe.
  2. It reads the Markdown report and applies each fix prompt, most severe first.
  3. You deploy the changes, because AppSafe scans the live site.
  4. The agent rechecks each finding until it's fixed.

Example prompt: “Scan myapp.com with AppSafe, fix the critical and high findings, and recheck them after I deploy.”

REST API

Base URL: https://appsafe.dev/api/v1. Send your key in the Authorization header as Bearer YOUR_KEY. The OpenAPI spec describes every endpoint.

EndpointWhat it does
GET /sitesList your sites
POST /scansStart a full scan of a verified site (siteId or url)
POST /sites/{id}/scansRe-scan one site
GET /scans/{id}Scan status, score, grade and severity counts
GET /scans/{id}/findingsFindings with evidence, fix prompt and recheck ref
GET /scans/{id}/report?format=markdownReport as markdown, json or sarif
POST /findings/recheckRecheck one finding by its ref

Example

curl -X POST https://appsafe.dev/api/v1/scans \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://myapp.com"}'

curl "https://appsafe.dev/api/v1/scans/SCAN_ID/report?format=markdown" \
  -H "Authorization: Bearer YOUR_KEY"

Report exports

Every completed scan can be exported as Markdown written for AI agents (evidence, affected URL, fix prompt and how to verify each finding) or as SARIF 2.1.0 for code scanning tools. Download them from the scan in your dashboard, or use the report endpoint.

Limits and safety