oci ghcr.io/kgnatx/mockups-mpc:1.4.1streamable-httpMITupdated 2mo ago
A self-hosted gallery for AI-generated mockups ā with an MCP interface. Instead of cluttering your repo, mockups get a permanent home and a clean web gallery you can browse. AI tools upload them over a direct curl call; MCP handles only the lightweight coordination ā listing, metadata, tagging, and retrieval.
What can you do with Mockups Gallery?
Mockups MPC
A self-hosted gallery for AI-generated mockups ā with an MCP interface. Instead of cluttering your repo, mockups get a permanent home and a clean web gallery you can browse. AI tools upload them over a direct curl call; MCP handles only the lightweight coordination ā listing, metadata, tagging, and retrieval.
Token-efficient by design. MCP tool parameters flow through the model context, so sending a large HTML file via a tool call wastes tokens. Mockups MPC provides an HTTP upload endpoint (POST /api/upload) ā the AI writes the file locally and curls it to the server, keeping file content entirely out of the model context. MCP tools handle lightweight operations only: listing, metadata, tagging, and deletion.

Prerequisites
- Docker (for deployment) or Python 3.12+ (for local development)
- An MCP-compatible AI client (Claude Code, Claude Desktop, etc.)
- Optional: Traefik reverse proxy (for production with TLS)
Why
Every time an AI tool generates a mockup, there's no consistent place for it to go ā so they pile up in your repo or get scattered across temp dirs, sessions lose track of them, and there's no history. Mockups MPC gives them a permanent home instead: the AI pushes the mockup to the gallery, you browse it there, and the local file gets cleaned up. One place for everything, nothing cluttering your project.
Architecture
āāāāāāāāāāāāāāāāāāā MCP (HTTP/SSE) āāāāāāāāāāāāāāāāāāāāāāāā
ā Claude Code / ā āāāāāāāāāāāāāāāāāāāāāā ā ā
ā Claude Desktop ā send/list/get/update ā Mockups MPC ā
ā Any MCP Client ā delete/tag ā (FastAPI) ā
āāāāāāāāāāāāāāāāāāā ā ā
ā āāāāāāāāāāāāāāāāāā ā
Browser ā ā MCP Server ā ā
āāāāāāāāāāāā GET / ā ā (fastmcp) ā ā
ā Gallery ā āāāāāāāāāāāāāāāāāāāāāāāāā ā āāāāāāāāāāāāāāāāāā ā
ā Viewer ā ā āāāāāāāāāāāāāāāāāā ā
āāāāāāāāāāāā ā ā JSON API ā ā
ā ā /api/* ā ā
ā āāāāāāāāāāāāāāāāāā ā
ā āāāāāāāāāāāāāāāāāā ā
ā ā SQLite (WAL) ā ā
ā ā + Filesystem ā ā
ā āāāāāāāāāāāāāāāāāā ā
āāāāāāāāāāāāāāāāāāāāāāāā
Single Docker container running a FastAPI app that serves two roles:
- MCP Server ā mounted at
/mcp/(HTTP transport) and/mcp/sse(SSE transport). AI tools connect here to send and manage mockups. - Web Gallery ā served at
/. Sidebar with project list and chronological feed, main viewer with iframe/image display.
Data Layer
- SQLite in WAL mode ā metadata catalog (project, title, description, tags, content type, timestamps)
- Filesystem ā mockup files stored in
data/{project_slug}/{uuid}.{ext} - Storage is a bind-mounted
data/directory next to the compose file
Tech Stack
- Python 3.12
- FastAPI + uvicorn
- fastmcp v3.x (standalone)
- SQLite via aiosqlite
- Jinja2 templates + vanilla JS
- Docker + Traefik
Security
There is no built-in authentication. All API endpoints and MCP tools are open to anyone who can reach the server. This is designed for trusted networks (LAN, VPN, Tailscale) or behind a reverse proxy that handles auth. If you deploy this on a public network, add authentication at the proxy layer.
MCP Tools
| Tool | Description |
|---|---|
send_mockup |
Send HTML/SVG (raw string) or PNG/JPG (base64) to the gallery. Returns a gallery URL. |
list_mockups |
List mockups reverse-chronologically, optionally filtered by project. |
get_mockup |
Get a specific mockup by UUID with view and gallery URLs. Curl the view_url to read the file content. |
update_mockup |
Update metadata (title, description, tags) or replace content. |
delete_mockup |
Delete a mockup ā removes both the DB record and file on disk. |
tag_mockup |
Add or remove tags on an existing mockup. |
The server stores all content permanently. AI clients can clean up local files when they're no longer needed, or retrieve content later via get_mockup.
API Routes
| Route | Purpose |
|---|---|
GET / |
Gallery UI |
GET /view/{id} |
Raw mockup (HTML rendered, images served with correct MIME type) |
GET /api/mockups |
JSON listing with limit, offset, project filter |
GET /api/mockups/{id} |
Single mockup metadata |
GET /api/projects |
Project list with counts |
POST /api/upload |
Upload a mockup file (multipart form: file, project, title, description?, tags?) |
GET /health |
Health check |
Setup
1. Clone and configure
git clone https://github.com/kgNatx/mockups-mpc.git
cd mockups-mpc
2. Deploy
Quick start (pre-built image):
docker compose -f docker-compose.local.yml up -d
# Gallery available at http://localhost:8000
Build from source:
docker compose -f docker-compose.local.yml up -d --build
Production (with Traefik):
cp .env.example .env
# Edit .env with your domain and Traefik network name
docker compose up -d --build
3. Verify
curl http://localhost:8000/health
# {"status":"ok"}
4. Connect Claude Code
claude mcp add-json mockups-gallery '{"type":"http","url":"https://your-domain.com/mcp"}'
Or add to .mcp.json (project-level) or ~/.claude/.mcp.json (global):
{
"mcpServers": {
"mockups-gallery": {
"type": "http",
"url": "https://your-domain.com/mcp"
}
}
}
5. Connect Claude Desktop
Add to your Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"mockups-gallery": {
"type": "sse",
"url": "https://your-domain.com/mcp/sse"
}
}
}
6. Tell your AI to use it
Add instructions to your CLAUDE.md (or equivalent) so your AI uploads mockups via curl instead of passing file content through the model context:
# Mockups
When generating UI mockups, design concepts, or visual prototypes,
write the file locally then upload it to the Mockups MPC gallery via curl:
curl -s -X POST https://your-domain.com/api/upload \
-F file=@/path/to/file.html -F project=name -F title=name \
[-F description=text] [-F "tags=a,b,c"]
To read a mockup's content later, use `get_mockup` to get its
`view_url`, then curl it.
Add to ~/.claude/CLAUDE.md for all projects, or a project's CLAUDE.md for specific ones.
Gallery UI
The gallery auto-seeds a Setup Guide as the first entry on fresh installs. The guide covers all configuration methods with copy-able code blocks.
Layout: Sidebar (project list + chronological feed with title filter + infinite scroll) + main viewer (iframe for HTML, img for images/SVG) + metadata bar + pop-out link.
Theme: Techno Chic Minimalist ā Space Grotesk, cyan accents, zinc/neutral dark backgrounds.
Project Structure
app/
āāā main.py # FastAPI app, lifespan, MCP mount, router includes
āāā config.py # Settings (DATA_DIR, DB_PATH, BASE_URL from env)
āāā db.py # SQLite init + CRUD (WAL mode, aiosqlite)
āāā models.py # Pydantic models
āāā storage.py # Slug generation, file write/read/delete, 25MB limit
āāā mcp_server.py # FastMCP instance, tool logic, tool wrappers
āāā seed.py # Auto-seed setup guide on empty DB
āāā routes/
ā āāā api.py # JSON API endpoints
ā āāā gallery.py # Gallery page + raw mockup serving
āāā templates/
ā āāā gallery.html # Jinja2 gallery template
āāā static/
āāā style.css # Gallery theme
āāā setup-guide.html # Self-contained setup guide page
Development
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pytest tests/ -v
uvicorn app.main:app --reload
The test suite covers storage, database, MCP tools, API routes, upload, and gallery.
License
MIT ā see LICENSE.
Install
Add Mockups Gallery to your client. Pick the one you use.
{
"servers": {
"ghcr-io-kgnatx-mockups-mpc-1-4-1": {
"type": "http",
"url": "https://{host}/mcp"
}
}
}Add to `.vscode/mcp.json` in your workspace.
claude mcp add ghcr-io-kgnatx-mockups-mpc-1-4-1 -- docker run -i --rm ghcr.io/kgnatx/mockups-mpc:1.4.1codex mcp add ghcr-io-kgnatx-mockups-mpc-1-4-1 -- docker run -i --rm ghcr.io/kgnatx/mockups-mpc:1.4.1amp mcp add ghcr-io-kgnatx-mockups-mpc-1-4-1 -- docker run -i --rm ghcr.io/kgnatx/mockups-mpc:1.4.1{
"mcpServers": {
"ghcr-io-kgnatx-mockups-mpc-1-4-1": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/kgnatx/mockups-mpc:1.4.1"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"ghcr-io-kgnatx-mockups-mpc-1-4-1": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/kgnatx/mockups-mpc:1.4.1"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
{
"mcpServers": {
"ghcr-io-kgnatx-mockups-mpc-1-4-1": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/kgnatx/mockups-mpc:1.4.1"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"ghcr-io-kgnatx-mockups-mpc-1-4-1": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/kgnatx/mockups-mpc:1.4.1"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"ghcr-io-kgnatx-mockups-mpc-1-4-1": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/kgnatx/mockups-mpc:1.4.1"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"ghcr-io-kgnatx-mockups-mpc-1-4-1": {
"type": "local",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/kgnatx/mockups-mpc:1.4.1"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"ghcr-io-kgnatx-mockups-mpc-1-4-1": {
"command": {
"path": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/kgnatx/mockups-mpc:1.4.1"
]
}
}
}
}Add to your Zed `settings.json`.
docker run -i --rm ghcr.io/kgnatx/mockups-mpc:1.4.1Run `goose configure`, choose **Add Extension ā Command-line Extension**, and paste this command.
Score
39 / 100
Incomplete
- Documentation25/25
- Maintenance16/25
- Trust13/20
- Capability0/15
- Install experience15/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 55 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 18 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint ā no local install
Version history
| Versions | Published |
|---|---|
| 1.4.1Latest | Jul 2, 2026 |
| 1.2.2 | Mar 16, 2026 |