Skip to main content
Glama
ACoci86

graphite-art-mcp

by ACoci86

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GRAPHITE_MCP_HOSTNoBind address. Binding to other interfaces exposes the editor to the network.127.0.0.1
GRAPHITE_MCP_PORTNoWebSocket port.47832
GRAPHITE_MCP_SERVENoServe the pre-built Graphite web app locally. Set to 0 for the developer setup.1
GRAPHITE_MCP_TOKENNoSession token the tab must present. If unset, a token is generated on the first run and saved in the cache directory so it remains stable across restarts.
GRAPHITE_MCP_WEB_DIRNoServe this frontend/dist directory instead of downloading the release bundle.(download)
GRAPHITE_MCP_FONT_DIRNoDirectories with .ttf or .otf files used when outlining text, separated by : (; on Windows).(bundled fonts only)
GRAPHITE_MCP_WEB_PORTNoPort of the local web server.47833
GRAPHITE_MCP_CACHE_DIRNoLocation of bundles and the generated token.~/.cache/graphite-art-mcp (varies by OS)
GRAPHITE_MCP_BUNDLE_URLNoDownload location of the pre-built app.GitHub release asset for this version
GRAPHITE_MCP_EXPORT_DIRNoDestination for exports when no path is given.~/graphite-mcp-exports
GRAPHITE_MCP_EXPORT_ROOTSNoAdditional directories exports may be written to, separated by : (; on Windows).
GRAPHITE_MCP_OPEN_BROWSERNoOpen the served app in the default browser when no tab connects within 3 seconds of start.1
GRAPHITE_MCP_BUNDLE_SHA256NoHex SHA-256 the download must match.(not verified)
GRAPHITE_MCP_ALLOWED_ORIGINSNoComma-separated browser origins allowed to connect.any localhost origin
GRAPHITE_MCP_INSERT_GRACE_MSNoAfter an insert wait expires, how long the connector keeps polling get_document for the layer before reporting failure.30000
GRAPHITE_MCP_EXPORT_TIMEOUT_MSNoExport timeout. The first raster render of a large document is the slowest.60000
GRAPHITE_MCP_REQUEST_TIMEOUT_MSNoTimeout for simple commands and the minimum wait for insert_svg.15000
GRAPHITE_MCP_INSERT_MS_PER_ELEMENTNoAdditional wait per SVG element on insert. Graphite creates one layer per element, so a 500-element file is allowed about 30 seconds.40

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
resources
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
graphite_get_capabilitiesA

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.

graphite_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.

graphite_insert_svgA

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.

graphite_exportA

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.

graphite_get_documentA

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.

graphite_previewA

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).

graphite_set_styleA

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.

graphite_transform_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.

graphite_rename_layerB

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

graphite_delete_layerA

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.

graphite_undoA

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

graphite_redoA

Redo the most recently undone change in the active document.

graphite_select_documentA

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

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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

ActivityMaintained
ResponsivenessNo issues