# grafta

> grafta is an open-source MCP server for design and media. Read, edit and generate code from Figma files on disk, with no account or API key. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, macOS, Windows, Linux
- **Website:** https://n0ss4.github.io/grafta
- **Repository:** https://github.com/n0ss4/grafta
- **MCP Registry name:** io.github.n0ss4/grafta
- **Categories:** design and media, developer tools
- **Listing updated:** 2026-11-14

## About

Instead of calling Figma's API, grafta works on a local copy of a file saved through File, Save local copy. It understands .fig (Design), .deck (Slides), .jam (FigJam) and .site (Sites) files and reads layers, variables and a rendered picture of the design.

Changes never overwrite the original: save_as refuses an existing path, except the empty file new_file just made, then it reads back what it wrote and refuses edits Figma would have to repair. Opening the result in Figma remains the final check, so keep your original. A grafta tool command also runs tools from a terminal, and grafta tool --batch chains calls on one file.

It makes no network calls of its own, though what your model reads goes wherever your MCP client sends the conversation. Known gaps include auto-layout grids, component slots, boolean operations and prototyping.

## Features

- **Local file access:** Works on saved .fig, .deck, .jam and .site files.
- **Non-destructive saves:** Edits go to a new file, never over yours.
- **Layers and variables:** Reads structure and design variables, plus an image.
- **Design to code:** Generate code in whichever language you use.
- **Terminal mode:** Call tools directly or batch them without a model.

## Good for

- Ask what is inside a Figma file without opening Figma
- Change text or styles and save a copy
- Turn a design into front-end code
- Script repeated edits across a file in CI

## Install

### Claude Code (Terminal)

```sh
claude mcp add grafta -- npx -y grafta
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "grafta": {
      "command": "npx",
      "args": [
        "-y",
        "grafta"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "grafta": {
      "command": "npx",
      "args": [
        "-y",
        "grafta"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "grafta": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "grafta"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "grafta": {
      "command": "npx",
      "args": [
        "-y",
        "grafta"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "grafta": {
      "command": "npx",
      "args": [
        "-y",
        "grafta"
      ]
    }
  }
}
```

## FAQ

### Do I need a Figma account or API key?

No; you only need Figma to save a local copy and open the result.

### Does my file leave my machine?

grafta makes no network call, but what the model reads travels with your client's conversation.

### Can it break my file?

It writes a new file, refuses writes it knows are invalid and tells you to keep the original.

### Is grafta free?

Yes. grafta is open source, so you can use and self-host it for free.

### How do I add grafta to Claude Code?

Run this command in your terminal: claude mcp add grafta -- npx -y grafta

### What are the best alternatives to grafta?

The closest alternatives to grafta are REA, HyperFrames by HeyGen, Codebase Memory, GitHub and Serena MCP: the IDE for your agent.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [HyperFrames by HeyGen](https://ai-powered.com/mcp/hyperframes-by-heygen): HyperFrames by HeyGen is a freemium MCP server for design and media.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [ffmpeg-skill](https://ai-powered.com/mcp/ffmpeg-skill): ffmpeg-skill is an open-source MCP server for design and media.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/grafta
