AI Detection MCP
Detect AI-generated images, deepfakes, voice clones, AI music and AI-written text from Claude, Cursor, Codex, VS Code and Windsurf — powered by the AI or Not detection API over the Model Context Protocol.
The AI or Not AI detection MCP puts detection right inside your assistant. Once connected, you can ask your AI assistant questions like “Is this image AI-generated?” or “Check this clip for deepfakes” and it will call AI or Not for you — images, video, voice, music and text, plus batch scanning.
PREREQUISITES
An AI or Not API key
Free from your dashboard. Authenticates every request.
uv / uvx (Python 3.10+)
Runs the server and manages Python for you. Install below.
A supported client
Claude Code, Claude Desktop, Cursor, Codex, VS Code or Windsurf.
No uv yet? Install it once — macOS / Linux: curl -LsSf https://astral.sh/uv/install.sh | sh · Windows: irm https://astral.sh/uv/install.ps1 | iex (in PowerShell). Docs: docs.astral.sh/uv.
STEP 1 · API KEY
Open the API page in your dashboard, create a key, and copy it. You’ll paste it as AIORNOT_API_KEY in the next step.
STEP 2 · ADD THE SERVER
Pick your tool. Replace your_api_key with the key from Step 1.
One CLI command — available in every project.
Register the server
-s usermakes it global; drop it to scope to the current repo.Terminalclaude mcp add -s user aiornot \ -e AIORNOT_API_KEY="your_api_key" \ -- uvx --from "aiornot[mcp]" aiornot-mcp
Keep your key safe
MCP config files store your key in plaintext. Don’t commit them to git (add .cursor/mcp.json, .vscode/mcp.json and .codex/config.toml to .gitignore), prefer user/global scope, restrict permissions with chmod 600, and rotate any key that leaks.
STEP 3 · VERIFY
Fully restart your client, then ask the assistant to validate the token. Expect is_valid: true:
{ "is_valid": true, "expires_at": null }Then try a real detection — point your assistant at a file or URL:
- Is ~/Downloads/photo.jpg AI-generated or a deepfake?
- Check this clip for deepfakes: https://example.com/clip.mp4
- Was this written by AI? <paste 250+ words>
AI DETECTION TOOLS OVER MCP
aiornot_check_tokenValidate your API key and confirm the connection.
aiornot_analyze_image_fileDetect AI-generation, deepfakes, NSFW and quality on a local image.
aiornot_analyze_text · _text_fileDetect AI-written text (requires ≥250 words).
aiornot_analyze_video_file · _video_urlDetect deepfakes / AI generation in video.
aiornot_analyze_voice_file · _voice_urlDetect AI-cloned or synthetic speech.
aiornot_analyze_music_file · _music_urlDetect AI-generated music.
aiornot_batch_scanScan an entire folder for a modality and write JSONL results.
aiornot_batch_csvAnalyze paths or text listed in a CSV and write JSONL results.
WHAT YOU GET BACK
Real responses from the MCP server (lightly trimmed). Image results include a deepfake verdict with regions of interest and a per-generator breakdown.
{
"report": {
"ai_generated": {
"verdict": "ai",
"ai": { "is_detected": true, "confidence": 0.977 },
"generator": {
"four_o": { "is_detected": true, "confidence": 0.697 },
"flux": { "is_detected": false, "confidence": 0.163 }
}
},
"deepfake": {
"is_detected": true,
"confidence": 0.930,
"rois": [{ "bbox": { "x1": 382, "y1": 520, "x2": 569, "y2": 708 } }]
},
"nsfw": { "is_detected": false },
"quality": { "is_detected": true }
}
}{
"report": { "ai_text": { "is_detected": true, "confidence": 0.99999 } },
"metadata": { "word_count": 100, "character_count": 756, "token_count": 119 }
}TROUBLESHOOTING
“uvx: command not found”
Install uv (it ships uvx), then restart your terminal or client so the new PATH (`~/.local/bin`) is picked up.
Server doesn’t appear after editing JSON
Fully quit and reopen the client — closing the window is not enough. Then validate the JSON: no trailing commas, balanced braces, escaped Windows backslashes.
401 / invalid token
Double-check AIORNOT_API_KEY. Keys are read in order: AIORNOT_API_KEY → AIORNOT_API_TOKEN → ~/.aiornot/config.json. Ask your assistant to run aiornot_check_token.
Text analysis returns a 400 error
The text endpoint requires at least 250 words. Shorter inputs are rejected — paste a longer sample.
Python version error
The server needs Python 3.10+. uv can install and manage a compatible interpreter for you automatically.
Ready to detect AI images, deepfakes and voice from your assistant?
Grab an API key, add the server, and start detecting — about two minutes.