mcpField
U
UpscaleX

UpscaleX

Local
github.com/The-Open-Source-FounderMedia & Design0Updated 2d ago

About UpscaleX

UpscaleX is an image-upscaling CLI and MCP server for print workflows, artwork, and AI coding agents. It combines RealESRGAN models, Vulkan acceleration with CPU fallback, 8K and 16K presets, and custom sizing.

Key features

  1. 018K and 16K upscale presets
  2. 02RealESRGAN models with Vulkan acceleration
  3. 03CPU fallback and memory-safe tiling
  4. 04Custom proportional dimensions
  5. 05Print-size analysis at multiple DPI settings
  6. 06CLI and MCP server modes

Use cases

  1. 01Prepare images for large-format prints
  2. 02Upscale illustrations with an anime model
  3. 03Check an image's print dimensions and viability
  4. 04Run image inspection and upscaling through an AI agent

MCP support

The MCP server runs over stdio and exposes image metadata inspection, print viability evaluation, and image upscaling to AI agents. The README also lists `download_model` for fetching additional models.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"the-open-source-founder-upscalex": {
"command": "uvx",
"args": [
"upscalex"
]
}
}
}
Run commanduvx upscalex

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypiupscalex0.1.2

Tools

7

Saved tool list · updated 2d ago

ParameterTypeRequiredDescription
ttabooleanNoEnable Test-Time Augmentation for higher quality at the cost of speed.
modelstringNoRealESRGAN model ID from catalog (e.g. 'realesrgan-x4plus', 'realesrgan-x4plus-anime', '4x-ultrasharp', '4x-nmkd-superscale').
gpu_idstringNoHardware device selection: 'auto' (picks discrete GPU), integer ID ('0', '1'), or 'cpu' for CPU-only multi-threaded processing.
targetstringNoTarget resolution preset ('16k', '8k', '4k', '4x', '2x', or 'WIDTHxHEIGHT'). Defaults to '16k' (4x upscale).
tile_sizeintegerNoGPU tile size in pixels (default 256, safe for 4GB-8GB VRAM).
image_pathstringYesAbsolute or relative path to the source image (PNG, JPG, WEBP).
output_pathanyNoOptional path for the upscaled output. If omitted, saves next to source.

Details

From the project README

UpscaleX Banner

UpscaleX MCP/CLI

PyPI: Version License: MIT Python: 3.10+ MCP: Enabled Acceleration: Vulkan GPU

UpscaleX is a production-grade 8K and 16K image upscaler CLI and Model Context Protocol (MCP) server powered by RealESRGAN, Vulkan GPU hardware acceleration, and Lanczos supersampling.

Engineered for digital print workflows, large-format poster production, fine art reproductions, and autonomous AI coding agents in Claude Desktop, Antigravity, and Cursor.

Looking for quick setup? Read the Installation Guide for a copy-paste AI Agent setup prompt and manual instructions, or provide your AI coding assistant with the UpscaleX Agent Skill.


Table of Contents


Key Features

  • Dual-Mode Operation: Interactive command-line interface (upscalex) and standard Model Context Protocol server (upscalex-mcp).
  • 8K and 16K Presets:
    • 16K: Native 4x RealESRGAN deep-learning model upscale producing master files up to 400+ Megapixels.
    • 8K: 4x deep-learning inference followed by Lanczos-3 downsampling (Supersampling Anti-Aliasing / SSAA) for sharp edges and zero noise.
    • Custom Dimensions: Proportional scaling to arbitrary resolutions or physical print aspect ratios.
  • Cross-Platform Architecture: Tested and supported across Windows, Linux (Ubuntu, Debian, Fedora), and macOS (Apple Silicon arm64 & Intel x86_64).
  • GPU Acceleration with Seamless CPU Fallback: Automatically discovers and utilizes discrete Vulkan GPUs (NVIDIA RTX/GeForce, AMD Radeon, Intel Arc/Iris, Apple Silicon via MoltenVK). In headless Docker containers or environments without GPU drivers, the engine falls back to multi-threaded CPU Lanczos super-resolution with zero crashes.
  • Hardware Diagnostics: Integrated upscalex doctor command inspects system compute devices, Vulkan support, and recommended tile dimensions.
  • Memory-Safe Tiling: Sliding-window spatial tile decomposition (--tile-size 256) processes ultra-gigapixel images without Out-Of-Memory (OOM) failures on 4GB to 8GB GPUs.
  • Automated Engine Provisioning: Downloads and validates the precompiled platform binary automatically if not found locally.
  • Print Fidelity Analysis: Automatically calculates physical print dimensions in inches and centimeters at 300 DPI, 150 DPI, and 72 DPI.

Visual Quality Comparison

Below is an empirical comparison demonstrating UpscaleX 4x super-resolution reconstruction on a low-resolution pixelated source (663 × 531 px, 0.35 MP) upscaled to high-definition print fidelity (2,652 × 2,124 px, 5.63 MP) using the realesrgan-x4plus model.

UpscaleX Quality Comparison

MetricOriginal SourceUpscaleX 4x Output
Pixel Dimensions663 × 5312,652 × 2,124
Total Megapixels0.35 MP5.63 MP (16× Pixel Multiplication)
Edge ReconstructionHeavy block pixelation, ringingReconstructed circular spokes, sharp contours
Max 300 DPI Print Size2.2 × 1.8 inches8.8 × 7.1 inches
Model—realesrgan-x4plus
Hardware—NVIDIA GeForce RTX 3050 Laptop GPU (10.8s)

Documentation Directory

Comprehensive technical guides are available in the docs/ directory and repository root:


Quickstart

Option 1: Install from PyPI (Simplest for CLI & MCP)
pip install upscalex
Option 2: Clone and Install from Source (with uv)
git clone https://github.com/The-Open-Source-Founder/upscalex.git
cd upscalex

# Create virtual environment and install package
uv venv
uv pip install -e .
Inspect Available Models
upscalex models

Command-Line Interface

16K Upscale (Default 4x Model)
upscalex upscale input.png --target 16k
8K Supersampled Upscale
upscalex upscale poster.png --target 8k -o poster_8k.png
2D Illustration / Anime Artwork
upscalex upscale graphic.png --model realesrgan-x4plus-anime --target 8k
Image and Print Sizing Inspection
upscalex info input.png
Hardware and Content-Aware Model Recommendation
upscalex recommend input.png

For complete options and arguments, see the CLI Guide.


Model Context Protocol (MCP) Integration

UpscaleX runs as a native MCP server over stdio, enabling AI agents (Claude Desktop, Cursor, Antigravity, Windsurf, Zed) to inspect image metadata, evaluate print viability, and execute upscaling autonomously.

Server Invocation
# Standalone entrypoint
upscalex-mcp

# Or via CLI
upscalex serve
Client Configuration
Method 1: Using Pip (pip install upscalex)
A. Claude Desktop

Configuration file paths:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "upscalex": {
      "command": "upscalex-mcp"
    }
  }
}

Note: If your environment does not have global pip binaries in PATH, use explicit Python:

{
  "mcpServers": {
    "upscalex": {
      "command": "python",
      "args": ["-m", "upscalex.server"]
    }
  }
}
B. Default / Common MCP Clients (Cursor, Antigravity, Windsurf, Claude Code)

Configuration file: mcp_config.json or .cursor/mcp.json

{
  "mcpServers": {
    "upscalex": {
      "command": "upscalex-mcp"
    }
  }
}

Method 2: Using Git Clone & Source Checkout
A. Claude Desktop (with uv or virtualenv)
{
  "mcpServers": {
    "upscalex": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "/absolute/path/to/upscalex",
        "upscalex-mcp"
      ]
    }
  }
}

Direct virtual environment alternative (Windows / Linux / macOS):

{
  "mcpServers": {
    "upscalex": {
      "command": "/absolute/path/to/upscalex/.venv/bin/python",
      "args": ["-m", "upscalex.server"]
    }
  }
}

(On Windows, use C:\\absolute\\path\\to\\upscalex\\.venv\\Scripts\\python.exe)

B. Default / Common MCP Clients (Cursor, Antigravity, Windsurf)

Configuration file: mcp_config.json or .cursor/mcp.json

{
  "mcpServers": {
    "upscalex": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "/absolute/path/to/upscalex",
        "upscalex-mcp"
      ]
    }
  }
}

For complete tool schemas and JSON-RPC contracts, see the MCP Guide.


Model Matrix and Catalog

UpscaleX supports both pre-packaged core models and on-demand downloadable community models:

Model IDScaleTarget MediaVRAM RequirementStatusDescription
realesrgan-x4plus4xPhotos / Fine ArtMedium (4GB VRAM)InstalledFlagship model for high-fidelity photography, art, and exhibition posters.
realesrgan-x4plus-anime4xAnime / IllustrationMedium (4GB VRAM)InstalledPreserves flat colors, sharp contours, and line definition in 2D illustrations.
realesr-animevideov3-x44xVideo / Fast PreviewsLow (1GB-2GB / CPU)InstalledLightweight 4x feed-forward model for fast turnaround and low-spec systems.
realesr-animevideov3-x22xAnimation / VideoLow (1GB-2GB / CPU)InstalledFast 2x model for video frames, icons, and lightweight web assets.
realesr-animevideov3-x33xAnimation / VideoLow (1GB-2GB / CPU)InstalledFast 3x model for intermediate scaling.
realesr-general-x4v34xGeneral / CompactLow (2GB VRAM)InstalledOfficial compact general model with low memory consumption.
4x-ultrasharp4xPortraits / Ultra-DetailMedium-High (4GB-6GB)DownloadableCommunity champion for micro-textures, portraits, fabrics, and skin.
4x-nmkd-superscale4xClean PhotorealisticMedium-High (4GB-6GB)DownloadableTrained on clean photography; preserves hair, threads, and foliage.
realesrgan-anime-6b4xAnime / FastLow (1GB-2GB / CPU)Downloadable6-block lightweight anime model for rapid processing.
Download Additional Models

Download models through the CLI or via the download_model MCP tool:

# Download 4x UltraSharp for portraits
upscalex download-model 4x-ultrasharp

# Download NMKD clean photo model
upscalex download-model 4x-nmkd-superscale

Testing and Verification

Run the test suite to verify model resolution calculation, CLI exit codes, and live GPU inference:

uv pip install -e ".[dev]"
uv run pytest -v

All tests must pass prior to submitting changes.


Contributing

Contributions to UpscaleX are welcome. Please read CONTRIBUTING.md for coding standards, pull request processes, and development guidelines.


License

This project is licensed under the MIT License. See the LICENSE file for details.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.