Picasso MCP — Self-Hosted Image Generation for Your AI Coding Assistant

Picasso MCP Cover

Picasso MCP

Give your AI assistant a paintbrush. Self-hosted. One command.


The Problem

You’re deep in a project with Claude Desktop or VS Code Copilot, and you need an image — a diagram, a mockup, a placeholder asset. Your AI assistant is great at code, but image generation? That requires jumping to another tab, another tool, another workflow.

Picasso MCP closes that gap. It’s a self-hosted MCP (Model Context Protocol) server that wires Google AI Studio’s image generation models directly into your AI coding assistant.


How It Works

At its core, Picasso MCP is a thin bridge between your AI client and Google’s Imagen / Gemini image models. Here’s the full picture:

  flowchart LR
    A([🤖 AI Client<br>Claude / Copilot]) -->|MCP Protocol| B[🖥️ Picasso MCP<br>Your Server]
    B -->|Google AI Studio API| C[☁️ Imagen · Gemini]
    C --> D[(🖼️ Image<br>Saved to Disk)]
    D -->|URL returned| A

The client asks for an image. Picasso MCP forwards the prompt to Google AI Studio, saves the result to disk, and hands back a URL. That’s it.


Supported Transports

The server ships with two transport modes, covering both local and remote setups:

  flowchart TD
    P[Picasso MCP] --> SSE[SSE Transport<br>for VS Code · Remote Clients]
    P --> STDIO[stdio Transport<br>for Claude Desktop · Local]
    SSE --> Auth[🔐 Bearer Token Auth]
    STDIO --> Docker[🐳 Docker subprocess<br>No server needed]
  • SSE — HTTP-based transport, ideal for VS Code + GitHub Copilot or any remote MCP client
  • stdio — process-based transport, Claude Desktop spawns the container directly as a subprocess

Quick Start

Clone and configure in under two minutes:

git clone https://github.com/codeadeel/picasso-mcp.git
cd picasso-mcp

Edit docker-compose.yml with your credentials:

GOOGLE_API_KEY: "AIza..."
GOOGLE_MODEL:   "gemini-2.0-flash-exp"
MCP_AUTH_TOKEN: "your-secret-token"
BASE_URL:       "https://mcp.yourdomain.com"

Deploy:

docker compose up -d

Done. Your MCP server is live.


Connecting Your AI Client

VS Code + GitHub Copilot

Add to .vscode/mcp.json, switch Copilot to Agent mode, and ask it to generate an image:

{
  "servers": {
    "picasso-mcp": {
      "type": "sse",
      "url": "http://YOUR_SERVER_IP:8000/sse",
      "headers": { "Authorization": "Bearer your-secret-token" }
    }
  }
}

Claude Desktop (Remote)

Requires mcp-remote as a bridge and a domain with HTTPS:

npm install -g mcp-remote
{
  "mcpServers": {
    "picasso-mcp": {
      "command": "mcp-remote",
      "args": [
        "https://mcp.yourdomain.com/sse",
        "--header", "Authorization: Bearer your-secret-token"
      ]
    }
  }
}

Claude Desktop (Local, No Server)

Zero infrastructure. Docker runs as a subprocess on your machine:

{
  "mcpServers": {
    "picasso-mcp": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "-e", "GOOGLE_API_KEY=your-api-key",
        "-e", "GOOGLE_MODEL=gemini-2.0-flash-exp",
        "-e", "MCP_TRANSPORT=stdio",
        "-v", "/tmp/picasso-images:/images",
        "picasso-mcp:latest"
      ]
    }
  }
}

Architecture at a Glance

  flowchart TB
    subgraph Clients
        CC[Claude Desktop]
        VC[VS Code Copilot]
        MC[Any MCP Client]
    end

    subgraph Server["Picasso MCP Server (Docker)"]
        direction LR
        SSE_T[SSE Transport]
        STDIO_T[stdio Transport]
        AUTH[Auth Middleware]
        CORE[FastMCP Core]
        SSE_T --> AUTH --> CORE
        STDIO_T --> CORE
    end

    subgraph Google
        IM[Imagen Models]
        GEM[Gemini Models]
    end

    CC -->|stdio| STDIO_T
    VC -->|SSE + Bearer| SSE_T
    MC -->|SSE + Bearer| SSE_T
    CORE -->|auto-detect model| IM
    CORE -->|auto-detect model| GEM
    CORE --> DISK[(Images on Disk)]

Model selection is automatic — the server detects whether to use Imagen or Gemini based on the GOOGLE_MODEL environment variable. No manual switching needed.


Features Summary

FeatureDetails
ModelsImagen 3, Gemini 2.0 Flash (auto-detected)
TransportsSSE (remote), stdio (local)
AuthBearer token
DeploymentDocker Compose, single command
Reverse ProxyNginx example config included
ImagesSaved to disk, URL returned to client

Production Setup

For a domain + HTTPS deployment, an Nginx example config is included in the repo. Full walkthrough in the wiki.

  flowchart LR
    Internet -->|HTTPS :443| NGINX[Nginx<br>SSL Termination]
    NGINX -->|HTTP :8000| MCP[Picasso MCP<br>Docker Container]
    MCP --> Google[Google AI Studio]

Links