TC

tamerintech/claude-code-generate-images-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

12 stars 3 forks 质量 66 趋势 9MIT

在 Claude 代码的 UI 编码过程中自动生成并插入图像资产, 使用 Azure OpenAI gpt-image-1 和 Flux-1.1 Pro 的 MCP 服务器

概览

一个本地的MCP服务器,它让克洛德代码(或其他工具)直接生成并保存图像到您的项目中,而您则使用相感代码. 它默认可以连接到Azure OpenAI,或者作为替代品. 双子座速度快,拥有宽大的免费分级,对大多数使用案例都大有帮助. Azure 支持流量 1.1 Pro和gpt-image-1 如果你需要更多的控制。 *,您询问页面或功能,也询问背景,图标,或插图,服务器将资产写入您的 repo,克洛德在代码中使用. *,设计工具与文件管理者之间不得打乱,要保持专注. *,提示和文件夹是您工作流程的一部分,所以结果保持排列. * 资产使用您的代码, 易于审查和更新。 你可以用英雄背景和分节艺术构建一个完整的网站,创建应用图标和登机插图,或者运送仍然看起来干净而专业的内部工具. 安装者检查先决条件、安装依赖性、创建或保存 .

概述(AI 翻译)

** 用于为您进行天气编码开发的 AI 驱动图像生成的开源本地 MCP 服务器**

一个本地的MCP服务器,它让克洛德代码(或其他工具)直接生成并保存图像到您的项目中,而您则使用相感代码. 它默认连接到Google双子座(Nano Banana),或者作为替代品的Azure OpenAI. 双子座速度快,拥有宽大的免费分级,对大多数使用案例都大有帮助. Azure 支持流量 1.1 Pro和gpt-image-1 如果你需要更多的控制。

∮它是什么,它为什么帮助∮

  • ** 您编辑器中的一行**, 您要一个页面或功能, 同时要查询背景、 图标或插图, 服务器会将资产写入您的 Repo, Claude 在代码中使用 。
  • ** Fewer 开关** 设计工具与文件管理器之间没有打乱,你保持专注.
  • ** 持续资产**,提示和文件夹是您工作流程的一部分,所以结果保持组织。 可复制*,资产与您的代码同住,易于审查和更新。

你可以用英雄背景和分节艺术构建一个完整的网站,创建应用图标和登机插图,或者运送仍然看起来干净而专业的内部工具.

– – . . .

# 快速启动, 安装器

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Claude Code Image Generation MCP Server

An open-source local MCP server for AI-powered image generation for your vibe coding development

A local MCP server that lets Claude Code (or other tools) to generate and save images directly into your project, while you vibe code. It connects to Google Gemini (Nano Banana) by default, or Azure OpenAI as an alternative. Gemini is fast, has a generous free tier, and works great for most use cases. Azure supports Flux 1.1 Pro and gpt-image-1 if you need more control.

What it is, and why it helps

  • One flow in your editor, you ask for a page or a feature, also ask for backgrounds, icons, or illustrations, the server writes assets into your repo, Claude uses them in code.
  • Fewer switches, no shuffling between design tools and file managers, you keep focus.
  • Consistent assets, prompts and folders are part of your workflow, so results stay organized.
  • Reproducible, assets live with your code, easy to review and update.

You can build a full website with hero background and section art, create app icons and onboarding illustrations, or ship internal tools that still look clean and professional.


Quick start, installer

Linux / macOS / WSL

git clone https://github.com/TamerinTECH/claude-code-generate-images-mcp.git
cd claude-code-generate-images-mcp
./install.sh

Windows PowerShell

git clone https://github.com/TamerinTECH/claude-code-generate-images-mcp.git
cd claude-code-generate-images-mcp
.\install.ps1

Windows PowerShell (if scripts are blocked)

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
.\install.ps1

The installer checks prerequisites, installs dependencies, creates or keeps .env, and can register the MCP server for Claude Code.


Manual setup

Do it by hand if you prefer.

  1. Install dependencies
npm install
  1. Create environment file
cp .env.example .env
  1. Set Azure variables in .env
AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com
AZURE_OPENAI_API_KEY=your-api-key
AZURE_OPENAI_DEPLOYMENT=flux-1-1-pro
AZURE_OPENAI_API_VERSION=2025-04-01-preview
  1. Register the MCP server in Claude Code Add an entry like,
{
  "mcpServers": {
    "image-generator": {
      "command": "node",
      "args": ["/claude-code-generate-images-mcp/src/index.js"]
    }
  }
}
  1. Run a quick check
node src/index.js

Working in Claude Code

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "image-generator": { "command": "node", "args": ["<absolute-path>/claude-code-generate-images-mcp/src/index.js"] } } }