AiGeekSquad.ImageGenerator.Core 1.0.70

dotnet add package AiGeekSquad.ImageGenerator.Core --version 1.0.70
                    
NuGet\Install-Package AiGeekSquad.ImageGenerator.Core -Version 1.0.70
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AiGeekSquad.ImageGenerator.Core" Version="1.0.70" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AiGeekSquad.ImageGenerator.Core" Version="1.0.70" />
                    
Directory.Packages.props
<PackageReference Include="AiGeekSquad.ImageGenerator.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AiGeekSquad.ImageGenerator.Core --version 1.0.70
                    
#r "nuget: AiGeekSquad.ImageGenerator.Core, 1.0.70"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AiGeekSquad.ImageGenerator.Core@1.0.70
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AiGeekSquad.ImageGenerator.Core&version=1.0.70
                    
Install as a Cake Addin
#tool nuget:?package=AiGeekSquad.ImageGenerator.Core&version=1.0.70
                    
Install as a Cake Tool

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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.70 177 10/30/2025
1.0.65 198 10/29/2025
1.0.52 178 10/29/2025
1.0.40 173 10/28/2025
1.0.37 175 10/28/2025
1.0.27 179 10/28/2025
1.0.26 173 10/28/2025
1.0.21 187 10/28/2025

Initial release of the core library with provider abstractions and built-in OpenAI and Google providers.