SFW API

v0.1.2
dev.sfwapi/mcp Checked 4 days ago Published 4 days ago

Nudity detection for images, GIFs and videos: a level from 0 to 3 and a blocked or allowed verdict.

MCP server for the SFW API: nudity detection for images, GIFs and videos as tools for Claude Code, Claude Desktop, Cursor, VS Code, Codex and any other MCP client. A result carries the content level (0 Everyday, 1 Revealing, 2 Implied nudity, 3 Explicit), a 0-100 score per level, and flags for drawn content and adult objects. Pass block_level to get a blocked/allowed decision. One credit per image or analysed frame; failed calls are free; 500 free credits a month. Media is processed in memory and never stored. Get a free key at and put it in SFWAPI_API_KEY.

Summary extracted from the README.

@sfwapi/mcp

MCP server for the SFW API: nudity detection for images, GIFs and videos as tools for Claude Code, Claude Desktop, Cursor, VS Code, Codex and any other MCP client.

Tool What it does
analyze_url Analyse media at a public URL
analyze_file Analyse a local file (uploaded to the API)
get_account Credit balance, plan limits and this month's usage

A result carries the content level (0 Everyday, 1 Revealing, 2 Implied nudity, 3 Explicit), a 0-100 score per level, and flags for drawn content and adult objects. Pass block_level to get a blocked/allowed decision. One credit per image or analysed frame; failed calls are free; 500 free credits a month. Media is processed in memory and never stored.

Install

Get a free key at https://sfwapi.dev/console and put it in SFWAPI_API_KEY.

Claude Code

claude mcp add sfwapi -e SFWAPI_API_KEY=sk_live_... -- npx -y @sfwapi/mcp

Cursor (.cursor/mcp.json), Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "sfwapi": {
      "command": "npx",
      "args": ["-y", "@sfwapi/mcp"],
      "env": { "SFWAPI_API_KEY": "sk_live_..." }
    }
  }
}

Codex (~/.codex/config.toml)

[mcp_servers.sfwapi]
command = "npx"
args = ["-y", "@sfwapi/mcp"]
env = { SFWAPI_API_KEY = "sk_live_..." }

No install: the hosted endpoint

https://api.sfwapi.dev/mcp serves the same tools over Streamable HTTP, without analyze_file (a hosted server cannot read your disk). Send the key as Authorization: Bearer sk_live_...:

claude mcp add --transport http sfwapi https://api.sfwapi.dev/mcp --header "Authorization: Bearer sk_live_..."

Setup for every client: https://sfwapi.dev/mcp. Tool reference: https://sfwapi.dev/docs/mcp. The HTTP API behind the tools is documented at https://sfwapi.dev/docs, pricing at https://sfwapi.dev/pricing.

Environment

Variable
SFWAPI_API_KEY Required. Your API key.
SFWAPI_BASE_URL Optional. Defaults to https://api.sfwapi.dev.

Node 20 or newer. MIT licence.