Skip to main content
Glama
README.md
<div align="center">

<img src="guide/images/jiangnan-dusk-painting.webp" alt="An AI painting a canal town at dusk in sumi, stroke by stroke: white-walled houses with red lanterns, a stone arch bridge, a covered boat and a willow" width="100%">

# sumi 墨

**A painting program for Windows with a SAI 2-style workflow — and a brush an AI can hold.**

[![Release](https://img.shields.io/github/v/release/congyuemao/sumi?style=flat-square&color=c9463a)](https://github.com/congyuemao/sumi/releases)
[![Build](https://img.shields.io/github/actions/workflow/status/congyuemao/sumi/build.yml?style=flat-square&label=build)](https://github.com/congyuemao/sumi/actions/workflows/build.yml)
[![License: MIT](https://img.shields.io/badge/license-MIT-2f3436?style=flat-square)](LICENSE)
![Windows 10 | 11](https://img.shields.io/badge/Windows-10%20%7C%2011-5b6468?style=flat-square&logo=windows)
![Made with Rust](https://img.shields.io/badge/made%20with-Rust-9aa2a6?style=flat-square&logo=rust)
![MCP built in](https://img.shields.io/badge/MCP-built%20in-c9463a?style=flat-square)

**English** · [简体中文](README.zh-CN.md)

[Download](https://github.com/congyuemao/sumi/releases) · [User guide](guide/usage.md) · [Let an AI paint](guide/mcp.md) · [Changelog](CHANGELOG.md)

</div>

> [!NOTE]
> What you see above is **an AI painting in sumi, one stroke at a time**, through sumi's built-in MCP server. It laid the scene out in one-point perspective, then painted it the way a painter does: a construction sketch on a toned ground, the sky and water in broad strokes, then every wall, roof and reflection covered stroke by stroke along its form, the windows, lanterns, boat and willow, and last the light — looking at the canvas between the parts and fixing what was wrong. Only sumi's own round brushes; nothing was pasted in, and every frame was exported by sumi itself. The script it wrote is [`scripts/paint_jiangnan.py`](scripts/paint_jiangnan.py) — run it and watch the same picture appear ([still image](guide/images/jiangnan-dusk.png); an earlier, simpler one: [ink landscape](guide/images/ink-landscape.png)).

<img src="guide/images/sumi-window-en.png" alt="The sumi window with the canal-town painting open: navigator, layer panel, color wheel, tool grid and brush settings on the left, the canvas on the right" width="100%">

## ✨ Why sumi

<table>
<tr>
<td width="50%" valign="top">

### 🖌️ It feels familiar
If your hands know the SAI 2 workflow, they know sumi: the panels, the tool grid, the brush settings, the stabilizer, the shortcuts. sumi opens and saves `.sai2` files, so your paintings come with you.

</td>
<td width="50%" valign="top">

### 🤖 An AI can paint in it
A built-in [MCP](https://modelcontextprotocol.io) server with 77 tools lets AI assistants make canvases, paint strokes, manage layers and read and write files — on their own canvas, or live in your window while you watch.

</td>
</tr>
<tr>
<td valign="top">

### ⚡ It is fast
Brushes 2–20× faster than the earlier builds, layer compositing in row strips on every core, optional GPU display that picks the faster of CPU and GPU by itself. Results stay identical pixel for pixel.

</td>
<td valign="top">

### 🛟 It does not lose your work
Every step is journaled to disk as you paint. After a crash, your picture comes back *with its undo history*. Reopen a `.sai2` you saved with sumi and you can still undo what you did yesterday.

</td>
</tr>
<tr>
<td valign="top">

### 🌏 It speaks your language
Simplified and Traditional Chinese, English, Japanese, Korean, Russian, Ukrainian, German, French, Spanish and Portuguese — chosen automatically, switchable any time.

</td>
<td valign="top">

### 🔒 It stays out of your way
One zip of about 20 MB, no installer, no account, no telemetry. sumi never goes online. Its settings and history live in two folders under your user profile, and nowhere else.

</td>
</tr>
</table>

## 🎨 What you can do

| | |
| --- | --- |
| **Brushes** | pencil, airbrush, brush, watercolor, marker, eraser, blur, smudge, binary pen, pixel pen, scatter, effect pen and bristle brushes · pressure, paint mixing, stabilizer, brush shapes, textures and paper — with an original set of materials included |
| **Layers** | folders, clipping groups, masks, locks, 32 blend modes, layer effects such as paper texture and watercolor edge |
| **Pen, shape and text layers** | editable vector lines and shapes; text typed straight onto the canvas, vertical text too |
| **Selection and transform** | rectangle, lasso, magic wand, selection pen · move, transform, free transform, mesh warp · rulers, symmetry rulers, perspective rulers and grids |
| **Files** | `.sai2` read and write, SAI Ver.1 `.sai`, PSD/PSB import and export, PNG, JPEG, BMP and TGA export, a built-in file viewer |
| **Views** | several views of one picture, restored child windows, detachable and hideable panels, editable shortcuts |
| **AI** | standalone canvas or live attach mode, up to 4 AI clients in one window, each client's undo kept apart |

## 🚀 Get started

1. Download `sumi-<version>-windows-x64.zip` from [Releases](https://github.com/congyuemao/sumi/releases).
2. Unzip it anywhere and double-click `sumi.exe`. That's it — nothing to install.
3. Already a SAI user? On the first start sumi offers to import your tools and materials (it only reads them).

sumi needs 64-bit Windows 10 or 11. The [user guide](guide/usage.md) covers the rest.

## 🤖 Let an AI paint

Point any MCP client — Claude Desktop, Claude Code, Codex and others — at `sumi-mcp.exe`:

```json
{
  "mcpServers": {
    "sumi": {
      "command": "C:\\path\\to\\sumi-mcp.exe",
      "args": ["--attach"]
    }
  }
}
```

With `--attach` (and **Others → Allow AI Connections** ticked in the window) the AI paints on the picture you have open while you watch, and every change it makes is an undo step you can keep or take back. Without it, the AI gets a canvas of its own. See [the MCP guide](guide/mcp.md) for every tool.

sumi is also listed in [Glama's MCP server directory](https://glama.ai/mcp/servers/congyuemao/sumi).

[![sumi MCP server on Glama](https://glama.ai/mcp/servers/congyuemao/sumi/badges/score.svg)](https://glama.ai/mcp/servers/congyuemao/sumi)

## 🛠️ Build from source

You need [Rust](https://www.rust-lang.org/) 1.88 or newer.

```powershell
cargo build --release -p sumi-app -p sumi-mcp
cargo test --workspace
```

`target/release/sumi.exe` is the window program, `sumi-mcp.exe` the MCP server; `scripts/package.ps1` builds the release package.

| crate | what it does |
| --- | --- |
| `sumi-core` | the painting core, no UI: tiles, the layer tree, brushes, selection, transforms, pen/shape/text, compositing, undoable commands |
| `sumi-format` | `.sai2`, SAI Ver.1, PSD/PSB and image files; the snapshots and journals behind crash recovery |
| `sumi-gpu` | GPU compositing and display (wgpu) |
| `sumi-mcp` | the MCP server |
| `sumi-app` | the window program (egui) |
| `sumi-bench` | benchmarks |

## 💛 Standing on the shoulders of GrazySAI

**sumi would not exist without [GrazySAI](https://github.com/grazyping/GrazySAI)** by [grazyping](https://github.com/grazyping), and we want to say so as loudly as we can.

GrazySAI is a free, open-source painting program with a feel and a brush engine modelled on PaintTool SAI 2 — and it is a remarkable piece of work. Where most projects stop at "looks about right", GrazySAI watched the real program closely, measured it, wrote down what it found in plain words and checked its own results against it again and again. It paints, it animates, it does 3D, it runs on Windows, Linux and FreeBSD, it speaks ten languages, and it gives all of it away under the MIT License.

That generosity is what made sumi possible. A great deal of sumi grew directly out of GrazySAI — out of its code and its notes:

- 🖌️ **the brush engine** — how a dab is built, how paint mixes with the canvas, the stabilizer, the tool presets;
- 🗂️ **the layer tree** — folders, clipping, masks and how it all composites, including the GPU blend shader;
- 💾 **the `.sai2` reader and writer**, the PSD support, file thumbnails and the file viewer;
- ✂️ **selections, transforms, mesh warp and resampling**, with the tests that keep them honest;
- 🌏 **the way sumi speaks other languages** — the design of its translation files, and the translations themselves. sumi offers the same ten languages GrazySAI does (plus Traditional Chinese) in honour of that work.

Every file that came from GrazySAI says so in its header, and [THIRD-PARTY-NOTICES.md](THIRD-PARTY-NOTICES.md) lists them all with GrazySAI's license.

**Thank you, grazyping.** If you like sumi, please go and give GrazySAI a ⭐ — it deserves it more than we do.

## 🙏 Also thanks to

- [egui / eframe](https://github.com/emilk/egui) — the immediate-mode UI that draws every panel, button and dialog.
- [wgpu](https://github.com/gfx-rs/wgpu) — the window, and the GPU behind sumi's optional GPU display.
- [rmcp](https://github.com/modelcontextprotocol/rust-sdk) and [Tokio](https://tokio.rs) — the Model Context Protocol server and its runtime.
- [serde](https://serde.rs), [schemars](https://github.com/GREsau/schemars), [ab_glyph](https://github.com/alexheretic/ab-glyph) and [ttf-parser](https://github.com/harfbuzz/ttf-parser), [png](https://github.com/image-rs/image-png), [zune-jpeg](https://github.com/etemesi254/zune-image), [flate2](https://github.com/rust-lang/flate2-rs), [rfd](https://github.com/PolyMeilex/rfd), [arboard](https://github.com/1Password/arboard) and every other crate in `Cargo.lock` — the full list and their licenses are in `THIRD-PARTY-LICENSES.txt` in the release package and under **Others → About sumi**.
- [sai2-parser](https://github.com/mishiki/sai2-parser) and the [SAI2 specification](https://github.com/photopea/SAI2-specification) — for writing down how `.sai2` files work.

## 🤝 Contributing

Bug reports and translation fixes are very welcome. For a larger change, please open an issue first so we can talk it through. See [CONTRIBUTING.md](CONTRIBUTING.md).

## 🔏 Code signing policy

Free code signing provided by [SignPath.io](https://about.signpath.io/), certificate by [SignPath Foundation](https://signpath.org/).

- Committers and reviewers: [Congyue Mao](https://github.com/congyuemao)
- Approvers: [Congyue Mao](https://github.com/congyuemao)

Release packages are built from the tagged source by this repository's [GitHub Actions workflow](.github/workflows/build.yml), and every signing request is approved by hand. Signing starts with a release after 1.0.0, once SignPath Foundation accepts the project; 1.0.0 itself is unsigned.

Privacy: this program will not transfer any information to other networked systems unless specifically requested by the user or the person installing or operating it.

## 📜 License

MIT — see [LICENSE](LICENSE). Code adapted from GrazySAI keeps its own MIT notice; see [THIRD-PARTY-NOTICES.md](THIRD-PARTY-NOTICES.md).

sumi is an independent open-source project. It is not affiliated with SYSTEMAX Software Development or PaintTool SAI; PaintTool SAI is a product of SYSTEMAX Software Development.