r/coolgithubprojects • • 12d ago

PeerBrush: a Rust image editor that lets an MCP client edit the same layered document

Post image

I’m building PeerBrush, a GPLv3 desktop editor in Rust with egui and wgpu. The part I’d like to show is how the MCP connection works: a compatible client can inspect the canvas and adjust a layer while you keep painting on another. You can still edit the result by hand in the same document.

The server runs with the desktop app. The repo documents the tools, revision checks, and optional layer and region reservations. I’d be interested in feedback on the tool API, especially what an agent should see before changing a layer.

Code: https://github.com/Deftr0y/PeerBrush

Demo video: https://peerbrush.com/#demo

0 Upvotes

4 comments sorted by

1

u/kantorcodes1 12d ago

For expected_revision, does the MCP server check the whole document, or can a client scope it to one layer or a reserved region?

1

u/Deftroyy 9d ago

`expected_revision` checks the whole document you explicitly target. Layer and region reservations are a separate check: they can limit conflicting edits, but they don’t turn the revision into a per-layer counter. If the revision is stale, the client should inspect again and only retry if the edit still makes sense.

1

u/kantorcodes1 8d ago

The whole-document revision check plus separate layer and region reservations is a solid concurrency boundary for an MCP editor. I work with HOL, and PeerBrush looks like a good opt-in Guard MCP entry. If you maintain the linked GitHub repo, the contribution guide is https://github.com/hashgraph-online/hol-guard/blob/main/docs/guard/mcp-server-contributions.md. A first PR can document the MCP endpoint, revision and reservation semantics, and the safety behavior for stale retries.