forgemesh-imagegen
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
**MCP server for AI image generation.** Generate images, remove backgrounds, upscale to 4x HD — all from a single MCP tool call. Payments handled automatically in USDC on Base mainnet via x402. No API key. No subscription. Pay per image.
Part of the ForgeMesh ecosystem — infrastructure for autonomous agents.
---
Tools
| Tool | What it does | Price |
|---|---|---|
| generate_image | Standard text-to-image generation | $0.25 USDC |
| generate_clean | Generate + background removal | $0.35 USDC |
| generate_hd | Premium generate + 4x upscale (HD) | $0.50 USDC |
| generate_pro | Top-tier generate + bg removal + 4x upscale | $0.75 USDC |
| list_presets | List the 58 identity-preserving transform presets (person or pet) | $0.005 USDC |
| transform_image | Transform a photo with a preset while keeping the subject's identity (FLUX Kontext Max) | $0.75 USDC |
The four generate_* tools accept prompt (required) and aspect (optional: 1:1, 16:9, 9:16, 4:3).
transform_image takes a public image_url, a preset id from list_presets, an optional aspect (match_input_image default, or 1:1, 16:9, 9:16, 4:3, 3:4) and wait (default true: polls the free status URL until the PNG is ready, usually 15-30s). Submit only images you have rights to; no minors; the provider safety filter applies.
---
Install
Claude Desktop
Add to claude_desktop_config.json:
Claude Code
Then set the env var:
---
Requirements
- A **dedicated, low-balance** Base mainnet wallet private key with USDC (never your primary wallet: the server signs USDC transfers autonomously)
- $1 USDC ≈ 4 base images, 2 clean, 2 HD, or 1 pro, or 1 transform
- No other API keys needed
Get USDC on Base: Coinbase → Bridge to Base, or buy directly on Base.
---
Example usage
---
How it works
Each tool call makes an HTTP request to the ForgeMesh imagegen service gated by the x402 protocol. If payment is required, the MCP automatically signs and broadcasts a USDC transfer from your wallet on Base mainnet — then retries the request. You see the result, your wallet is charged, no manual steps.
- Network: Base mainnet (eip155:8453)