Recraft Mcp Server

io.github.muhammetali由 GitHub 帳號 muhammetali 發布v1.0.0更新於 Oct 24, 2026

Recraft AI Image Generation MCP Server for AI coding agents

已驗證STDIO僅桌面開發者工具媒體與設計

概覽

AI 產生的概覽

讓助理透過 Recraft AI API 生成、轉換、放大與向量化圖片,支援本機檔案處理並回報每次呼叫的費用。

可以做什麼
提供 28 個工具,涵蓋 Recraft 圖片 API:跨模型與風格的文字生圖、針對精靈圖與圖示的指定尺寸生成、批次與主題素材集、風格比較網格、圖生圖、局部重繪、背景替換或生成、畫布擴充、變體、材質替換、背景移除、向量化、清晰與創意放大、區域擦除、提示詞增強,以及自訂風格管理。生成類工具會回傳小尺寸內嵌預覽,方便模型檢視結果,且每次呼叫都會回報其點數費用。也可下載圖片,並執行生成-下載-去背-儲存的本機檔案流程。
適用情境
適合批次製作圖片素材、處理磁碟上既有檔案,或在花費前需要知道一次執行的點數成本時使用。若只是偶爾生成單張圖片,使用託管版 Recraft 端點設定更簡單。
執行需求
透過 npx 或 Docker 在本機執行的程序;需要 Node.js 20.9.0 或更新版本。需要 Recraft 帳號,並透過 RECRAFT_API_KEY 環境變數提供 API 金鑰。需要連線至 Recraft API 的網路。使用 Docker 時需加 -i 參數,寫入檔案的工具有需要綁定掛載目錄。
安裝前請注意
需要 RECRAFT_API_KEY 密鑰,該密鑰可存取帳號的 Recraft 點數。操作會消耗付費 API 點數,且費用差異很大,批次執行前應查看餘額與回報的費用。工具會寫入本機路徑的檔案,並可永久刪除自訂風格。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Recraft Mcp Server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

🎨 Recraft MCP Server

[npm version] [License: MIT] [MCP Compatible]

A Model Context Protocol (MCP) server that gives AI assistants (Claude, Gemini, or any MCP client) direct access to the Recraft AI image generation API — generate, transform, upscale, and vectorize images without leaving your chat.

"Generate a set of 8 fantasy game icons in the same art style." "Remove the background from this screenshot and upscale it." "Create 5 style variations of this logo and put them in a comparison grid."

Coming from the official server?

Recraft archived @recraft-ai/mcp-recraft-server in July 2026 and now points users at a hosted endpoint, https://mcp.recraft.ai/mcp. Which of the three you want depends on what you are doing:

Recraft hostedThis server
SetupOAuth in a browser, no API keynpm install + API key
Tools928
BillingSubscription creditsAPI units, and every tool reports what its call cost
Local filesNo — URLs and base64 onlyReads and writes files on your machine
Batch / pipelinesNoGenerate → download → background-remove → save, themed sets, comparison grids
Style managementCreate onlyCreate, list, inspect, delete

If you only generate the occasional image, the hosted server is less work and this one has nothing to offer you. If you are producing assets in bulk, working from files already on disk, or need to know what a run costs before it runs, that is what this exists for.

Tool name mapping

The names are the old ones with a recraft_ prefix, except where noted:

Official (archived)Here
generate_imagerecraft_generate_image
image_to_imagerecraft_image_to_image
remove_backgroundrecraft_remove_background
replace_backgroundrecraft_replace_background
crisp_upscalerecraft_crisp_upscale
creative_upscalerecraft_creative_upscale
create_stylerecraft_create_style
vectorize_imagerecraft_vectorize
get_userrecraft_check_credits

One behavioural difference worth knowing: Recraft's style field takes six broad families, and the specific look (pixel_art, kawaii, b_and_w…) is a separate substyle field. Passing a substyle name as style is silently ignored by the API. This server accepts either and routes it correctly, so prompts written against the old servers keep working.

🌟 Key Features

  • 🖼️ Text-to-image generation across all Recraft models (V4.1, V4 Styles, V4, V4 Vector/SVG, V4 Pro, V3, V2), with the full style taxonomy — 6 families × 104 substyles, generated from Recraft's own API spec rather than transcribed by hand
  • 🔁 Image transformation — image-to-image, inpaint, background replace/generate, outpaint (canvas expansion), variations
  • ✨ Enhancement — background removal, vectorization, crisp/creative upscale, region erase
  • 🔎 Discovery — open-ended exploration generation, "more like this," and automatic prompt enhancement
  • 🧩 Asset pipelines — one-call generate → download → background-remove → save, batch generation, themed asset sets with style consistency
  • 🎮 Game-dev extras — sized generation for sprites/icons, style comparison grids, texture/atlas swapping
  • 👁️ The agent can see what it made — generations come back with an inline preview alongside the URL, downscaled to fit a context budget. Without it a model can produce four variations and judge none of them
  • 💰 Every call reports its price — Recraft states the credit cost of each operation and this passes it through, so an agent can tell a 4-credit crisp upscale from a 250-credit creative one before it runs a batch of them
  • 🎨 Style management — create custom styles, then list, inspect and delete them

🛠️ Provided Tools

This MCP server exposes 28 tools to your AI agent — full coverage of the Recraft API.

Generation

ToolDescription
recraft_generate_imageText-to-image across all Recraft models, 70+ styles, color/text-layout control
recraft_generate_sizedGenerate at any target size (down to 64×64) — ideal for sprites/icons/UI
recraft_batch_generateGenerate multiple assets in sequence with full pipeline, resilient to per-asset failure
recraft_generate_themed_setA hero asset + matching style + all remaining symbols, generated with visual consistency
recraft_compare_stylesSame prompt across multiple styles, with an optional side-by-side comparison grid

Discovery

ToolDescription
recraft_exploreGenerate a diverse set of images for open-ended exploration of a prompt
recraft_explore_similarGenerate more images visually similar to a previous recraft_explore result
recraft_enhance_promptExpand a short prompt into a richer, more detailed one

Transformation

ToolDescription
recraft_image_to_imageTransform an existing image from a text prompt (strength-adjustable)
recraft_inpaintRegenerate masked regions of an image
recraft_replace_backgroundAI-generate a new background while keeping the subject
recraft_generate_backgroundFill masked background areas within the existing canvas
recraft_outpaintExpand the canvas beyond the image's original bounds with AI-generated content
recraft_variate_imageGenerate variations of an existing image
recraft_texture_swapReplace a region with new AI content — built for Spine atlas / spritesheet swaps

Enhancement

ToolDescription
recraft_remove_backgroundTransparent-PNG background removal
recraft_vectorizeRaster (PNG/JPG/WEBP) → SVG
recraft_crisp_upscaleClean upscale for graphics, icons, illustrations
recraft_creative_upscaleAI-detail upscale with face refinement for photos
recraft_erase_regionContent-aware removal of a masked region

Style management

ToolWhat it does
recraft_create_styleCreate a custom style from 1-5 reference images
recraft_list_stylesList the custom styles on the account — free, reads only
recraft_get_styleLook up one style by id — free, reads only
recraft_delete_styleDelete a style permanently
recraft_list_basic_stylesRecraft's built-in styles per model, live from the API

Assets & account

ToolDescription
recraft_create_styleBuild a custom, reusable style from 1–5 reference images
recraft_generate_assetFull pipeline: generate → download → optional bg-removal → save to file
recraft_download_imageSave an image URL to a local file
recraft_check_creditsCheck account info and remaining API credits

Previews and cost

Two behaviours worth knowing about, because they change what the agent can do.

Previews. Generation tools return a small inline image alongside the URL, so the model can actually look at the result — pick the best of four variations, notice that the background removal left a halo, see that the text came out garbled. Previews are downscaled until they fit a context budget (WebP, longest edge ≤768px, ≤700KB of base64) and capped at four per call, because an unbounded base64 blob costs more context than the image is worth.

Turn it off per call when the image is not being judged:

recraft_generate_image(prompt: "...", preview: false)

Cost. Every Recraft response states the credit cost of the call it served, and every tool here passes it through:

Model: recraftv4 | Size: 1024x1024 | Substyle: kawaii | Cost: 40 credits

This matters more than it sounds. A creative upscale costs 250 credits against a crisp upscale's 4 — 62× — and a themed set of 12 symbols runs to roughly 600. recraft_check_credits reads the balance, and the style-management tools are free reads, so an agent can look before it spends.

⚙️ Quick Start

Requires Node.js 20.9.0 or newer. Version 1.1.0 upgrades the native image-processing dependencies to address known libvips vulnerabilities; Node.js 18 is no longer supported.

1. Get a Recraft API key

Sign up at recraft.ai and grab an API key from your account settings.

2. Install & configure

bash
claude mcp add --scope user recraft \  -e RECRAFT_API_KEY=your-api-key-here \  -- npx -y recraft-mcp-server

Or add it manually to your MCP client config:

json
{  "mcpServers": {    "recraft": {      "command": "npx",      "args": ["-y", "recraft-mcp-server"],      "env": {        "RECRAFT_API_KEY": "your-api-key-here"      }    }  }}

Environment Variables

VariableDescription
RECRAFT_API_KEYYour Recraft AI API key

Docker

bash
docker build -t recraft-mcp-server .docker run -i --rm -e RECRAFT_API_KEY=your-key recraft-mcp-server

In an MCP client config:

json
{  "mcpServers": {    "recraft": {      "command": "docker",      "args": ["run", "-i", "--rm", "-e", "RECRAFT_API_KEY", "recraft-mcp-server"],      "env": { "RECRAFT_API_KEY": "your-key" }    }  }}

The container talks MCP over stdio and never opens a port, so -i is required and -p is not. It runs as an unprivileged user; tools that write files need the target directory bind-mounted (-v /path:/path).

🤖 Example AI Prompts

Game asset pipeline:

"Generate a themed set of 6 fantasy potion icons in the same style, then export a Pixi.js manifest." → recraft_generate_themed_set

Quick sprite generation:

"Generate a 64x64 pixel-art coin icon." → recraft_generate_sized

Style exploration:

"Show me this logo prompt in 4 different styles side by side." → recraft_compare_styles

Photo cleanup:

"Remove the background from this photo and upscale it for print." → recraft_remove_background → recraft_creative_upscale

Asset swapping:

"Swap the texture in this region of the spritesheet with a new design." → recraft_texture_swap

Canvas expansion:

"Widen this image to a 16:9 banner without cropping the subject." → recraft_outpaint

Open-ended exploration:

"Explore some ideas for a race car on a track, then give me more like the third one." → recraft_explore → recraft_explore_similar

Prompt polishing:

"Enhance this rough prompt before generating: 'red panda with a sign.'" → recraft_enhance_prompt

Development

bash
git clone https://github.com/muhammetali/recraft-mcp-server.gitcd recraft-mcp-servernpm installnpm run buildnpm testnpm run audit:securitynpm run verify

Version 1.2.0 uses the official modular MCP SDK v2 while preserving all 24 tools. See security policy and dependency review for release checks, dependency decisions, and necessary runtime capabilities.

📄 License

MIT — see LICENSE.

來源:README.md,提交 ecea09c

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分