Your agent can make images now. AI image & video generation for Claude Code, Claude Desktop, Cursor — any MCP client.
One command to install. Your agent browses 45+ image models and 3 video models, learns how each one wants to be prompted, generates, sees the finished image right in the conversation — and iterates until it's right. From $0.003 per image, no subscription.
claude mcp add imference -e IMFERENCE_API_KEY=your-api-key -- npx -y imference-mcp
→ list_models · 45 image models
→ get_model("hassaku-anima")
→ get_model("anime-v1")
→ generate(model: hassaku-anima, format_code: portrait-large)
Delivered in one attempt — the agent saw the image, checked it matched, and billed $0.003.
Why an agent does this better than a text box
The server doesn't just expose “generate” — it gives the agent everything a power user knows.
It sees what it makes
Finished images are embedded straight into the tool result. The agent judges its own output against your request and refines the prompt — no blind generation.
It picks the right model
list_models exposes every model's style family,
prompting style (booru tags vs natural language), cost and capabilities.
get_model adds the full card: recommended
quality prefix, default negative prompt, and the exact parameter bounds the API validates against.
It frames like a designer
Predefined formats — square, portrait, landscape-wide and more — instead of raw pixel math. The format also carries the price multiplier, so the cost is known before generating.
It can pay its own way
Use a prepaid API key — or let the agent pay per generation in USDC on Base via x402, no account at all, with hard spending caps you control.
Set up in a minute
Requires Node.js 18+. The server itself is free and open source — you only pay for generations.
claude mcp add imference -e IMFERENCE_API_KEY=your-api-key -- npx -y imference-mcp
{
"mcpServers": {
"imference": {
"command": "npx",
"args": ["-y", "imference-mcp"],
"env": { "IMFERENCE_API_KEY": "your-api-key" }
}
}
}
- 1. Get an API key and credits on the pricing page — or skip the key entirely and pay per image from a wallet (see below).
- 2. Add the server with the command or JSON above, restart your client.
- 3. Ask for an image. “Pick the best model for it” works.
First launch note: npx downloads the package on first run. If your MCP
client times out during that cold start and the server never comes up afterwards, clear the npx cache
(rm -rf "$(npm config get cache)/_npx") or install permanently with
npm i -g imference-mcp and use imference-mcp as the command.
45+
image models — realism, anime, pixel art…
3
video models, audio included
$0.003
starting price per image
$0
subscription — pay only for what you generate
Eleven tools, zero glue code
Catalog, generation, payments and downloads — everything the agent needs, discoverable on its own.
| Tool | Purpose |
|---|---|
| list_models | Model overview for picking: kind, style family, prompt style, cost, capabilities |
| get_model | One model in full: description, prompting recommendations, exact parameters & bounds |
| list_formats | Predefined output formats per model (square, portrait, landscape-wide…) |
| generate | Submit a generation and wait; embeds the finished image in the result |
| check_status | Poll a still-running generation (videos take longer) |
| download_media | Save an image or video to a local file |
| get_balance | Remaining credits of the API key |
| list_media | Previously generated media, newest first |
| buy_credits_with_wallet | Top up (or mint) an API key with one USDC payment |
| wallet_balance | USDC balance of the configured wallet (read-only) |
| payment_config | Which payment rails are configured, caps, session spend |
No account? Pay per image from a wallet
Set IMFERENCE_WALLET_PRIVATE_KEY and the server answers
HTTP 402 challenges with a signed USDC payment on Base — gasless for the payer, no ETH needed.
Spending is capped before anything is signed:
IMFERENCE_X402_MAX_USD per payment (default $10) plus an
optional session cap. Generating a lot? buy_credits_with_wallet
tops up an API key with a single on-chain payment.
⚠️ The key gives the server signing power over that wallet's USDC — use a dedicated hot wallet funded with only what the agent should be able to spend, and keep the caps on. The key never leaves the process and is never exposed through any tool output.
x402 documentation →Prefer an app? Imference Desktop runs models on your own GPU — free, private, no per-image cost. Prefer raw HTTP? The API is one endpoint away — it's the same catalog and the same prices everywhere.
Give your agent eyes and a paintbrush
One command, 45+ models, and an agent that sees what it creates. MIT-licensed, open on GitHub.