Image Generation MCP Server
image-gen MCP サーバー
Stable Diffusion WebUI API (ForgeUI/AUTOMATIC-1111) を使用してテキストから画像への生成機能を提供する MCP サーバー。
インストール
前提条件
Node.js
API が有効になっている安定した Diffusion WebUI インスタンスへのアクセス
WebUIを起動するときには
--apiフラグが有効になっている必要があります
設定
リポジトリをクローンします。
git clone https://github.com/Ichigo3766/image-gen-mcp.git
cd image-gen-mcp依存関係をインストールします:
npm installサーバーを構築します。
npm run buildサーバー構成を環境に追加します。
{
"mcpServers": {
"image-gen": {
"command": "node",
"args": [
"/path/to/image-gen-mcp/build/index.js"
],
"env": {
"SD_WEBUI_URL": "http://your-sd-webui-url:7860",
"SD_AUTH_USER": "your-username", // Optional: if authentication is enabled
"SD_AUTH_PASS": "your-password", // Optional: if authentication is enabled
"SD_OUTPUT_DIR": "/path/to/output/directory",
"SD_RESIZE_MODE": "0", // Optional: upscaling mode (0=multiplier, 1=dimensions)
"SD_UPSCALE_MULTIPLIER": "4", // Optional: default upscale multiplier
"SD_UPSCALE_WIDTH": "512", // Optional: default upscale width
"SD_UPSCALE_HEIGHT": "512", // Optional: default upscale height
"SD_UPSCALER_1": "R-ESRGAN 4x+", // Optional: default primary upscaler
"SD_UPSCALER_2": "None" // Optional: default secondary upscaler
}
}
}
}環境変数を実際の値に置き換えます。
SD_WEBUI_URL: Stable Diffusion WebUIインスタンスのURLSD_AUTH_USER: 基本認証のユーザー名(有効な場合)SD_AUTH_PASS: 基本認証のパスワード(有効な場合)SD_OUTPUT_DIR: 生成された画像が保存されるディレクトリSD_RESIZE_MODE: デフォルトのアップスケーリングモード(乗数は0、寸法は1)SD_UPSCALE_MULTIPLIER: resize_mode が 0 の場合のデフォルトのアップスケール乗数SD_UPSCALE_WIDTH: resize_mode が 1 の場合のデフォルトのターゲット幅SD_UPSCALE_HEIGHT: resize_mode が 1 の場合のデフォルトのターゲットの高さSD_UPSCALER_1: デフォルトのプライマリアップスケーラモデルSD_UPSCALER_2: デフォルトのセカンダリアップスケーラモデル
Related MCP server: Image Generator MCP Server
特徴
ツール
generate_image- 安定拡散法を使用して画像を生成するパラメータ:
prompt(必須): 希望する画像のテキスト説明negative_prompt: 画像から除外するものsteps:サンプリングステップ数(デフォルト:4、範囲:1〜150)width: 画像の幅(デフォルト: 1024、範囲: 512-2048)height: 画像の高さ(デフォルト: 1024、範囲: 512-2048)cfg_scale: CFGスケール(デフォルト: 1、範囲: 1-30)sampler_name: サンプリングアルゴリズム(デフォルト: "Euler")scheduler_name: スケジューラアルゴリズム(デフォルト: "Simple")seed: ランダムシード(ランダムの場合は -1)batch_size: 生成する画像の数(デフォルト: 1、最大: 4)restore_faces: 顔の復元を有効にするtiling: タイル化可能な画像を生成するoutput_path: 生成された画像のカスタム出力パス
get_sd_models- 利用可能な安定拡散モデルのリストを取得しますパラメータは必要ありません
モデル名の配列を返します
set_sd_model- アクティブな安定拡散モデルを設定するパラメータ:
model_name(必須): アクティブに設定するモデルの名前
get_sd_upscalers- 利用可能なアップスケーラーモデルのリストを取得しますパラメータは必要ありません
アップスケーラー名の配列を返します
upscale_images- 安定拡散法を使用して1つまたは複数の画像を拡大しますパラメータ:
images(必須): アップスケールする画像ファイルのパスの配列resize_mode: 乗数モードの場合は 0、次元モードの場合は 1 (デフォルト: env から)upscaling_resize: resize_mode=0 の場合のアップスケール乗数(デフォルト: env から)upscaling_resize_w: resize_mode=1 の場合のターゲット幅(ピクセル単位)(デフォルト: env から)upscaling_resize_h: resize_mode=1 の場合のターゲットの高さ(ピクセル単位)(デフォルト: env から)upscaler_1: プライマリアップスケーラーモデル(デフォルト: envから)upscaler_2: セカンダリアップスケーラモデル(デフォルト: envから)output_path: アップスケールされた画像のカスタム出力ディレクトリ
発達
自動リビルドを使用した開発の場合:
npm run watchエラー処理
よくある問題と解決策:
Stable Diffusion WebUIが
--apiフラグ付きで実行されていることを確認してくださいMCPサーバーを実行している場所からWebUI URLにアクセスできるかどうかを確認します。
認証を使用する場合は、資格情報が正しいことを確認してください
出力ディレクトリが存在し、書き込み権限があることを確認します
アップスケールする場合、入力画像ファイルが存在し、読み取り可能であることを確認してください。
ライセンス
このMCPサーバーはMITライセンスに基づいてライセンスされています。つまり、MITライセンスの条件に従って、ソフトウェアを自由に使用、改変、配布することができます。詳細については、プロジェクトリポジトリのLICENSEファイルをご覧ください。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP Server that integrates with Stability AI's API to provide high-quality image generation, editing, and manipulation capabilities including background removal, outpainting, search-and-replace, and upscaling.8284MIT
- AlicenseBqualityDmaintenanceAn MCP server that allows users to generate images using Replicate's Stable Diffusion model and save them to the local filesystem.3MIT
- AlicenseBqualityDmaintenanceA server that integrates ComfyUI with MCP, allowing users to generate images and download them through natural language interactions.422Apache 2.0
- FlicenseAqualityDmaintenanceAn MCP server that provides a standardized interface for accessing WaveSpeed AI's image and video generation capabilities, including text-to-image, image-to-image, inpainting, and dynamic video generation.3
Related MCP Connectors
Generate AI images, video, music, and sound effects, and upscale them, from any MCP client.
An MCP server that integrates with Discord to provide AI-powered features.
MCP server for Flux AI image generation
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Ichigo3766/image-gen-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server