Skip to main content
Glama
graphite-art-mcp

graphite-art-mcp

by ACoci86

graphite-art-mcp

Lets Claude draw in the Graphite vector editor.

You describe the artwork in a chat. Claude creates it in Graphite as ordinary layers that you can keep editing by hand, and it can look at the result, adjust colours and positions, undo, and export SVG or PNG files.

Not affiliated with the Graphite project. Graphite is MIT / Apache-2.0 licensed; this connector is MIT licensed. It is unrelated to the Graphite code review tool at graphite.com.

Install

Claude Desktop (Mac or Windows)

Download graphite-art-mcp-<version>.mcpb from the latest release and open it. Claude Desktop installs it. That is all.

Claude Code (Mac, Windows, Linux)

claude mcp add graphite -- npx -y graphite-art-mcp

Requires Node.js 20 or newer.

Other MCP clients

Add this to the client's MCP configuration:

{
  "mcpServers": {
    "graphite": {
      "command": "npx",
      "args": ["-y", "graphite-art-mcp"]
    }
  }
}

Related MCP server: inkscape-mcp

First use

Start a chat and ask Claude to check whether Graphite is connected. The first time, the connector downloads a copy of Graphite (a few megabytes, once), starts it locally, and opens it in your browser. The page connects on its own and stays connected after restarts.

Then ask for artwork, for example: "Draw a poster with a large red arrow made of small cursors, then show me a preview."

Exported files are saved in graphite-mcp-exports in your home folder.

If nothing connects, run npx graphite-art-mcp doctor. It checks the common causes and says what to fix.

What Claude can do

Tool

Purpose

graphite_new_document

Create a new document.

graphite_insert_svg

Add artwork as editable layers. Text is converted to outlines automatically.

graphite_preview

See the current canvas as an image.

graphite_get_document

List the layers and open documents.

graphite_set_style

Change fill, stroke or opacity of a layer.

graphite_transform_layer

Move, scale or rotate a layer.

graphite_rename_layer, graphite_delete_layer

Rename or remove a layer.

graphite_undo, graphite_redo

Step through the history.

graphite_select_document

Switch between open documents.

graphite_export

Save the document as SVG, PNG or other image formats.

graphite_get_capabilities

Report the connection state.

Good to know

  • Large drawings take time: Graphite creates one layer per shape, at roughly 40 ms each. For big artwork Claude should save the SVG to a file and pass its path instead of sending the markup inline.

  • Text is rendered with the bundled Liberation fonts (Sans, Serif, Mono). For a specific typeface, point the GRAPHITE_MCP_FONT_DIR setting at a folder with .ttf or .otf files.

  • Claude works best when it looks at the preview after each change rather than redrawing from scratch.

Settings

Everything works without configuration. The most useful settings, as environment variables:

Variable

Default

Purpose

GRAPHITE_MCP_EXPORT_DIR

~/graphite-mcp-exports

Where exports are saved.

GRAPHITE_MCP_OPEN_BROWSER

1

Set 0 to open the Graphite tab yourself.

GRAPHITE_MCP_FONT_DIR

bundled fonts

Extra fonts for text.

The full list, including ports and timeouts, is in docs/configuration.md.

Limitations

  • Works with Claude Desktop, Claude Code and other local MCP clients. It does not work with the chat at claude.ai in a browser; that would require a hosted version.

  • Text becomes outlined paths, not editable text layers.

  • Fills and strokes are solid colours; gradients and blend modes are not exposed yet.

  • The bundled Graphite is pinned to one upstream commit and updated with each release.

For developers

Architecture, building Graphite yourself, tests, releasing and the bridge patch are described in docs/development.md.

License

MIT, see LICENSE. Graphite itself is MIT / Apache-2.0 and is not redistributed in this repository; the patch under graphite-patch/ is offered under the same dual license so that it can be upstreamed.

Available Tools

13 tools
graphite_delete_layerGraphite: delete a layerA
Destructive

Delete a layer and everything inside it. Reversible with graphite_undo. Fails with LAYER_NOT_FOUND if the id is not in the active document.

Inputs: layer_id (required). Returns: deleted, layer_id

graphite_exportGraphite: export the active documentA
DestructiveIdempotent

Render the active Graphite document (all artwork) to a file and write it to disk. Returns the absolute path. Use svg for editable/scalable output and png for a bitmap; png with scale 0.25–0.5 is a cheap way to check what Graphite actually rendered. Fails with EXPORT_FAILED if the document has no layers, BRIDGE_TIMEOUT if rendering did not finish within GRAPHITE_MCP_EXPORT_TIMEOUT_MS (the first raster render of a large document can be slow: simply retry, or raise the limit), and EXPORT_PATH_NOT_ALLOWED if path escapes the approved export directories.

Inputs: path, scale, format. Returns: path, bytes, format, success

graphite_get_capabilitiesGraphite: connection status and capabilitiesA
Read-onlyIdempotent

Report whether a Graphite editor tab is connected to this connector, which Graphite commit it runs, and which commands are available. Call this first if another graphite_* tool returned GRAPHITE_NOT_CONNECTED. Read-only; never changes the document.

Inputs: no named parameters. Returns: tools, web_url, endpoint, connected, +5 more

graphite_get_documentGraphite: inspect the active documentA
Read-onlyIdempotent

Return the active document's id and name, all its layers (id, name, kind, visibility, parent) and the list of open documents. Read-only. Use it to verify that a graphite_insert_svg reported as BRIDGE_TIMEOUT did or did not land (look for the layer_id in layer_ids) before deciding to retry, and to confirm a document is not empty before exporting. Fails with NO_ACTIVE_DOCUMENT when nothing is open.

Inputs: no named parameters. Returns: name, layers, layer_ids, document_id, +2 more

graphite_insert_svgGraphite: insert SVG as editable artworkA

Insert SVG markup into the active Graphite document as an editable group layer (each SVG element becomes its own vector layer; the user can keep editing it by hand). This is the main way to create artwork: generate the SVG yourself, then call this with either svg (inline markup) or svg_path (a local file; preferred for anything large). Returns the new layer_id. The operation is one undo step. is converted to outlined paths automatically (Graphite cannot render text from SVG); pass outline_text=false to skip that. Large artwork is slow to build (roughly 40 ms per element); the wait scales with the element count. Fails with NO_ACTIVE_DOCUMENT if no document is open (call graphite_new_document first), INVALID_SVG if the markup does not parse, and BRIDGE_TIMEOUT if Graphite has not reported the layer in time even after a grace period — in that case call graphite_get_document and look for the returned layer_id before retrying, because the layer may still appear and a retry would duplicate it.

Inputs: x, y, svg, name, +4 more. Returns: elements, layer_id, document_id, text_outlined, +1 more

graphite_new_documentGraphite: new documentA

Create a new, empty Graphite document and make it the active tab. Returns its document_id. The document has no artboard; artwork inserted afterwards lands at document coordinates where (0,0) is the origin and y grows downward. Use this before graphite_insert_svg when the user asks for a fresh document; do not call it if they want to edit what is already open.

Inputs: name. Returns: name, document_id

graphite_previewGraphite: look at the canvasA
Read-onlyIdempotent

Render the active document to a PNG and return it as an image so you can see what Graphite actually drew. Nothing is written to disk. Use it after inserting artwork to check composition, alignment and missing elements before iterating; default scale 0.5 keeps the image small. Fails with EXPORT_FAILED when the document has no layers and BRIDGE_TIMEOUT when rendering is slow (retry).

Inputs: scale. Returns: bytes, scale, width, height

graphite_redoGraphite: redoA

Redo the most recently undone change in the active document.

Inputs: no named parameters. Returns: ok

graphite_rename_layerGraphite: rename a layerB
Idempotent

Set the name shown for a layer in the Layers panel.

Inputs: name (required), layer_id (required). Returns: name, layer_id

graphite_select_documentGraphite: switch the active documentA
Idempotent

Make another open document the active tab. graphite_get_document lists open documents. All other tools act on the active document.

Inputs: document_id (required). Returns: name, document_id

graphite_set_styleGraphite: set fill, stroke or opacity of a layerA
Idempotent

Change the solid fill colour, stroke colour and width, and/or opacity of an existing layer. Only the fields given are changed; null removes a fill or stroke. Each change is one undo step. Fails with LAYER_NOT_FOUND if the id is not in the active document.

Inputs: layer_id (required), fill, stroke, opacity, +1 more. Returns: changed, layer_id

graphite_transform_layerGraphite: move, scale or rotate a layerA

Apply a transform to an existing layer, in its parent's coordinate space (document pixels for top-level layers). Give translate, scale and/or rotate (applied as scale, then rotate about origin, then translate), or a raw SVG matrix [a, b, c, d, e, f]. By default the transform is combined with the layer's current one; replace=true sets it outright. One undo step.

Inputs: layer_id (required), scale, matrix, origin, +3 more. Returns: matrix, replace, layer_id

graphite_undoGraphite: undoA
Destructive

Undo the most recent change in the active document (inserts, style, transform, rename and delete are each one step).

Inputs: no named parameters. Returns: ok

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 13 tools

    Disambiguation5/5

    Each tool targets a distinct action or resource: document lifecycle (get_capabilities, new_document, get_document, select_document) versus layer editing (insert_svg, set_style, transform_layer, rename_layer, delete_layer) versus output (export, preview). The only near-overlap is export vs preview, but the descriptions sharply distinguish on-disk render from in-memory image and explain when to use each.

    Naming Consistency5/5

    Every tool uses the uniform graphite_<verb>_<noun> pattern (graphite_new_document, graphite_insert_svg, graphite_delete_layer), with no mixed casing or alternate verb styles. The convention is predictable and readable across all 13 tools.

    Tool Count5/5

    13 tools is well-scoped for an editor bridge, covering connection checks, document management, layer creation/editing, undo/redo, and rendering without redundancy. Every tool has a clear, non-duplicative role in the workflow.

    Completeness4/5

    The surface covers the core lifecycle: create document, insert artwork, style/transform/rename/delete layers, inspect, export, preview, and undo/redo. Minor gaps exist — no layer reordering, grouping, duplication, or document close/delete — but an agent can work around these for typical artwork generation tasks.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables AI-powered image to SVG vectorization, background removal, and SVG manipulation directly through MCP-compatible clients. Users can convert images, process batches, and edit vector properties like colors and complexity using the svg.new API.
      7
      73 npm
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables MCP clients to create, inspect, edit, render, and export SVG/Inkscape documents through typed drawing tools, with a deterministic offline backend and an optional bridge to a locally running Inkscape instance for limited live editing and snapshots.
      5
      BSD 3-Clause