Skip to main content
Glama
README.md
# ![TinySquosh — local batch image compression for desktop and MCP](docs/media/tinysquosh-cover.webp)

Drop JPEG, PNG or WebP files into TinySquosh, or send them from a coding agent through MCP. Both use the same local workspace.

The alpine print above goes from **350 KiB JPEG to 107 KiB WebP** at quality 78. Both images are 1200 × 800.

[Download for macOS, Windows or Linux](https://github.com/Armas0n/tiny-squosh/releases/latest) · [Run locally](#run-locally) · [Connect an agent](#mcp-integration) · [Tool reference](docs/mcp.md)

## Run locally

From a checkout, install Bun 1.4.4, Node.js 22.12 or newer, stable Rust (1.90 or newer) and the native build tools for your OS. [Platform prerequisites for macOS, Windows and Linux](docs/local-development.md#platform-prerequisites)

```sh
bun install --frozen-lockfile --ignore-scripts
bun run tauri dev
```

Choose **Try a sample batch** or drop in your own JPEG, PNG and WebP files. Click an image and drag the split handle in the Inspector. You can preview a new quality or size before applying it to the selected files. **Download all** saves the ready images as a ZIP. The save button on each row exports just that image.

<details>
<summary>Watch the 13-second demo</summary>

![TinySquosh comparing original and optimized images, adjusting the quality of one file and exporting the batch as a ZIP.](docs/media/tinysquosh-workflow.gif)

</details>

Remember the Squoosh web app? TinySquosh uses some of the **same compression tools**, including MozJPEG and OxiPNG, and lets you optimize a whole batch of images at once.

## MCP integration

Keep TinySquosh open and run your MCP client on the same computer. In **Settings → Local MCP server**, copy the private token and check the endpoint. The examples use the default `http://127.0.0.1:47832/mcp` (Streamable HTTP). If you changed the port, use the URL shown in Settings.

To let an agent import files by path, grant their folder in Settings. Inline image submissions also work without a folder grant.

<details>
<summary><strong>Claude Code</strong></summary>

Add the `tinysquosh` entry to `.mcp.json` in your project root. Set `TINYSQUOSH_MCP_TOKEN` to the copied token in the shell where you start `claude`. Open `/mcp` to check the connection. [Claude Code MCP guide](https://code.claude.com/docs/en/mcp)

```json
{
  "mcpServers": {
    "tinysquosh": {
      "type": "http",
      "url": "http://127.0.0.1:47832/mcp",
      "headers": { "Authorization": "Bearer ${TINYSQUOSH_MCP_TOKEN}" }
    }
  }
}
```

</details>

<details>
<summary><strong>Codex CLI</strong></summary>

Copy the token from Settings. On macOS, run the following in Bash or Zsh. On other platforms, set the same environment variable to your token before running `codex mcp add`.

```sh
export TINYSQUOSH_MCP_TOKEN="$(pbpaste)"
codex mcp add tinysquosh --url http://127.0.0.1:47832/mcp \
  --bearer-token-env-var TINYSQUOSH_MCP_TOKEN
codex
```

</details>

<details>
<summary><strong>Cursor</strong></summary>

Add the entry to `~/.cursor/mcp.json` for all your projects, or to `.cursor/mcp.json` in one project. Set `TINYSQUOSH_MCP_TOKEN` in Cursor’s environment, then restart Cursor so it picks up the value. [Cursor MCP guide](https://cursor.com/docs/mcp)

```json
{
  "mcpServers": {
    "tinysquosh": {
      "url": "http://127.0.0.1:47832/mcp",
      "headers": { "Authorization": "Bearer ${env:TINYSQUOSH_MCP_TOKEN}" }
    }
  }
}
```

</details>

<details>
<summary><strong>Google Antigravity</strong></summary>

In the IDE’s agent panel, open **… → MCP Servers → Manage MCP Servers → View raw config**. Add the entry to your personal `mcp_config.json` and replace `YOUR_LOCAL_TOKEN` with the token from TinySquosh. Keep this file outside version control. [Google Antigravity MCP guide](https://antigravity.google/docs/mcp)

```json
{
  "mcpServers": {
    "tinysquosh": {
      "serverUrl": "http://127.0.0.1:47832/mcp",
      "headers": { "Authorization": "Bearer YOUR_LOCAL_TOKEN" }
    }
  }
}
```

</details>

Give your agent the paths to two images in the approved folder and try this prompt.

> Convert these two images to WebP at quality 78. Tell me which one is larger and leave the batch open so I can compare them.

After inspecting the result, you can ask the agent to recompress one image from its original and export the updated batch. [Tool arguments, retries and resumable exports](docs/mcp.md)

## Formats and limits

| Feature | Supported |
| --- | --- |
| Input and output | Static JPEG, PNG and WebP. JPEG and WebP have adjustable quality. PNG encoding is lossless. |
| Resizing | Downscale by width, height or bounding box. Aspect ratio is locked by default. |
| Metadata | Strip by default, keep only the color profile, or preserve supported EXIF and XMP tags, including GPS. |
| Batch size | Up to 100 files and 512 MiB per batch. Each source can be up to 32 MiB, 24 megapixels and 16,384 px per axis. |
| Workspace | Up to 250 retained images, including archived batches. TinySquosh keeps private working copies and preserves your source files. |

## Project guide

- [Build installers](docs/local-development.md#build-installers) for macOS, Windows or Linux.
- [Back up and restore a workspace](docs/local-development.md#backup-and-restore), including its images and job history.
- [Read the verification results](docs/verification.md) for platform coverage, codec measurements and offline tests.
- [Review local file access and security](docs/security.md) or [contribute a fix](CONTRIBUTING.md).

Licensed under [Apache 2.0](LICENSE).