kit 🦊

A token-lean MCP server for Figma. Your AI
assistant reads designs as compact text instead of screenshots and raw JSON,
and edits them through a small Figma plugin. Pictures are available, but only
on demand and size-capped.
Releases are listed in CHANGELOG.md.
✨ Why kit
- 🤏 Small in the context. On a real 33-screen file, the outline, the text
of every screen, all comments, one layer tree, the styles and one small
render come to about 40K characters (~12K tokens) in total. The tool list
adds about 11K characters (~2,800 tokens) to every request.
- 📝 Text first. Screens as their text in reading order, layers as one
line each, long answers paged instead of cut.
read_render is the only
tool that returns a picture, and it says what it costs.
- ✏️ Edits too. Change texts, styles, images and layout, create frames,
components and variant sets, delete nodes: each call is one undo step in
Figma.
- 🪶 One small program. No Node.js or other runtime; about 5 MB of memory
when idle. Files are downloaded once per version and kept on disk.
- 🔐 Simple permissions. Every tool name starts with its tier (
read_,
write_, delete_, exec_, auth_), so one rule per tier covers them all.
🚀 Quick start
- 🔑 Get access to Figma: create a personal access token (Figma →
Settings → Security → Personal access tokens, scopes
file_content:read,
file_metadata:read, file_comments:read) and export it in your shell
profile: export FIGMA_TOKEN=.... For a team, a
browser sign-in is nicer.
- 📦 Install kit: Linux and macOS
curl -fsSL https://raw.githubusercontent.com/RedFoxxo/kit/main/install.sh | sh,
Windows (PowerShell)
irm https://raw.githubusercontent.com/RedFoxxo/kit/main/install.ps1 | iex.
- 🔌 Connect your client: for Claude Code, run the command under
Claude Code. Other clients are listed under
Connect your client.
Then ask your assistant "what screens are in this Figma file?" with a file
link. To let it edit, set up the kit bridge plugin.
📦 Install
| Way |
For |
| Install script |
Linux, macOS, Windows: the usual way |
| Claude Desktop bundle |
Claude Desktop, nothing else to install |
| By hand |
Downloading the file yourself |
| From source |
Rust users, or a Docker image |
Install script
# Linux and macOS
curl -fsSL https://raw.githubusercontent.com/RedFoxxo/kit/main/install.sh | sh
# Windows, in PowerShell
irm https://raw.githubusercontent.com/RedFoxxo/kit/main/install.ps1 | iex
The script downloads the file for your system from the
latest release, checks it
against the release's SHA256SUMS, and installs kit in ~/.local/bin
(Windows: %LOCALAPPDATA%\Programs\kit). If that folder isn't on your PATH,
it adds it: log out and back in (Windows: open a new terminal), then check
with kit --version.
🔄 Update: run the same line again, then kit plugin if you edit with
the plugin.
⚙️ Options, set for the script:
| Variable |
Effect |
KIT_VERSION |
Install a given release, e.g. KIT_VERSION=2.0.0 |
KIT_INSTALL_DIR |
Install into another folder |
KIT_NO_MODIFY_PATH=1 |
Leave your PATH alone |
For example curl -fsSL …/install.sh | KIT_VERSION=2.0.0 sh, or in
PowerShell $env:KIT_VERSION = '2.0.0' before irm … | iex.
Claude Desktop
Download kit.mcpb from the
latest release and open it,
or drag it into Settings → Extensions. Claude Desktop asks for your token
or OAuth app (kept in the system's secure storage) and runs kit from the
bundle.
By hand
Download the file for your system from the
latest release into a folder
on your PATH and rename it to kit (kit.exe on Windows):
| System |
File |
| 🐧 Linux x64 |
kit-linux-x64 |
| 🐧 Linux arm64 |
kit-linux-arm64 |
| 🍎 macOS, Apple silicon |
kit-macos-arm64 |
| 🍎 macOS, Intel |
kit-macos-x64 |
| 🪟 Windows x64, also Windows on ARM |
kit-windows-x64.exe |
On Linux and macOS, make it executable: chmod +x kit. On macOS, a file
downloaded with a browser also needs xattr -d com.apple.quarantine kit once.
From source or Docker
- 🦀 With Rust:
cargo install kit-mcp --locked (the crate is kit-mcp; the
program is kit), or
cargo install --git https://github.com/RedFoxxo/kit --tag v2.0.0 --locked.
- 🐳 Docker:
docker build -t kit . in a clone, then
docker run -i --rm -e FIGMA_TOKEN kit. Reading works; the bridge for edits
needs kit on the machine running Figma.
⚙️ Settings
kit reads its settings from environment variables, which your MCP client
passes to it:
| Variable |
Required |
Purpose |
FIGMA_CLIENT_ID, FIGMA_CLIENT_SECRET |
one of the two ways |
Your Figma OAuth app: browser sign-in with auth_login. Wins over FIGMA_TOKEN. The secret is never logged or returned |
FIGMA_TOKEN |
one of the two ways |
Personal access token. Never logged or returned |
KIT_CACHE_DIR |
|
Cache folder, default ~/.kit/cache |
🔒 Keep secrets out of config files: export them in your shell profile and let
the client pass them through, as the examples below do.
Personal access token
- Create a Figma personal access token (Figma → Settings → Security →
Personal access tokens) with the scopes
file_content:read,
file_metadata:read, file_comments:read and, for write_comment,
file_comments:write.
- Store it as
FIGMA_TOKEN in your environment, never in a config file.
Figma tokens expire; create a new one when kit reports a 403 on every
file.
Browser sign-in (OAuth app)
Users sign in once per machine in the browser; kit renews the sign-in by
itself, so nobody copies tokens or replaces expired ones.
- At figma.com/developers/apps,
create an app owned by your team or organization. A private app needs
no review by Figma, and only members of that team or organization can sign
in.
- Add the redirect URL
http://127.0.0.1:7390/callback and the scopes
current_user:read, file_content:read, file_metadata:read,
file_comments:read and file_comments:write, then publish it. Figma
stops on its own page, without returning to kit, when these don't match:
Invalid scopes for app means a scope is missing, Invalid redirect uri
that the redirect URL differs (it must match exactly, including
127.0.0.1, the port and /callback). Fix the app and publish again.
- Give kit the app's client ID and secret as
FIGMA_CLIENT_ID and
FIGMA_CLIENT_SECRET. Figma asks for the secret on every token exchange
and refresh and has no secret-less mode for desktop apps, so it has to be
on the user's machine: share it only with the people the app is for.
Someone else holding it can start sign-ins in your app's name, but Figma
sends the user back only to the redirect URL above, on the user's own
machine, and kit protects that step with PKCE and a random state.
- The first time, ask the assistant to sign in to Figma.
auth_login opens
Figma's sign-in page and answers once the user is back, or after 30 seconds
with the link to open by hand (the sign-in keeps waiting for 10 minutes);
any tool answers "Not signed in" until then.
The sign-in is kept in ~/.kit/auth.json, readable by you only, and shared by
every kit session. kit refreshes the access token a day before it expires
(Figma's last 90 days), or halfway through the life of a shorter one. When
Figma no longer accepts it (you revoked the app, for example), tools say so
and ask for auth_login again.
- 👤 Switch account: ask for
auth_login with force.
- 🚪 Sign out: delete
~/.kit/auth.json, then restart your AI tool (a
running kit keeps the token it already loaded). To also cut kit's access on
Figma's side, remove the app from the connected apps in your Figma account
settings.
- 🖥️ No browser on the machine (SSH, containers): Figma sends the browser
back to
127.0.0.1:7390 on the machine running kit, so the browser must run
there too. After 30 seconds auth_login answers with the link; open it in
a browser on that machine, or use FIGMA_TOKEN instead.
- ⏳
Port 7390 is busy: another kit session is already waiting for a
sign-in. Finish that one, or wait up to 10 minutes for it to expire.
🔌 Connect your client
Claude Code
Register kit once for all your projects. ${FIGMA_TOKEN} is read from your
environment when the server starts, so the token isn't stored in the config
(for the browser sign-in, put FIGMA_CLIENT_ID and FIGMA_CLIENT_SECRET in
env instead):
claude mcp add-json kit --scope user '{
"type": "stdio",
"command": "kit",
"env": { "FIGMA_TOKEN": "${FIGMA_TOKEN}" }
}'
Then add the permission rules to ~/.claude/settings.json:
{
"permissions": {
"allow": ["mcp__kit__read_*", "mcp__kit__auth_*"],
"ask": ["mcp__kit__write_*", "mcp__kit__delete_*"],
"deny": ["mcp__kit__exec_*"]
}
}
Claude Code names MCP tools mcp__<server>__<tool>, so the server name must be
kit for these rules to match. Move exec_ to ask if you want the
assistant to run plugin code at all. Check the connection with
claude mcp get kit, or /mcp inside a session.
opencode
Add the server and the permission rules to opencode.json (global:
~/.config/opencode/opencode.json):
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"servers": {
"kit": {
"type": "local",
"command": ["kit"],
"environment": { "FIGMA_TOKEN": "{env:FIGMA_TOKEN}" }
}
}
},
"permissions": [
{ "action": "kit_read_*", "resource": "*", "effect": "allow" },
{ "action": "kit_auth_*", "resource": "*", "effect": "allow" },
{ "action": "kit_write_*", "resource": "*", "effect": "ask" },
{ "action": "kit_delete_*", "resource": "*", "effect": "ask" },
{ "action": "kit_exec_*", "resource": "*", "effect": "deny" }
]
}
opencode names MCP tools <server>_<tool>, so the server name must be kit
for these rules to match (read_outline becomes kit_read_outline). Restart
opencode after changing the file; opencode mcp list shows whether it
connected.
Other MCP clients
Any client that starts local (stdio) servers works. Most accept an
mcpServers block like this one (Cursor, ...):
{
"mcpServers": {
"kit": {
"command": "kit",
"env": { "FIGMA_TOKEN": "${FIGMA_TOKEN}" }
}
}
}
Whether ${FIGMA_TOKEN} is read from your environment depends on the client;
where it is not, the token ends up in that file, so keep the file private.
🎨 Editing: the kit bridge plugin
Figma's REST API cannot change designs, so edits go through a plugin running
in Figma desktop (the browser version cannot run development plugins). It
talks to kit over a WebSocket on localhost (ports 7380–7389) and connects to
every kit session running on the machine.
- Run
kit plugin. It writes the plugin to ~/.kit/plugin with the bridge
key in it, and prints the manifest path.
- In Figma desktop: Plugins → Development → Import plugin from manifest…, and
pick that path. Once per machine.
- Open the file to edit and run Plugins → Development → kit bridge. Keep its
window open while the assistant works.
read_bridge shows what is connected. Edits go only to the plugin running in
the file named in the call; kit never guesses between open files.
The plugin proves itself with a key from ~/.kit/bridge.key (readable by you
only) that kit plugin writes into its copy, and kit refuses connections
without it, from websites, and for other host names. After updating kit, run
kit plugin again, then close and relaunch the plugin in Figma; read_bridge
also says so when it refused a connection or the plugin is outdated.
🧰 Tools
🔐 Permission tiers
Tool names start with their tier, so client approval rules can allow reads,
ask before changes and block exec_run:
| Tier |
What it does |
Suggested rule |
read_ |
Reads only |
allow |
auth_ |
kit's own sign-in; changes no design |
allow |
write_ |
Changes the file |
ask |
delete_ |
Deletes nodes |
ask |
exec_ |
Runs any code the assistant writes in the plugin, with full access to the open file |
deny, or ask |
📚 Tool list
Your client sends every listed tool to the model with each request:
| Setup |
Tools |
Cost per request |
FIGMA_TOKEN |
13 |
about 2,700 tokens |
| OAuth app |
14 (with auth_login) |
about 2,800 tokens |