Registry / devops / figma-rest-mcp-server

figma-rest-mcp-server

JSON →
library0.1.5jsnpmunverified

A stdio-based Model Context Protocol (MCP) server that reads Figma design data via the Figma REST API and caches snapshots locally. Version 0.1.5, active development. Written in TypeScript with ESM-only support (Node >=20). Designed for AI-assisted design-to-code workflows (e.g., Codex). Automatically stores auth tokens and cache under ~/.figma-rest-mcp-server. No build step needed for end users; global npm install and CLI commands for auth, path inspection, cache clearing, and serving. Differentiates from other Figma MCP servers by local caching and strict stdio MCP protocol compliance.

npm install figma-rest-mcp-server
INSTALL
IMPORT
SIG · FIGMA-REST-MCP-SER
F
figma-rest-mcp-server
devopsjavascriptv0.1.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

serve
✓ import { serve } from 'figma-rest-mcp-server'
✗ const serve = require('figma-rest-mcp-server')
ESM-only package; CommonJS require is not supported. Use dynamic import() if needed in a CJS context.
auth
✓ import { auth } from 'figma-rest-mcp-server'
CLI entry point; also accessible via `figma-rest-mcp auth`. The exported `auth` function implements the token storage logic.
FigmaRestMcpServer (type)
✓ import type { FigmaRestMcpServer } from 'figma-rest-mcp-server'
✗ import { FigmaRestMcpServer } from 'figma-rest-mcp-server'
The main class is not exported as a value; only types are available for consumers. Use `serve()` to start the server.

Shows global installation, authentication, and running the MCP server via CLI or Codex integration.

npm i -g figma-rest-mcp-server figma-rest-mcp auth # Enter your Figma Personal Access Token when prompted figma-rest-mcp serve # Or register with Codex: codex mcp add figma_rest -- figma-rest-mcp serve
Debug
Known issues
gotchaToken stored in plaintext at ~/.figma-rest-mcp-server/auth.json. Do not share or commit this file.
fix
Restrict file permissions (chmod 600) or use environment variable FIGMA_PAT if supported.
affects: >=0.1.0
breakingNode.js >=20 is required. Older Node versions will fail to start.
fix
Update Node.js to version 20 or later. Use nvm or n to manage Node versions.
affects: >=0.1.0
gotchaCache directory ~/.figma-rest-mcp-server/.figma-cache is created automatically; deletion requires explicit cache:clear command.
fix
To clear cache: `figma-rest-mcp cache:clear`.
affects: >=0.1.0
breakingThe package is ESM-only. CommonJS require() will throw an error.
fix
Use import statements or dynamic import() in your project. For TypeScript, set "module": "ESNext" or use a bundler.
affects: >=0.1.0
gotchaThe `serve` command must be registered as a Codex MCP tool before use with Codex; direct usage via `figma-rest-mcp serve` is only for testing.
fix
Run `codex mcp add figma_rest -- figma-rest-mcp serve` once after global installation.
affects: >=0.1.0
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module not supported
Used CommonJS require() on an ESM-only package.
fix
Replace `require('figma-rest-mcp-server')` with `import('figma-rest-mcp-server')` (dynamic) or use a static import at the top of an ESM module.
figma-rest-mcp: command not found
Global npm install may be missing from PATH.
fix
Ensure npm global bin directory is in PATH. Run `npm root -g` to check location, then add it to PATH. Alternatively, use npx: `npx figma-rest-mcp serve`.
Auth file not found at ~/.figma-rest-mcp-server/auth.json
Authentication step not completed before running serve.
fix
Run `figma-rest-mcp auth` and follow the prompts to enter your Figma Personal Access Token.
Error: Cannot find module 'figma-rest-mcp-server'
Package not installed globally or locally.
fix
Install globally: `npm i -g figma-rest-mcp-server`. For local projects, add as dependency and run from node_modules/.bin.
Upgrade
Version history
0.1.5latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
figma-rest-mcp-server — npm install figma-rest-mcp-server · libregistry