AiGeekSquad.ImageGenerator 1.0.70

dotnet tool install --global AiGeekSquad.ImageGenerator --version 1.0.70
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local AiGeekSquad.ImageGenerator --version 1.0.70
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=AiGeekSquad.ImageGenerator&version=1.0.70
                    
nuke :add-package AiGeekSquad.ImageGenerator --version 1.0.70
                    

AiGeekSquad.ImageGenerator

A .NET MCP (Model Context Protocol) tool for AI-powered image generation using various providers including OpenAI (DALL-E, GPT Image models) and Google (Imagen).

Features

  • 🎨 Multiple Providers: Support for OpenAI and Google AI platforms
  • 🔧 Extensible Architecture: Easily add custom image generation providers
  • 🎯 Latest Models: Support for DALL-E 3, GPT Image 1, GPT-5 Image (future), and Imagen 3
  • 🔄 Response API: Iterative image manipulation with edits and variations
  • 🛠️ MCP Integration: Works seamlessly with MCP-compatible AI assistants
  • Modern C#: Built with .NET 9.0 and latest C# features
  • Well Tested: Comprehensive test coverage using xUnit
  • 📦 NuGet Package: Easy installation as a global .NET tool

Supported Operations

Generate Images

Create images from text prompts using various AI models.

Edit Images

Modify existing images based on text descriptions (OpenAI DALL-E 2).

Create Variations

Generate variations of existing images (OpenAI DALL-E 2).

List Providers

Get information about available providers and their capabilities.

Supported Models

OpenAI

  • dall-e-3 - Latest high-quality image generation
  • dall-e-2 - Previous generation (supports edits and variations)
  • gpt-image-1 - New GPT-based image generation
  • gpt-5-image - Future GPT-5 image capabilities (placeholder)

Google

  • imagen-3.0-generate-001 - Latest Imagen model
  • imagen-3.0-fast-generate-001 - Optimized for speed
  • imagegeneration@006 - Imagen 2

Installation

dotnet tool install --global AiGeekSquad.ImageGenerator

Update Existing Installation

dotnet tool update --global AiGeekSquad.ImageGenerator

From Source

git clone https://github.com/AIGeekSquad/image-generator.git
cd image-generator
dotnet pack src/AiGeekSquad.ImageGenerator.Tool/AiGeekSquad.ImageGenerator.Tool.csproj --configuration Release
dotnet tool install --global --add-source ./nupkg AiGeekSquad.ImageGenerator

Configuration

Environment Variables

# OpenAI (required for OpenAI provider)
export OPENAI_API_KEY="your-openai-api-key"

# Optional: Azure OpenAI
export OPENAI_ENDPOINT="https://your-resource.openai.azure.com"

# Google (optional)
export GOOGLE_PROJECT_ID="your-google-cloud-project-id"

appsettings.json

Alternatively, create an appsettings.json file in the tool's directory:

{
  "OpenAI": {
    "ApiKey": "your-openai-api-key",
    "Endpoint": "",
    "DefaultModel": "dall-e-3"
  },
  "Google": {
    "ProjectId": "your-google-cloud-project-id",
    "Location": "us-central1",
    "DefaultModel": "imagen-3.0-generate-001"
  }
}

Usage

As an MCP Server

Add to your MCP configuration (e.g., in GitHub Copilot or Claude Desktop):

{
  "mcpServers": {
    "image-generator": {
      "command": "aigeeksquad-imagegen",
      "args": [],
      "env": {
        "OPENAI_API_KEY": "your-api-key"
      }
    }
  }
}

Command Line

After installation, run the tool:

aigeeksquad-imagegen

The tool starts an MCP server that communicates via stdio.

MCP Tools

generate_image

Generate an image from a text prompt.

Parameters:

  • prompt (required): Text description of the image
  • provider: Provider to use (default: "OpenAI")
  • model: Model to use (e.g., "dall-e-3", "gpt-image-1")
  • size: Image size (e.g., "1024x1024", "1792x1024")
  • quality: Image quality ("standard" or "hd")
  • style: Image style ("vivid" or "natural")
  • numberOfImages: Number of images to generate (default: 1)
edit_image

Edit an existing image based on a prompt.

Parameters:

  • image (required): Base64 encoded image or URL
  • prompt (required): Description of desired changes
  • mask: Optional mask image
  • provider: Provider to use (default: "OpenAI")
  • model: Model to use (default: "dall-e-2")
  • size: Output image size
  • numberOfImages: Number of images to generate (default: 1)
create_variation

Create variations of an existing image.

Parameters:

  • image (required): Base64 encoded image or URL
  • provider: Provider to use (default: "OpenAI")
  • model: Model to use (default: "dall-e-2")
  • size: Output image size
  • numberOfImages: Number of variations (default: 1)
list_providers

List all available providers and their capabilities.

Architecture

Core Components

  • AiGeekSquad.ImageGenerator.Core: Core library with abstractions and provider implementations

    • IImageGenerationProvider: Interface for image generation providers
    • IImageGenerationService: Service for managing multiple providers
    • ImageProviderBase: Base class for easy provider implementation
    • ProviderCapabilities: Metadata about provider capabilities
  • AiGeekSquad.ImageGenerator.Tool: MCP server implementation

    • ImageGenerationTools: MCP tool implementations
    • Program.cs: Server configuration and startup
  • AiGeekSquad.ImageGenerator.Tests: Comprehensive test suite using xUnit

Extensibility

Adding a new provider is straightforward:

  1. Create a class that inherits from ImageProviderBase
  2. Implement the required abstract members
  3. Register the provider in Program.cs

Example:

public class CustomImageProvider : ImageProviderBase
{
    public override string ProviderName => "Custom";
    
    protected override ProviderCapabilities Capabilities { get; } = new()
    {
        ExampleModels = new List<string> { "custom-model-1" },
        SupportedOperations = new List<ImageOperation> { ImageOperation.Generate },
        DefaultModel = "custom-model-1",
        AcceptsCustomModels = true
    };

    public override async Task<ImageGenerationResponse> GenerateImageAsync(
        ImageGenerationRequest request,
        CancellationToken cancellationToken = default)
    {
        // Implementation
    }
}

Development

Build

dotnet build

Test

dotnet test

Run Locally

cd src/AiGeekSquad.ImageGenerator.Tool
dotnet run

Requirements

  • .NET 9.0 SDK or later
  • OpenAI API key (for OpenAI provider)
  • Google Cloud project with Vertex AI enabled (for Google provider, optional)

License

MIT License - see LICENSE file for details

Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues.

Acknowledgments

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
1.0.70 220 10/30/2025
1.0.65 236 10/29/2025
1.0.52 222 10/29/2025
1.0.40 212 10/28/2025
1.0.37 214 10/28/2025
1.0.27 213 10/28/2025
1.0.26 212 10/28/2025
1.0.21 210 10/28/2025

Initial release with support for OpenAI (DALL-E 2, DALL-E 3, GPT Image 1) and Google (Imagen 3) providers.