npm @picdefenseio/mcp-serverstreamable-httpMITupdated 2mo ago
A Model Context Protocol server for the PicDefense.io API β let AI agents run reverse-image risk analysis, EXIF extraction, image backlink discovery, and image content detection (face / landmark / logo / label / SafeSearch) on any image URL.
What can you do with picdefenseio mcp server?
PicDefense.io MCP Server
A Model Context Protocol server for the PicDefense.io API β let AI agents run reverse-image risk analysis, EXIF extraction, image backlink discovery, and image content detection (face / landmark / logo / label / SafeSearch) on any image URL.
Features
- π Per-user authentication β each connection carries its own PicDefense API token; the server holds no keys
- π Dual transport β modern Streamable HTTP (
/mcp) and legacy SSE (/sse) - π§° 11 tools covering the full PicDefense API v2
- π³ Docker-ready β production container behind nginx
- π Built-in docs β Swagger UI at
/docs
Tools
| Tool | Description |
|---|---|
picdefense_get_credits |
Remaining account credit balance |
picdefense_check_image_risk |
Reverse-image risk analysis + picrisk score (core tool) |
picdefense_extract_exif |
Extract EXIF metadata (camera, timestamps, GPS) |
picdefense_detect_face |
Detect a human face in an image |
picdefense_detect_landmark |
Detect a recognizable landmark |
picdefense_detect_logo |
Detect a brand logo |
picdefense_safesearch |
Content-safety (adult/violence/racy/β¦) assessment |
picdefense_find_backlinks |
Find pages where an image appears |
picdefense_detect_labels |
Detect descriptive labels for image contents |
picdefense_extract_text |
Extract text from an image via OCR |
picdefense_detect_watermark |
Detect a visible stock/photographer watermark (source + confidence) |
All image tools take a single url (a public http/https image URL). Most tools
consume account credits per call β use picdefense_get_credits to check your balance.
Authentication
Every request authenticates with your PicDefense API token, which is your user id and API key joined by a colon:
USERID:APIKEY
Find both in your PicDefense.io account settings: https://app.picdefense.io/?returnUrl=https://app.picdefense.io/dashboard/settings
The token is sent as the X-API-TOKEN header to the API (https://app.picdefense.io/api/v2).
Quick start
Hosted server (recommended)
The hosted server runs at https://mcp.picdefense.io. Add it to Claude Code:
# Streamable HTTP (recommended)
claude mcp add -t http picdefense "https://mcp.picdefense.io/mcp" \
--header "X-API-Token: USERID:APIKEY"
# or SSE
claude mcp add -t sse picdefense "https://mcp.picdefense.io/sse?token=USERID:APIKEY"
Quick HTTP smoke test:
curl -X POST https://mcp.picdefense.io/mcp \
-H "Content-Type: application/json" \
-H "X-API-Token: USERID:APIKEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
Claude Desktop (hosted)
Claude Desktop launches MCP servers as local commands, so reach the hosted server
through the mcp-remote bridge (requires
Node.js installed). See claude_desktop_config.example.json:
{
"mcpServers": {
"picdefense": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.picdefense.io/sse?token=YOUR_USERID:YOUR_APIKEY"
]
}
}
}
Edit your claude_desktop_config.json (Settings β Developer β Edit Config), add the
mcpServers block above with your USERID:APIKEY, then fully quit and reopen Claude Desktop.
Testing against a plain-HTTP server (e.g.
http://<host>:6910) instead of HTTPS?mcp-remoteblocks non-HTTPS origins unless the host islocalhostβ append"--allow-http"to theargsarray, or reach it over an SSH tunnel tolocalhost.
Local (stdio) via npx β no clone needed
Run the published package directly. Requires Node.js installed.
{
"mcpServers": {
"picdefense": {
"command": "npx",
"args": [
"-y",
"@picdefenseio/mcp-server",
"--api-token",
"USERID:APIKEY"
]
}
}
}
You can also pass the token via the PICDEFENSE_API_TOKEN env var instead of --api-token.
Local (stdio) from source
Clone and build, then point Claude Desktop at the built entry point:
git clone https://github.com/rchanllc/picdefenseio-mcp-server.git
cd picdefenseio-mcp-server
npm install
npm run build
Then use "command": "node" with "args": ["/absolute/path/to/dist/index.js", "--api-token", "USERID:APIKEY"].
Configuration
| Variable | Default | Description |
|---|---|---|
PICDEFENSE_API_TOKEN |
β | USERID:APIKEY (stdio only; hosted server reads it per-connection) |
PICDEFENSE_API_BASE_URL |
https://app.picdefense.io/api/v2 |
API base URL |
PORT |
6910 |
Hosted server listen port |
Running the hosted server
Development
npm run dev:sse # tsx watch, auto-reload
Production (Docker)
# via docker compose
docker compose up --build -d
# or the helper script (handles build + health check)
./deploy.sh
The container is named picdefenseio_mcp and listens on port 6910.
HTTP endpoints
| Method | Path | Purpose |
|---|---|---|
| GET | /health |
Health check (used by Docker + CI) |
| GET | /api/info |
Server + transport info |
| GET | /tools |
List available tools |
| GET | /docs |
Swagger UI for the underlying API |
| GET | /sse?token=USERID:APIKEY |
Open an SSE MCP session |
| POST | /messages?sessionId=<id> |
SSE session message channel |
| POST | /mcp |
Streamable HTTP MCP (header X-API-Token) |
Self-hosting
There is no CI/CD in this repo β host it yourself. On your server:
git clone https://github.com/rchanllc/picdefenseio-mcp-server.git
cd picdefenseio-mcp-server
docker compose up --build -d # or: ./deploy.sh
The container is named picdefenseio_mcp and listens on 6910. To update,
git pull and re-run docker compose up --build -d.
Front it with nginx at https://mcp.picdefense.io β 127.0.0.1:6910
(proxy_buffering off and a long read timeout are recommended for the /sse path).
Architecture
ββββββββββββββββ ββββββββββββββββββββββββββ βββββββββββββββββββββββββββ
β MCP Client βββββΆβ PicDefense MCP Server βββββΆβ PicDefense.io API v2 β
β (Claude etc.)β β (port 6910) β β app.picdefense.io/api/v2β
ββββββββββββββββ ββββββββββββββββββββββββββ βββββββββββββββββββββββββββ
token (USERID:APIKEY) forwarded as X-API-TOKEN ββββββββββββΆ
Each connection builds its own API client + MCP server bound to the caller's token, so the service is multi-tenant and stateless with respect to credentials.
License
MIT β see LICENSE.
Install
Add picdefenseio mcp server to your client. Pick the one you use.
{
"servers": {
"mcp-server": {
"type": "http",
"url": "https://mcp.picdefense.io/mcp"
}
}
}Add to `.vscode/mcp.json` in your workspace.
claude mcp add mcp-server -- npx -y @picdefenseio/mcp-servercodex mcp add mcp-server -- npx -y @picdefenseio/mcp-serveramp mcp add mcp-server -- npx -y @picdefenseio/mcp-server{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@picdefenseio/mcp-server"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@picdefenseio/mcp-server"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@picdefenseio/mcp-server"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@picdefenseio/mcp-server"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@picdefenseio/mcp-server"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"mcp-server": {
"type": "local",
"command": "npx",
"args": [
"-y",
"@picdefenseio/mcp-server"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"mcp-server": {
"command": {
"path": "npx",
"args": [
"-y",
"@picdefenseio/mcp-server"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y @picdefenseio/mcp-serverRun `goose configure`, choose **Add Extension β Command-line Extension**, and paste this command.
11 tools
picdefenseio mcp server exposes 11 tools to a connected agent.
- picdefense_get_credits
- Remaining account credit balance
- picdefense_check_image_risk
- Reverse-image risk analysis + **picrisk** score (core tool)
- picdefense_extract_exif
- Extract EXIF metadata (camera, timestamps, GPS)
- picdefense_detect_face
- Detect a human face in an image
- picdefense_detect_landmark
- Detect a recognizable landmark
- picdefense_detect_logo
- Detect a brand logo
- picdefense_safesearch
- Content-safety (adult/violence/racy/β¦) assessment
- picdefense_find_backlinks
- Find pages where an image appears
- picdefense_detect_labels
- Detect descriptive labels for image contents
- picdefense_extract_text
- Extract text from an image via OCR
- picdefense_detect_watermark
- Detect a visible stock/photographer watermark (source + confidence)
Score
80 / 100
Excellent
- Documentation25/25
- Maintenance16/25
- Trust16/20
- Capability8/15
- Install experience15/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 69 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 11 tool(s) documented
- Provides prompt templates
- Provides resources
- 18 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint β no local install
Version history
| Versions | Published |
|---|---|
| 1.0.1Latest | Jun 1, 2026 |
| 1.0.0 | Jun 1, 2026 |