imgfactory
Pemrosesan gambar untuk agen AI: dimensi, deduplikasi pHash, membaca dan menghapus EXIF, memotong, mengubah ukuran, mengonversi, membuat thumbnail, dan memberi watermark. 79 operasi sebagai 16 alat MCP. Pembayaran USDC per panggilan di Base melalui x402, uji coba gratis 0,35 USDC per dompet, tanpa kunci API.
Server MCP Terhosting
npx add-mcp 'https://imgfactory.dartmate.workers.dev/mcp'Terpasang ke Claude Code, Codex, Cursor, dan lainnya
Dokumentasi
imgfactory — deterministic image ops for agents (x402 / MCP)
Image pipeline exposed as 80+ HTTP routes and 16 MCP tools, priced per call in USDC on Base (x402). Cheapest call $0.004. No account, no API key, no content moderation (NSFW-safe), images are processed in memory and not stored.
Hosted endpoint (ready to use): https://imgfactory.dartmate.workers.dev
- MCP:
https://imgfactory.dartmate.workers.dev/mcp(streamable HTTP,X-WALLET: <0x address>header) - Catalog:
https://imgfactory.dartmate.workers.dev/v1/ops· Agent docs:/llms.txt - Free trial:
GET /v1/credits/trial?wallet=<0x address>→ 0.35 USDC, once per wallet - Official MCP registry:
io.github.NeU-dev/imgfactory - Listed on Glama:
(directories: Glama, Arcade/Smithery gateway, official MCP registry, x402 Bazaar)
- Listings: https://koskamo.com/explore/imgfactory · https://github.com/NeU-dev/imgfactory-mcp
- Tested with Pillow only (no model weights);
selftest.pyhas 262 assertions.
MCP tools
img_analyze_dimensions img_analyze_phash img_analyze_qr_scan img_thumbs_thumbnail
img_thumbs_og_image img_thumbs_contact_sheet img_convert_to_jpg img_convert_to_webp
img_convert_image_to_pdf img_resize_w512 img_resize_w1024 img_watermark_text
img_nsfw_mosaic_full img_jp_ogp_1200x630 + img_catalog (search all 80 ops) + img_op (any op).
Connect (Claude Code)
claude mcp add --transport http imgfactory https://imgfactory.dartmate.workers.dev/mcp \
-H "X-WALLET: 0xYourAddress"
Pricing (x402, USDC on Base)
- 1 call = 0.004–0.005 USDC, settled only on HTTP 200; 4xx/5xx are refunded automatically
- Prepaid packs: 5 / 20 / 50 USDC (
POST /v1/credits/purchase?pack=5, then call with onlyX-WALLET) - Batch:
POST /v1/jobs/submit, price = n × 0.005 USDC (min 0.10, up to 100 images)
Self-host
python -m venv .venv && ./.venv/bin/pip install -r requirements.txt
export ROOT=/path/to/state # .wallet/, ledger.db, logs, .well-known/ live here
export PAYTO=0xYourReceivingAddress # USDC on Base
./.venv/bin/uvicorn imgfactory.app:app --port 8080
./.venv/bin/python imgfactory/selftest.py # 262 assertions
Environment: ROOT (state dir), LEDGER_DB, ACCESS_LOG, AGENT_VISITS, PAYTO,
PAYMENT_VERIFY=dev (skip facilitator verification for local work), see imgfactory/app.py.
How payment works
- Call any
/v1/*route →402withaccepts[](payTo, amount, asset, networkbase) - Sign an EIP-3009
transferWithAuthorizationand resend withX-PAYMENT(v1, base64 JSON) orPAYMENT-SIGNATUREtogether withx402-version: 2 - Settlement happens only when a result is served. Jobs are refunded on failure.
Notes
- Optical/semantic checks are deterministic (Pillow), no model weights required.
- NSFW: no moderation, nothing is blurred unless you ask for it. Applicability of Japanese
child-pornography law is judged by the caller — see
/legalon the hosted instance. - Forensics of the first 104 settlements (all self-paid) are in
docs/104pay_forensics.md.