explaingit

enoyola/affinity-creative-mcp

Analysis updated 2026-07-25

0TypeScriptAudience · developerComplexity · 3/5Setup · moderate

TLDR

A local server that lets external programs like Codex control Affinity Photo, Designer, and Publisher through safe, pre-built commands for creating, editing, and exporting design files.

Mindmap

mindmap
  root((repo))
    What it does
      Controls Affinity apps
      Safe prebuilt commands
      No raw scripting access
    Platform
      macOS only
      Node 22 plus
      Affinity 3 required
    Tools
      Documents and layers
      Shapes and text
      Effects and export
    Safety
      Preview then apply
      Batch rollback
      No file overwrite
    Formats
      PNG JPEG GIF
      PDF SVG PSD
      TIFF EPS WebP

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Automate batch text replacement across multiple Affinity documents with rollback safety.

USE CASE 2

Programmatically create, edit, and export design files from Affinity via an external client.

USE CASE 3

Build Codex integrations that drive Affinity Photo, Designer, or Publisher workflows.

USE CASE 4

Export Affinity documents to PNG, PDF, SVG, and other formats via scripted commands.

What is it built with?

TypeScriptNode.jsAffinity 3

How does it compare?

enoyola/affinity-creative-mcp0xkinno/astraea0xkinno/halcyon
Stars000
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderatehardhard
Complexity3/54/54/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires macOS with Affinity 3 installed and Node.js 22.7.5 or newer.

In plain English

Affinity Creative MCP is a local automation bridge for Affinity Photo, Designer, and Publisher, three design applications owned by Canva. It lets an external client program (such as Codex) control those applications through a defined set of safe, pre-built commands. The project is unofficial and has no affiliation with Canva or the Affinity team. The server runs only on macOS, requires Affinity 3 (tested against version 3.2.0), and needs Node.js 22.7.5 or newer. It works by connecting to Affinity's built-in local network connector and exposing a fixed set of tools for creating documents, editing layers, replacing text, and exporting files. The author deliberately does not expose Affinity's raw scripting capability, which keeps operations restricted to what the provided tools can validate. The tools cover several areas. You can launch Affinity, create and open documents, inspect their dimensions, and save them. For editing, the server supports listing and selecting layers, adding shapes and text, placing images, applying basic visual effects like blur or exposure, and undoing the last action. A notable feature is guarded text replacement: the server first previews every match along with a fingerprint of the text state, then applies the replacement only if nothing has changed in between. This preview-then-apply pattern extends to batch replacement across up to 20 open documents, with automatic rollback if a later replacement fails. Exports include PNG, JPEG, GIF, TIFF, SVG, PDF, EPS, PSD, and WebP formats. The server stages exports on the Desktop because Affinity limits file access to that location, then copies the result to the requested destination without overwriting existing files. The same staging approach applies to new documents, since Affinity 3.2's SDK cannot reliably close files on its own. The README includes setup instructions, installation from source, and Codex configuration details. The automated test suite covers schemas, string escaping, guard logic, timeout behavior, batch rollback, and path containment. The full README is longer than what was shown.

Copy-paste prompts

Prompt 1
Write a Codex command that creates a new document in Affinity Photo, adds a rectangle shape, applies a blur effect, and exports the result as PNG to my Desktop.
Prompt 2
Create a script using the Affinity Creative MCP that finds and replaces text across 5 open Affinity documents, using the preview-then-apply pattern with rollback.
Prompt 3
Configure my Codex client to connect to the Affinity Creative MCP server and list all available tools for editing layers in an Affinity document.
Prompt 4
Build a workflow that opens an existing Affinity Designer file, lists all layers, selects one, and exports the document as a PDF.

Frequently asked questions

What is affinity-creative-mcp?

A local server that lets external programs like Codex control Affinity Photo, Designer, and Publisher through safe, pre-built commands for creating, editing, and exporting design files.

What language is affinity-creative-mcp written in?

Mainly TypeScript. The stack also includes TypeScript, Node.js, Affinity 3.

How hard is affinity-creative-mcp to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is affinity-creative-mcp for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.